This is the first weekly status update for my Summer of Code project, a generic REST interface for Django. If you haven't seen it, take a look at http://code.google.com/p/django-rest-interface/.
This week, I have started checking in code. I am always happy about feedback. Add a few lines to your (non-production!) urls.py [1], make your models available in XML or JSON format and tell me what works for you and what doesn't.
Compared to my timetable, I have managed to start a few things I planned to get done next week or the week after (create/update/delete operations, basic url patterns generator) and I have yet to add the option to format output with templates, something I wanted to get done by today.
Besides templates, I am going to work on error handling, pagination, the option to limit the model fields exposed by the API, a _load_put_and_files equivalent to _load_post_and_files and the inclusion of resource urls in serialized output until next Friday.
On 6/1/07, Andreas Stuhlmüller <stuhlmuel...@gmail.com> wrote:
> This week, I have started checking in code. I am always happy about > feedback. Add a few lines to your (non-production!) urls.py [1], make > your models available in XML or JSON format and tell me what works for > you and what doesn't.
Django is a web development framework, and not model development. REST (XMLRPC/SOAP) API are created to expose webservices, which by definition could be anything, not just models. CRUD is myopic world view. Have you seen the API's that Flickr/Delicious/FaceBook exposes? *None* of them are (strictly) CRUD related. What should you make easy is making any python function available through REST, and that function can in turn implement CRUD if you want. I am not against CRUD api, but thats a very small, and in my opinion unused subset of what REST etc would be used for.
Developers, please relook at 547, and compare it with 115. 547 is closed by jacob saying " This is a subset of #115<http://code.djangoproject.com/ticket/115>." which I feel is not the case, as #115 is "Models CRUD via web services".
On 6/2/07, Amit Upadhyay <upadh...@gmail.com> wrote:
> Django is a web development framework, and not model development. REST > (XMLRPC/SOAP) API are created to expose webservices, which by definition > could be anything, not just models. CRUD is myopic world view.
Thanks for your comment!
You are right in saying that making models CRUD-accessible is just a small part of what should be possible with the REST API. That's why my proposal includes two parts: Easily configured CRUD method access patterns for models on the one hand and resources that don't correspond 1:1 to models on the other hand. I will take a closer look at the tickets you opened when I get to the second half of my proposal, but note that what I am working on is not XMLRPC or SOAP.
Regards, Andreas
On 6/2/07, Amit Upadhyay <upadh...@gmail.com> wrote:
> On 6/1/07, Andreas Stuhlmüller <stuhlmuel...@gmail.com> wrote: > > This week, I have started checking in code. I am always happy about > > feedback. Add a few lines to your (non-production!) urls.py [1], make > > your models available in XML or JSON format and tell me what works for > > you and what doesn't.
> Django is a web development framework, and not model development. REST > (XMLRPC/SOAP) API are created to expose webservices, which by definition > could be anything, not just models. CRUD is myopic world view. Have you seen > the API's that Flickr/Delicious/FaceBook exposes? *None* of them are > (strictly) CRUD related. What should you make easy is making any python > function available through REST, and that function can in turn implement > CRUD if you want. I am not against CRUD api, but thats a very small, and in > my opinion unused subset of what REST etc would be used for.
> Developers, please relook at 547, and compare it with 115. 547 is closed by > jacob saying " This is a subset of #115." which I feel is not the case, as > #115 is "Models CRUD via web services".