I'm looking for some advice on "best practice" when writing a web app that exposes data via an API as well as human-readable pages. The question is platform-neutral, but I'm looking at this from the perspective of a Django site.
I've been watching the "30 Days to Learn jQuery" tutorials at tutsplus.com, and just saw the video where they retrieve JSON data from the Twitter API and render it on the page. Now, currently, I would build views that access the Django models and pass some data to the template, which is rendered for the user. However, this got me thinking -- if I've already got a JSON API using tastypie, why not write Javascript in my template to read the data from there?
So, can anyone tell me why I should or should not take this approach?