I am just starting up web development and have decided to use Django for backend. However, this Angular vs Ember comparisons have lowered my confidence as I think whatever choice "I" make, will turn out wrong in the long run. Can the experienced people here tell me what I should choose? I am fine with either style of approach to HTML(template vs declarative) and I just want a batteries included framework, which I can…
What kind of "batteries" are you looking to be included? Knockoutjs doesn't automate saving to the server (though it can do everything up to the Ajax call), and IMO it has a pretty intuitive model and near-perfect docs. As a recent convert, I would recommend that you consider it. Unless you've already rejected it for your own reasons, in which case I'm curious what those are. PS: the tutorial does have a little opaqu…
Why does Angular.js rock?
71–80 of 128 posts
Re: Why does Angular.js rock?
#72 It works great but what if we want the input to have the focus when the page loads? jQuery right? We grab the input and we call the focus() method in it. NO.
With directives we want our HTML to be as self-descriptive as possible so we are going to create a focus directive.
Or you could use html5's autofocushttp://davidwalsh.name/autofocus
and cut the JS
-----
Otherwise great article, I'm really leaning hard towards angular now, over ember
Re: Why does Angular.js rock?
#73Earlier quoted context omitted.
You can use either angular ui or angularstrap to get native angular support for bootstrap
This is kind of a dumb question, but do you know of any good solutions that allow the use of Angular with CoffeeScript, Bootstrap, AND a higher-level templating language like HAML? (I know I'm pretty much combining "hip" programming buzzwords here, but I am curious.)
Based on yeoman (http://yeoman.io), which I used briefly for the first time a few days ago, and it seems like a nice system. It already has pretty good integration with the AngularJS seed project.
You could probably roll something together using middleman (http://middlemanapp.com) too, with a bit more legwork.
Re: Why does Angular.js rock?
#74Statements like this worry me. Authenticated requests to REST API's should be drop dead simple in any JS framework.
Re: Why does Angular.js rock?
#75It works great but what if we want the input to have the focus when the page loads? jQuery right? We grab the input and we call the focus() method in it. NO. With directives we want our HTML to be as self-descriptive as possible so we are going to create a focus directive. Or you could use html5's autofocus http://davidwalsh.name/autofocus and cut the JS ----- Otherwise great article, I'm really leaning hard towards…
But to be sincere, I picked one thing to a directive, there are infinite ideas but I needed one easily enough for a "hello-world" type of post.
Re: Why does Angular.js rock?
#76What might actually have a chance at winning me over (having deep real-world experience with and trust of other tools) is an account of more complex usage:
- deep look at componetization/composition techniques,
- how it plays with CommonJS/AMD/Harmony,
- honest accounting of drawbacks, pain points, non-ideal usage scenarios,
- explanation of all the magic, e.g. what's happening under the covers to do data-binding, does the global namespace get polluted by DI features, etc...
Re: Why does Angular.js rock?
#77Earlier quoted context omitted.
"The docs by themselves simply will not teach you how Angular works." Well said, and I agree, but I wonder why this is? There's some cred to be gained by making and using something so impenetrable that only a select handful of people 'just know' how something works, and everyone aspires to be like them? I've found plenty of people/blogs/sites telling me I'm doing angular 'wrong' (and not just angular - other framewor…
What these "younger devs" don't realize is that in most cases they are simply reinventing stuff that has existed for years. Even today, the best JS MVC frameworks only just provide the capabilities to build UIs that (for example) were trivial in PowerBuilder 20 years ago. The fact that it's considered "gee whiz" that you can enter a value into a form field and have that value automatically validated and bound to an a…
Re: Why does Angular.js rock?
#78Earlier quoted context omitted.
You can use either angular ui or angularstrap to get native angular support for bootstrap
This is kind of a dumb question, but do you know of any good solutions that allow the use of Angular with CoffeeScript, Bootstrap, AND a higher-level templating language like HAML? (I know I'm pretty much combining "hip" programming buzzwords here, but I am curious.)
Re: Why does Angular.js rock?
#79> Angular has a lot of built-in services, managing $http requests, $q for promises, etc. But in this part we are not going to talk about any built-in service, because they are more complex to explain and that belongs to a new article. Statements like this worry me. Authenticated requests to REST API's should be drop dead simple in any JS framework.
Re: Why does Angular.js rock?
#80What are the alternatives to Angular.js that does not use this Dependency Injection magic?
Dependency Injection can really be done in a dark magic way (the java / spring way), but after reading the source code, i can tell you angular.js way of doing it is really not that dark. More importantly, is extremely easy to use. No .xml file, no configuration file, just put the service in that function signature, done (unless you want to minifiy, which means you'll also have to add it as a string right next to it).
app.controller('Name', function(require) { var $scope = require('$scope'); var y = require('some-service'); });
And suddenly, no problems and no weird syntax!