Angular.js advanced tutorials?

58 views
Skip to first unread message

ThomasTheDjangoFan

unread,
Sep 11, 2015, 6:03:24 PM9/11/15
to Django users
Hi guys,

I am searching for an angular.js tutorial that shows me how to do some enhanced ui stuff:
1) What is best practise for have multiple forms (formsets with inline-forms, for example multiple adresses for a contact as an inline-form) on one page with angularjs and connect it to a model via the rest-framework? How do I do DRY form-validation for the formset, so that each field can show an error that was validaded on the server? How do I implement custom field/model validations?
2) How do I implement a filterable and sortable list-view (for example a contact-model) and edit the single contact via a detail-update-view placed in a bootstrap modal-window? Something like django_tables2 and django_filters but in angular? How do I make the list-detail-data update after an edit of an item in the modal window?
3) What is best practise for authorisation?

Here is the my current list of tutorials that I want to have a deeper look at next week:
1) free http://blog.kevinastone.com/getting-started-with-django-rest-framework-and-angularjs.html
2) 19$ https://thinkster.io/django-angularjs-tutorial/
Both of the above tutorials seem to have quite simple use cases.

Are there any more advanced tutorials you can also recon?

Kind regards
Thomas


Javier Guerra Giraldez

unread,
Sep 11, 2015, 6:15:14 PM9/11/15
to django...@googlegroups.com
On Fri, Sep 11, 2015 at 5:03 PM, ThomasTheDjangoFan
<stefan.eich...@googlemail.com> wrote:
> I am searching for an angular.js tutorial that shows me how to do some
> enhanced ui stuff:


i think both angular and react are oriented primarily not to "enhanced
ui", but to whole frontend applications. with that in mind, you'll
find that most examples and tutorials treat the server either as an
API provider (typically REST), or tightly cohesioned with the frontend
(as is with meteor and some other JS frameworks)

of course it _is_ possible to use either for enhanced ui, just don't
be surprised for the lack of examples, and the feeling that you're
killing flies by swinging a big couch.

--
Javier

ThomasTheDjangoFan

unread,
Sep 12, 2015, 2:55:00 AM9/12/15
to Django users
Hi Javier,

yeah it seems like angular is gonna take over the whole page (though it depends on which dom element you target it).

Right now I am planning to only use it for certain use-cases and stick to standard django-templates for the easy stuff.
But I guess you end up having REST-APIs for a lot of models - even if you use angular in just one interactive use case.

Anyways: Aren't complex UIs part of frontend applications?

Example (this list-view / edit-view):
List-View: Let's talk about the example of having a list-view of a contacts to display them. We want the user to see all contacts in a list and to be able to sort and filter the contacts within the list table (right now I am using Django-CBV and django_tables2/django_filters).
Edit-View: Plus we want the user to be able to edit a single contact in a modal edit-window (in standard django we would use a create-update-django-CBV).
Connecting List-View&Edit-View via Javascript: Now after editing a single contact we could automatically update the underlying listview with the new contact-data (while keeping it in sync with the django-model via the rest framework).

How do we do that with angular? There must be a tutorial... or not?

Kind regards
Thomas
Reply all
Reply to author
Forward
0 new messages