7 ms·
The present/future of AngularJS
- craigching 12y agoWhat I'd really like to see in AngularJS is some sort of asynchronous module system a la AMD. Doesn't have to be AMD, but some way to not have to load a whole app in memory at once. I thought I saw a design document that mentioned they were considering this for AngularJS 2.0, does anyone know more about it? I do know that you can use requirejs, does anyone have any experience to share using requirejs and angularjs?
- SanderMak 12y agoWe use angular with RequireJS, though we don't (yet) load any Angular modules lazily because it is not supported by Angular. There are workarounds (like https://github.com/marcoslin/angularAMD https://github.com/marcoslin/angularAMD) which I have no experience with. We do load external libs (like MathJax, which is comparatively huge) lazily where possible. Our AMD modules are actually TypeScript modules that generate the AMD wrapper. Works great, and makes for a very clean and modular codebase. In the end, we use r.js to concat and minify most of it (everything except the lazily loaded libs) down to a single file. Including Angular templates, using https://www.npmjs.org/package/gulp-angular-templatecache https://www.npmjs.org/package/gulp-angular-templatecache which can output the templates as initialization scripts inside and AMD wrapper as well.
- aikah 12y agoBut you're not using async (angular)module loading.Angular modules cannot be loaded async in.You might be able to inject services after the app is bootstrapped but it involves using global variables,which totally defeat the purpose of dependency injection.
- SanderMak 12y agoIndeed, that's what my first sentence implies. Note that this doesn't prevent you from lazily loading other JS libs when using them inside Angular modules.
- NicoJuicy 12y agoTL;DR; The presentation is about the community (it's large) and about AngularJS 2.0. AngularJS will become more usable with mobile dev.(with Material Design and famo.us). It will also expand to AngularDart The poem is fun though when you like Angular: The poem https://twitter.com/NicoJuicy/status/525295632882614272 https://twitter.com/NicoJuicy/status/525295632882614272
- IkmoIkmo 12y agoIn singing form: https://www.youtube.com/watch?v=cSCpGAPWe_8#t=166 https://www.youtube.com/watch?v=cSCpGAPWe_8#t=166 Really looking forward to the integration of Material design in a mobile browser with Angular.
- myliverhatesme 12y agoI hate being linked to slide shows. When I saw the docs.google.com I was expecting some sort of design document or something.
- craigching 12y agoRight! The presentation showed some of those design documents in a picture in a slide. Are those documents available? That's exactly what I thought when I saw that slide, that I'd love to read those documents.
- nrb 12y agoThe Angular 2 design docs can be found here: https://drive.google.com/folderview?id=0B7Ovm8bUYiUDR29iSkEyMk5pVUk&usp=sharing https://drive.google.com/folderview?id=0B7Ovm8bUYiUDR29iSkEy...
- craigching 12y agoAwesome, thanks!
- ionwake 12y agohow does react.js compare? https://www.google.co.uk/trends/explore#q=angular.js%2C%20react.js&cmpt=q https://www.google.co.uk/trends/explore#q=angular.js%2C%20re...
- acconrad 12y agoThink of react.js as a Directive alternative - it's not as full-featured as Angular but you could replace Angular Directives with it.
- NicoJuicy 12y agoTL;DR: Ember and Angular are more full-featured than React.js. And Angular gives you the most bang per byte downloaded. angularjs is mvc (Model View Controller) react is only the V(iew), so you can blend AngularJS with ReactJS. The most popular post (about Angular vs React) is on http://www.quora.com/Pete-Hunt/Posts/Facebooks-React-vs-AngularJS-A-Closer-Look http://www.quora.com/Pete-Hunt/Posts/Facebooks-React-vs-Angu... , but it's kinda subjective i suppose as he works on the React team. (Note: I use AngularJS, but haven't used ReactJS. So if i'm wrong, please correct me). Here is a nice comparison though http://www.reddit.com/r/javascript/comments/1v4glc/react_vs_angular/cepekuj http://www.reddit.com/r/javascript/comments/1v4glc/react_vs_...
- dangoor 12y agoThat is correct, but I will say that React can enable a different application structure in a way that other view layers (i.e. more "normal" template engines) do not. React can be treated as a function (pass in input, out comes a UI based solely on that input) and I've found that this lets me simplify other aspects of my code.
- ionwake 12y agoThanks for your comments both of you I am trying to figure out which I should learn being an ASP.Net developer PS - FYI http://www.google.com/trends/explore#q=react.js%2C%20ember.js%2C%20angular.js%2C%20backbone.js&cmpt=q http://www.google.com/trends/explore#q=react.js%2C%20ember.j...
- Touche 12y agoI really dislike the trend of tech talks turning into stand-up comedy routines where 75% of slides must be a funny image that barely relates to the point the speaker is making at the time.
- twerquie 12y agoI really enjoy that trend. Tech is a dry topic with typically uninspiring presenters.
- Mandatum 12y agoI agree, I went to a conference the other weeks where the talks where extremely informative but after a day of presentations it becomes very hard to listen even if you're passionate about the topic. I enjoy the more casual approach than the dry textbook approach, I don't have an academic background however and that may be the difference.
- paulhodge 12y agoCrowds love that stuff though. When you're sitting there in person, you don't have the luxury of switching to a different tab for entertainment :)
- Touche 12y agoI know you're joking, but there is a kernel of truth; crowds do like it. It's sad that people choosing to attend a talk about Angular.js don't find Angular.js interesting enough on it's own. They must have a rattle to amuse them.
- aikah 12y agoI agree, that serves no purpose. It's just distracting. The "introductory joke" in a talk is sufficient to relax the audience.
- pkieltyka 12y agoI hope AngularJS implements a virtual DOM, but I'm keen to transition to reactjs anyways, as I prefer assembling a program from many libraries instead of a monolithic framework
- kuni-toko-tachi 12y agoAngularJS is terrible choice for a front-end framework. It's just bizarre from top to bottom. Not everything needs two-way binding. Not all SPA's use nesting to compose their user interface! Why does ng-if create a new scope? Using attributes as control structures is plain dumb. Component re-use is difficult because of nesting as a central paradigm. Javascript is a wonderfully expressive language. Unlike AngularJS, ReactJS let's you use this wonderful language to compose your application, not the foolishness of Angular's "modules", "factory", and "service". Even Dependency Injection is a foolish concept in a language like Javascript. Composition and wiring can be orchestrated through code, it doesn't need an intervening layer! Javascript already has well-establish design patterns - it doesn't need AngularJS.
- digisign 12y agoAs I may soon be maintaining some angular code and am new to it, I'm interested in your criticisms. Would be nice if you could expand them a bit.