Not sure why you're being downvoted, but I like this too. Your application should just be an API and pages should be tiny programs that call into this API. That way you can easily test your application and easily test your pages. And when you want to release "an API", well, you already designed, implemented, and tested it.
Comments
I did something similar for a recent project. My backend basically only provides an HTTP API. All rendering is client-side.
It felt natural as a programmer to develop the backend as a "library" that was "called" by the client side.
Immmmmense productivity. All pages require auth and shouldn't be indexed, so I don't worry about excluding search engines etc.
Not sure why you're being downvoted, but I like this too. Your application should just be an API and pages should be tiny programs that call into this API. That way you can easily test your application and easily test your pages. And when you want to release "an API", well, you already designed, implemented, and tested it.
Here here. Long live the one page web app.
hear hear
heer heer