Hello, I'm Christian Schmitt and in my Company we are working with 
AngularJS and Django.
Currently we are working on a application that makes heavy usage of Django 
HTTP Rest Framework.

Since the web is growing and more and more the web develops from a pure 
HTTP Response / Request Web to a more Heavy Client-side Web with websockets 
or JSON Response data.
With the introduction of Django Class-Based-Views it's even more easy to 
turn Django into a really really good solution for APIs. 
But still some things are missing. 
I hope i could explain them and tell them why django needs them.

1. CORS:
At the moment every request Django does needs to be on the same ORIGIN. 
Let's explain this on a development environment.
- Django runs on localhost:8000
- a second client either javascript (running on localhost:9000) or let it 
be a android application

Now when the Javascript client or the Android Application making requests 
to localhost:8000 they will get an error that they don't have access to 
localhost:800 since they are not in the Access-Control-Allow-Origin header.
(http://en.wikipedia.org/wiki/Cross-origin_resource_sharing)

This is very sad and django has no current solution for this. Maybe this 
would also be cool to be configured in the Django-admin


2. OAuth/OAuth2 support:
Currently Django only supports authentication with the inbuilt HTTP Basic 
Auth.
Why I want django to support OAuth? Currently take a look at Google at 
Django OAuth or even the Django documentation: (
https://docs.djangoproject.com/en/dev/topics/auth/#overview) There could be 
OAuth in a 3rd party package.
But now let's take a closer look, how many 3rd party oauth package does 
exists?
> https://www.djangopackages.com/grids/g/oauth/
Currently this site tells us that there are 7 packages. And thus aren't all 
packages.
I think it would be great to move one of them in contrib, that the 
development of these great tools could be coordinated and only one or two 
good solutions will stay alive while people could contribute to the 'best' 
solutions.
Since its always a pain for developers to use packages when there are so 
many. It leads to fragmentation. I mean what happens when i then need to 
fork, since some features are missing on every package? then we have 
another solution and most of the time the fork won't get pulled into the 
main version, so there will be a new package alive.


Currently I think that we should take a look in the future and maybe add 
more packages to contrib that solves the problem of Django and the future 
web. Lot's of things change with the bigger support of html5 support in 
browsers.
And with new tools like yeoman (http://yeoman.io/) and angularjs (
http://angularjs.org/) or backbonejs (http://backbonejs.org/) or even other 
tools as described here: 
http://net.tutsplus.com/articles/web-roundups/20-javascript-frameworks-worth-checking-out/
The web will change and django is an ecosystem and i think its a must that 
the ecosystem will evolve and support even more than plain html in the 
future.

Conclusion:
Even for REST Architecture Django is a great tool and some companies making 
heavy usage of Django REST. One of the greatest companies that use it, is 
INSTAGRAM. They have a pure Django based backend while connecting thousands 
of clients to a Django Backend.
Also the introduction of CBV is a huge step forwards to support this kind 
of architecture. The only thing that Django misses are better JSON/XML/YAML 
support for input/output data and data exchange between clients, but i 
think currently tastypie and django http rest framework are good solutions 
and they aren't that much fragmented.
Also there are other good solutions whats needed: 
https://groups.google.com/forum/?fromgroups#!searchin/django-developers/rest/django-developers/oozPnQrbrhA/NSNECwneEtIJ
And many many more.



-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to