Re: [Mailman-Developers] GSOC 2013 : Authenticated REST-API in Postorius/Django
Welcome to our community,
I'm happy to see that you are interested in the REST interfaces. In addition to TastyPie, I suggest that you also look at django-rest-framework. Please compare the two and let us know what you see as the advantages and disadvantages of each.
Richard
On Mar 28, 2013, at 4:02 PM, Rahul Gaur <rahul.nbg@gmail.com> wrote:
Hello,
I have been searching for Python/Django projects for a while and I stumbled upon the Mailman ideas page today. I am very much interested in discussing more about the *Authenticated REST-API in Postorius/Django *and I hope to work on it over the summer *, *but let me first introduce my self.
I am into third year of my engineering (Computer Science) and I have been using Python since my first year and for the past couple of months I have been using Django for experimental projects at college and for a interest based social networking site(initially started from pinax).
I have already cloned the Mailman code base and it's up and running , I will go through the source code in next couple of days.
I haven't implemented RESTful API's before , but I have started learning more about REST and HTTP protocols already and I hope that I would be in a better state by the time GSOC starts.
At the moment I am experimenting with the Django Tastypie and I have been wondering if the developers community here have been considering it or anything similar to it ?
I would like to get more involved with this project , if this is something community is seeking currently .
Please advice, how can I proceed.
Hi ,
Sorry for the late reply , I have been out of the city and I came back to the college yesterday only .
Welcome to our community,
Glad to be a part of the community , I hope to contribute towards the development of Gnu Mailman :)
I'm happy to see that you are interested in the REST interfaces. In addition to TastyPie, I suggest that you also look at django-rest-framework. Please compare the two and let us know what you see as the advantages and disadvantages of each.
Richard
So , last night I tried my hand on django-rest-framework [0] and TastyPie [1] as well.
What I could figure out with my two quick and dirty hands on applications of both the frameworks , the django-rest-framework is a bit more lengthy ( but those few extra lines are for the best) when stacked up against Tastypie.
I wrote this quick django app and then I tried to write API's for that app in both the framework.Both the frameworks have there own advantages lets talk about that.
Lets talk about the django-rest-framework, this was the first framework I tried and so I started from the scratch.So for my toy app , I referred the tutorial(I felt it's better documented than TastyPie ) and started writing the code.By the time I was done ,I could do lot of things with it.Biggest advantage it has over the TastyPie is this one :
*$ curl http://127.0.0.1:8080/formpost/ -H 'Accept:text/html'
*
The Django-rest-frameworks API's returns web browsable representation of the data by default :) I find this to be a lot more useful in the scenario where I am developing a new app from the scratch. Plus the default frontend is done with bootstrap , which makes it easier to customize as per the requirements as well.
Now , I would use TastyPie for an existing django project/app which has a web interface and I just need API's so I can provide third party support for my Project. TastyPie is kind of more easy to get started with as compared to Django-rest-framework.
I highly recommend Leonard Richardson's and Sam Ruby's O'Reilly book on
RESTful Web Services: http://shop.oreilly.com/product/9780596529260.do Although the book's been out for many years now, I still think it holds up well, and will give you a great understanding of the basic concepts and design principles behind REST. It also gives lots of great tips for organizing your resources, etc.
Thanks for recommending this book, I have started going through it .
Of course, it makes the most sense for the authenticated REST API to as
closely mimic the core admin API as possible.
Where there are conflicts, we
should discuss on this mailing list. Cheers, -Barry
So , the confusion I am facing here is that the Postorius is already mature and stable app and while playing with the two frameworks for API's what I figured out is that if I opt for django-rest-framework , I would need to write new Views ? But if I go for TastyPie , I won't have to touch the existing Views and write authenticated API's.
Hence to implement authenticated API's , which one would be better ?
[0] - https://github.com/aregee/restful [1] - https://github.com/aregee/restpie
Cheers !
*Rahul Gaur* *irc : iamaregee2* *web: *http://www.rahulgaur.info* * *blogs : *aregee.wordpress.com , <http://sanencynicalwriter.wordpress.com/> http://sanencynicalwriter.wordpress.com/ *fb:* http://facebook.com/iamaregee *github: *https://github.com/aregee
participants (2)
-
Rahul Gaur
-
Richard Wackerbarth