Django for backend and frontend

62 views
Skip to first unread message

jo...@careerharbour.co.uk

unread,
Jan 25, 2015, 7:29:00 AM1/25/15
to django...@googlegroups.com
Hello,

Shall I use Django for backend and frontend or is it a good idea to use Angular JS for frontend and Django for backend. What are the advantages and disadvantages?

I am trying to set up one single page website. It is not a platform. Most of the work is done at the backend. The frontend has a nice and simple design and should be fast and user friendly.

Thank you for your help.

Cheers,
Xiangyu John Wu
Founder of Career Harbour Ltd

Scot Hacker

unread,
Jan 26, 2015, 11:43:14 AM1/26/15
to django...@googlegroups.com
On Sunday, January 25, 2015 at 4:29:00 AM UTC-8, Xiangyu Wu wrote:
Hello,

Shall I use Django for backend and frontend or is it a good idea to use Angular JS for frontend and Django for backend. What are the advantages and disadvantages?

Doing this means using Django as basically a JSON generator. And that generally means integrating something like Django REST Framework or Tastypie.

Advantages:

- If you want to build both a standard site and a smartphone native app that talk to the same back-end, you're ahead of the game
- If you have plans for rich client-side interactions, Angular is a great choice

Disadvantages:

- Your developers now have to learn and maintain two frameworks rather than one. Angular has a fairly steep learning curve once you get past the basics.
- You are discarding a ton of productivity tools and abilities that come with Django. For example the ability to follow relations between models via dot notation.

Basically, you are adding complexity and slowing down development time by adopting the SPA approach. You should have a very good reason for doing that.

./s

Reply all
Reply to author
Forward
0 new messages