Is it hacky to manually construct JSON and manually handle GET, POST instead of using a proper RESTful API for AJAX functionality?
        Posted  
        
            by 
                kliao
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by kliao
        
        
        
        Published on 2011-01-07T15:16:14Z
        Indexed on 
            2011/01/07
            19:53 UTC
        
        
        Read the original article
        Hit count: 338
        
I started building a Django app, but this probably applies to other frameworks as well. In Backbone.js methods that call the server (fetch(), create(), destroy(), etc.), should you be using a proper RESTful API such as one provided by Tastypie or Django-Piston? I've founded it easier and more flexible to just construct the JSON in my Django Views, which are mapped to some URLs that Backbone.js can use. Then again, I'm probably not leveraging Tastypie/Django-Piston functionality to the fullest.
I'm not ready to make a full-fledged RESTful API for my app yet. I simply would like to use some of the AJAXy functionality that Backbone.js supports.
Pros/Cons of doing this?
© Stack Overflow or respective owner