Question

We have developed a django app and finished all view and templates. There are many controls in template and views. Our new frontend partner says us :

I want to use angularjs, so develop a webservice for me.

So, what is advantages and disadvantages ? Why we might omit the written view and templates?

Any help with this issue will be appreciated.

No correct solution

OTHER TIPS

AngularJS is modern javascript framework for creating complex web applications within the browser. It focuses on strong separation of concerns (MVC) and dependency injection to encourage creating maintainable (and testable) modules that can be integrated to develop rich client side functionality.

With the advent of more interactive web applications, a ReSTful API can be leveraged by rich client interfaces to expose and interact with your application's data model. AngularJS is a great companion because of its clean separation of controls. AngularJS's modular architecture involves a little bit of setup. Your app is composed of modules which define services, directives and controllers that compartmentalize the functionality for cleaner separation.

Part of the power of AngularJS, is that it provides reactive programming leveraging their javascript-like expression language. We can simply define a template that references variables, and our page will automatically refresh when changes are made to those variables.

Django Rest Framework is best choice to expose your web services/apis as it uses less code.

i might think you have to omit/keep aside the existing views/urls as it uses django forms to store the data etc. Whereas you have to handle the json data (applicable if you not use django rest framework)

reference link

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top