I want to know what's the best solution among this one :
Using RESTful api + Consume it from my website
Using a backend framework like Spring , Rails then when I need RESTful api I create it so I will have 2 projects.
It depends upon the project specific requirement.
j
stuff ;)
there is no right answer it depends on what you need / the budget / metrics.
The only thing, that's good advice ... stay small and agnostic till you can't.
Design your API before implementing it.
try to keep a consistent response, try to send some metadata as well.
In the end having a small well designed API allows you to replace the agnostic parts with a framework of your choice, should there ever be a need.
Important -> rest api design is functional ... don't try to hack in side effects to the global state -> it would break the functional concept.
And I would transform this question to a poll so you can check the communities taste :)