The more I think about this the more I realize that what I'm talking about 
IS exactly a REST api.

If I write a phone app, I will code all the presentation layer locally on 
the phone (client-side) and use json/xml to dynamically fetch data from the 
server. 

Why isn't this the same for websites? - why isn't the presentation layer 
completely client-side as opposed to 'a bit of both'?

Ideally when a user requests a webpage from my server, I should deliver the 
presentation layer to them, along with the information they require to 
perform an API lookup. From then on they can query my server using the same 
REST api a phone app would use. This would mean that all the information 
from EVERY device accessing my website comes from the same api. This is 
much better then my existing setup, where I might have an API for an app to 
accompany my site, but I also have a jungle of urls and views to enable a 
web browser use my site

Am I just repeating/realizing something that is well know and catered for? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/f1xLB5KuZQAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to