Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API #88

Open
Phyks opened this issue Oct 23, 2014 · 17 comments
Open

API #88

Phyks opened this issue Oct 23, 2014 · 17 comments
Assignees

Comments

@Phyks
Copy link
Member

Phyks commented Oct 23, 2014

Expose a true API to be used to control Freeder instance remotely ?

  1. What do you think about it ? Do we want it ?
  2. Using a true API could help refactor the code, and we should decide it right now, before implementing advanced features. We could build the template as a pure webapp, querying the API (à la Angular.JS) and avoid having PHP code doing some output, JS code doing some other output and so on.

In particular, this has to be discussed before implementing the solutions to issues #86, issues related to offline mode #66, to modal boxes #73, #36 and some other such as continuous loading (infinite scroll).

For instance, I particularly dislike the actual refresh page which is quite a hacky piece of sh*t for the output. Should be way better with a JS script doing an AJAX call and polling IMO.

@Phyks Phyks self-assigned this Oct 23, 2014
@eliemichel
Copy link
Member

I really think that having a full JS webapp + an API would be a good idea.
But it would require a large bunch of refactoring too…

@tmos
Copy link
Contributor

tmos commented Oct 23, 2014

I reaaaaaly love the full JS app idea, and, what a coincidence, I love angular too :D
It could be a nice way to reboost the project, and open it wider (allowing to create more than one interface for freeder :cli, native app, brainfuck, etc.).

For me, this is a full 👍 , and I'm not affraid from the refactor part : this is, I think, firstly a fun/cuting edge project, so we have to enjoy this liberty :)

Note that I'm totaly overbooked at this time, so I'll not be able to help you for feew weeks… :(

@Phyks
Copy link
Member Author

Phyks commented Oct 23, 2014

Ok, no problem. Let's do it then !

However, I propose to do it in a test-driven way, writing tests and expected results first. Here is a pad to write necessary features : http://tools.exppad.com/pad/p/freederAPI

@Niols
Copy link

Niols commented Oct 23, 2014

Test-driven ? You mean, "making Niols a slave" ?

@Phyks
Copy link
Member Author

Phyks commented Oct 23, 2014

Nope, these ones are easy to write =P

"making Niols a slave" is for the tests for the actual functions =)

@tmos
Copy link
Contributor

tmos commented Oct 23, 2014

Angular JS is a test-driven lib :)
You can see a bunch of links on my shaarli : http://hub.tomcanac.com/liens/?searchtags=angularjs

@eliemichel
Copy link
Member

Yeah, I saw that lot of tutorials about AngularJS include testing questions.

On 23/10/2014 18:46, Tom.C. wrote:

Angular JS is a test-driven lib :)
You can see a bunch of links on my shaarli :
http://hub.tomcanac.com/liens/?searchtags=angularjs


Reply to this email directly or view it on GitHub
#88 (comment).

@tmos
Copy link
Contributor

tmos commented Oct 23, 2014

This is a really powerfull and modern library, making JS writing a pleasure (yep, this is possible). The learning curve is pretty weird, with a lot of waves, but I think it is a good bet.

@Phyks
Copy link
Member Author

Phyks commented Oct 23, 2014

Ok. I've never played with Angular but I do really want to, so I think Freeder is a perfect use case.

I propose :

  1. We refactor the backend code, just to sanitize everything and include unit tests. || In parallel, we write base ideas of what the API should look like.
  2. We dev this test-driven =)

@tmos
Copy link
Contributor

tmos commented Oct 23, 2014

Yep, the good part is that will "force" to have a nice API documentation, and will separate fully the interface from the backend :)

@Phyks
Copy link
Member Author

Phyks commented Oct 23, 2014

👍

@marienfressinaud
Copy link

Great idea :) I wanted to do the same for FreshRSS but it's too late now ^^

It may be interesting to use an existing API (TTRSS, Google Reader, Owncloud News?) to be compatible with other apps? At least, it can be a good start!

@tmos
Copy link
Contributor

tmos commented Oct 24, 2014

Yep, trying to keep compatibility with other apps may be a good idea.

This website seems a nice start for building a standard api : http://www.restapitutorial.com/

@Phyks
Copy link
Member Author

Phyks commented Oct 24, 2014

@marienfressinaud 👍

I will try to do a little summary of the existing APIs for this kind of project (TTRS, Google Reader and Owncloud News), to have a better overview of the common basis we can use.

EDIT : Comment was in French :/

@eliemichel
Copy link
Member

I added a RFF draft to the wiki: REST API
It is highly unfinished.

@Phyks Do you have information (or links) about other APIs?

@Phyks
Copy link
Member Author

Phyks commented Dec 5, 2014

@eliemichel nope, I did not have much time to have a look at TTRS, GR, or Owncloud for now =(

@Phyks
Copy link
Member Author

Phyks commented Dec 26, 2014

Working on it, draft here: https://gist.github.com/Phyks/c143f719737e5557c4c2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants