So, I'm developing an android app to teach myself some of these concepts. I'm currently working on a backend using Spring Boot, which I am implementing as a RESTful API.
I've been doing a lot of reading on the matter and everyone seems to have a different approach, and I'm too inexperienced and naive at this point to know better.
What I'd like to do is have a way to also implement a website component of the app (since the app is android only, and I need to be able to allow iPhone and desktop users to get at it, and I may end up using something like PhoneGap for this purpose).
My current understanding presents me a few paths, and I'm not sure what to do or how to do it.
One way, I could create a bunch of JSP templates and modify my REST controllers to return the page based on information included in the header determining whether the JSON is needed or the full page is desired for web. An obvious downside would be requiring to controller methods for each URL (one returning JSON and one returning HTML/JSP following the MVC pattern).
Another approach I could conceive of would be to create an entirely separate application for web that just treats the REST API as a data source for filling out it's pages. This could even be done with something like PHP or Javascript. The downside, of course is the extra work of developing (and maintaining) an entirely separate application, and the tons of boilerplate that would be needed to interface with it for every little bit of data needed.
Can someone clear this up a little? My head is swimming. I know I'm not the only one with this problem, but finding quality information on the topic is surprisingly difficult.