3 ms·
thanks for the post. this was a good read. I'm about to start work on a medium sized Angular project and this kind of thing is very helpful. I didn't see any m
by metaphorm 13y ago
thanks for the post. this was a good read. I'm about to start work on a medium sized Angular project and this kind of thing is very helpful.
I didn't see any mention of your backend for the project, but I did get the impression it was something Java (why else would you be using Maven?). I'm looking to be writing angular templates on top of a django backend (supplying a RESTful api for data access). I'd love to read more about integrating Angular with RESTful backends.
- chaddeshon 13y agoI really think AngularJS with Firebase is the future. Using Firebase makes you app real-time, with no additional development. When you don't have to write any server side code at all, it can really speed things up.
- metaphorm 13y agothanks for the tip. I just checked out their demo page and it looks pretty sweet. I'm mostly still working on applications that have plenty of relational data and server-side data processing, so I don't think Firebase will be of immediate use for me, but I'm definitely impressed. The speed and ease is very nice.
- GeneralMaximus 13y ago> I'd love to read more about integrating Angular with RESTful backends. If your backend exposes a textbook REST interface, integrating it with AngularJS is almost no work at all. $resource is all you need. In case you have one or two non-RESTful endpoints here and there – and honestly, who doesn't? – $http is your friend. In an app I'm working on, I have a front-end built with Angular talking to a Tastypie back-end. Since Tastypie implements all the boring REST CRUD for you automagically, integrating the two took about fifteen minutes total. If there are there any specific questions/issues on your mind, ask away.
- metaphorm 13y agothats great. thanks. I'm still learning about Angular and had been using $http pretty much raw for most of the data fetching. I started to play around with $resource but didn't get very far due to some frustratingly vague documentation on the official site. Do you know of any really good tutorials emphasizing Angular's $resource service?
- GeneralMaximus 13y ago> Do you know of any really good tutorials emphasizing Angular's $resource service? Not really. I just used the official documentation. The egghead.io tutorials may touch on $resource. I also found this helpful: http://www.bennadel.com/blog/2433-Using-RESTful-Controllers-In-An-AngularJS-Resource.htm http://www.bennadel.com/blog/2433-Using-RESTful-Controllers-... Some Googling turned this up: https://github.com/dalcib/angular-phonecat-mongodb-rest https://github.com/dalcib/angular-phonecat-mongodb-rest. It may help you.
- cunninghamd 13y agoDo you have an example of TastyPie and AngularJS working together? I've got a straight-forward CRUD app (mostly) that AngularJS will be great for, but wrapping my brain around it all and an API has been difficult.
- GeneralMaximus 13y agoUnfortunately, I don't know of any such examples. Here's something I found while Googling around: https://github.com/dalcib/angular-phonecat-mongodb-rest https://github.com/dalcib/angular-phonecat-mongodb-rest. It doesn't use Django and Tastypie, but you may find at least the front-end code educational. I personally completely separate my front-end and back-end code. So while the API is built with Django, the front-end doesn't go through Django at all. It's served straight through nginx without doing anything special except maybe some simple URL rewrites for prettier URLs. If I'm not too tied up in college work this week, I might do a write up on Tastypie and Angular integration.