I was recently at an AngularJS meetup at Google. One exciting (and drool-worthy) advancement the devs are making when it comes to Angular's documentation: a fully interactive Codecademy-style 5-step tutorial. You can see a rough demo here: http://198.199.117.192/. They said they'd finish it in the coming weeks.
My problem with the Angular docs is that they're written by people who are steeped in Angular. It's the oldest problem in technical writing. How do you convey something that you grok? These videos have helped me, but when I actually sat down to cut code, I felt like I had to start all over again. I was still lost.
Lately I've been trying to use Anki to improve my recall of technical facts. Forensically deconstructing the docs has helped because I have to focus, really focus, to pick out the important things.
And it's still hard to parse anyway. Especially when there are restatements of previous restatements that are sufficiently incompatible that you wonder which is correct. I've popped the hood several times to read the damn code, which IMO sorta kinda defeats the purpose of documentation (and the fondness for large compound boolean statements gives me the heebie-jeebies).
And don't get me started on the idiocy of using sigils to configure behaviour.
I will stick with it, but I can see that I am going to be reading and re-reading and re-re-re-reading the docs and code for a few weeks yet.
I disagree. I found the tutorial for beginners really well done and when followed by the conceptual model it was solid.
We're thinking of integrating them into our course at http://www.thinkful.com/ – though we provide more structure than just the docs, they're pretty solid on their own.
I'd love to read more about how you use Anki. I've been using it for random things like the NATO phonetic alphabet or state capitals, but I've been wanting to try and create my own decks. I've just been having trouble wrapping my mind around how to turn knowledge like a library's documentation into cards. Any tips?
These screencasts by John Lindquist, available for many months with new ones appearing frequently, are awesome. The youtube channel is http://www.youtube.com/user/johnlindquist.
John provides very quick yet potent explanations of most features in AngularJS. All those videos can be played at 1.5X speed using YouTube's HTML5 mode. Takes roughly 2 hours to complete them.
I've built some real time front end stuff with knockout (due to starting off with backbone and still wanting to use the models and collections via knockback) so I'm not a complete beginner. I'm struggling with which reactive UI library to go with, but I think I'm basically down to ember and angular. Here's how I want to build my next app:
Haskell on the backend. Probably with data in postgres, but using an event sourcing kind of pattern for the bits of state which are edited.
Communication between the browser, other systems and the back end should allow separation of query and command (so updates are pushed to the backend state via one channel and pubslished back out via another). However it should be essentially realtime - websockets.
Operational transform for edits to the state. I'm on the fence with this one as I'm not sure what the overlap is between event sourcing and OT. Anyone who's implemented either care to comment? This seems to equate to using sharejs on the front end to marshal changes in the model to the back end and vice versa?
I'd consider using one of the haskell -> js libraries, but I'd also go with coffeescript here happily. I've played with Fay a bit and sunroof looks good too. Anyone using these?
The stuff above has been percolating for a while based on my experiences building the infrastructure for a hedge fund recently, and the gradual evolution from a mostly traditional restful app to a much more realtime system. Does anyone have any thoughts (not necessarily just on the specific technology mentioned but on how it all might fit together)?
All the introductory stuff for AngularJS I've seen so far is "client-side" - auto-updating bindings, the ToDo list etc.
Is there a similarly pitched tutorial about how to persist this back to a server, or how to write an API service that interacts best with the AngularJS model? Nothing in the list of video titles suggests that kind of help.
Angular is agnostic of the back-end. Just use the $http service to read/write async from the server. The angular model is whatever your model is - there are no restrictions
I've run across a number of tutorials that persist through a simple PHP-based REST API. What I haven't seen, but would very much like to, is one that includes authentication.
1) They're far simpler and easier to follow than anything I've found in the official Angular docs
2) He includes a brief section on testing. I'm a self-taught developer and work exclusively on my own projects. And I rely pretty heavily on tutorials. It's so rare to find a tutorial that spends any time at all on testing.
I am pleasantly surprised with AngularJS's prowess. I've thrown some really dynamic and tricky stuff at it, and it has never failed.
In the foreseeable future, I think I can take out jQuery from my app altogether.
I'm a self-taught developer, and the learning curve was steep. The to-do app, and Lindquist's videos made it significantly easy, though.
I'm building a fairly big Django/Angular project with ngResource and have been trying to replace it with Restangular, which has a nice API. But both have pros and cons:
What I like about ngResource is that returned data is automagically filled in as soon as the AJAX request completes. I can do this:
function controller(Resource) {
$scope.thing = Resource.get(); // here $scope.thing is an empty object, will be filled in as soon as data arrives
$scope.do = function() { alert ($scope.thing.name); }
}
Restangular returns promises instead, so to replicate the above code I'll have to do
function controller(Restangular) {
$scope.thing = Restangular.one('thing', 1).get();
// $scope.thing is a promise, I can't directly access its members in the controller, but since angular templating has native support of promises, I can use {{thing.name}} there.
$scope.do = function() {
$scope.thing.then(function(thing) {
alert(thing.name);
}
}
}
-- or --
function controller(Restangular) {
// I think that's ugly
Restangular.one('thing', 1).get().then(function(thing) {
$scope.thing = thing;
}
// $scope.do will be the same as in the ngResource example
}
Conclusion: Restangular has a nice API - but magically filling list/object is ngResource major selling point.
What I'd like from both is a nice getOrCreate method for elements, where it POSTs if the object doesn't have an ID set, otherwise sends a PUT. In CRUD forms I try to use the same controller for both "new" and "edit" actions, and I don't want to check the presence of ID and call the appropriate method every time.
Also, if Angular could handle REST data with a higher level library inspired by Ember.Data, I could die a happy programmer.
So, if you return something like `{meta: ..., data: [objects]}`, you are out of luck. Does anyone know a work around for ng-resource? I am using tastypie server-side which returns wrapped responses.
- restangular uses promises for callback, so you can do foo.get().success(function (){}) just like $http, while ng-resource uses jquery like foo.get(function () {})
I'm so conflicted. Just as I'd decided to move on from Angular to Polymers, there seems to have been an explosion in interest and resources for Angular.
[+] [-] brianchu|12 years ago|reply
[+] [-] tericho|12 years ago|reply
[+] [-] jacques_chester|12 years ago|reply
Lately I've been trying to use Anki to improve my recall of technical facts. Forensically deconstructing the docs has helped because I have to focus, really focus, to pick out the important things.
And it's still hard to parse anyway. Especially when there are restatements of previous restatements that are sufficiently incompatible that you wonder which is correct. I've popped the hood several times to read the damn code, which IMO sorta kinda defeats the purpose of documentation (and the fondness for large compound boolean statements gives me the heebie-jeebies).
And don't get me started on the idiocy of using sigils to configure behaviour.
I will stick with it, but I can see that I am going to be reading and re-reading and re-re-re-reading the docs and code for a few weeks yet.
edit: "The problem" to "My problem".
[+] [-] darrellsilver|12 years ago|reply
We're thinking of integrating them into our course at http://www.thinkful.com/ – though we provide more structure than just the docs, they're pretty solid on their own.
Those resources are - http://docs.angularjs.org/tutorial/step_00 - http://docs.angularjs.org/guide/concepts
[+] [-] ejfox|12 years ago|reply
[+] [-] rdudekul|12 years ago|reply
John provides very quick yet potent explanations of most features in AngularJS. All those videos can be played at 1.5X speed using YouTube's HTML5 mode. Takes roughly 2 hours to complete them.
[+] [-] prgfan|12 years ago|reply
[+] [-] adamors|12 years ago|reply
[+] [-] ericmsimons|12 years ago|reply
[+] [-] ishener|12 years ago|reply
[+] [-] boothead|12 years ago|reply
Haskell on the backend. Probably with data in postgres, but using an event sourcing kind of pattern for the bits of state which are edited.
Communication between the browser, other systems and the back end should allow separation of query and command (so updates are pushed to the backend state via one channel and pubslished back out via another). However it should be essentially realtime - websockets.
Operational transform for edits to the state. I'm on the fence with this one as I'm not sure what the overlap is between event sourcing and OT. Anyone who's implemented either care to comment? This seems to equate to using sharejs on the front end to marshal changes in the model to the back end and vice versa?
I'd consider using one of the haskell -> js libraries, but I'd also go with coffeescript here happily. I've played with Fay a bit and sunroof looks good too. Anyone using these?
The stuff above has been percolating for a while based on my experiences building the infrastructure for a hedge fund recently, and the gradual evolution from a mostly traditional restful app to a much more realtime system. Does anyone have any thoughts (not necessarily just on the specific technology mentioned but on how it all might fit together)?
[+] [-] thejosh|12 years ago|reply
Then moving onto egghead.io tutorials.
[+] [-] davemo|12 years ago|reply
* Part 1: Intro to Angular JS (50 minutes) [1]
* Part 2: End to End with Angular JS (52 minutes) [2]
* Part 3: Security with Angular JS (30 minutes) [3]
* Part 4: Frontend Workflows with Grunt and Angular JS (~60 minutes) [4]
[1] - http://www.youtube.com/watch?v=8ILQOFAgaXE
[2] - http://www.youtube.com/watch?v=hqAyiqUs93c
[3] - http://www.youtube.com/watch?v=18ifoT-Id54
[4] - http://www.youtube.com/watch?v=fSAgFxjFSqY
[+] [-] crb|12 years ago|reply
Is there a similarly pitched tutorial about how to persist this back to a server, or how to write an API service that interacts best with the AngularJS model? Nothing in the list of video titles suggests that kind of help.
[+] [-] WickyNilliams|12 years ago|reply
[+] [-] avoutthere|12 years ago|reply
[+] [-] danielhughes|12 years ago|reply
1) They're far simpler and easier to follow than anything I've found in the official Angular docs 2) He includes a brief section on testing. I'm a self-taught developer and work exclusively on my own projects. And I rely pretty heavily on tutorials. It's so rare to find a tutorial that spends any time at all on testing.
[+] [-] nish1500|12 years ago|reply
I'm a self-taught developer, and the learning curve was steep. The to-do app, and Lindquist's videos made it significantly easy, though.
[+] [-] JeremyMorgan|12 years ago|reply
[+] [-] Kiro|12 years ago|reply
[+] [-] 1_player|12 years ago|reply
I'm building a fairly big Django/Angular project with ngResource and have been trying to replace it with Restangular, which has a nice API. But both have pros and cons:
What I like about ngResource is that returned data is automagically filled in as soon as the AJAX request completes. I can do this:
Restangular returns promises instead, so to replicate the above code I'll have to do -- or -- Conclusion: Restangular has a nice API - but magically filling list/object is ngResource major selling point.What I'd like from both is a nice getOrCreate method for elements, where it POSTs if the object doesn't have an ID set, otherwise sends a PUT. In CRUD forms I try to use the same controller for both "new" and "edit" actions, and I don't want to check the presence of ID and call the appropriate method every time.
Also, if Angular could handle REST data with a higher level library inspired by Ember.Data, I could die a happy programmer.
[+] [-] ludwigvan|12 years ago|reply
- Support for wrapped responses: ngResource expects that you return an array for GET, so you need to return [objects]. See https://github.com/mgonto/restangular#my-response-is-actuall...
So, if you return something like `{meta: ..., data: [objects]}`, you are out of luck. Does anyone know a work around for ng-resource? I am using tastypie server-side which returns wrapped responses.
- restangular uses promises for callback, so you can do foo.get().success(function (){}) just like $http, while ng-resource uses jquery like foo.get(function () {})
[+] [-] joshowens|12 years ago|reply
[+] [-] KurtMueller|12 years ago|reply
[+] [-] mullethunter|12 years ago|reply
[+] [-] camus|12 years ago|reply
[+] [-] rcourtie|12 years ago|reply
[+] [-] rks404|12 years ago|reply
[+] [-] tericho|12 years ago|reply
[+] [-] mjackson|12 years ago|reply
[+] [-] drivebyacct2|12 years ago|reply