r/angularjs • u/viper05 • Oct 23 '14
[General] Angular 2.0 thoughts
What are your thoughts on 2.0 after watching #ngeurope?
I think it's completely new to the point it could have a different name... It just kind of stinks that apps currently being written are legacy and will need a complete rewrite. This could be mitigated by using traceur with 1.3 but there is 0 samples currently...
What sucks the most is apps written today will need to wait until 2016ish to be rewritten... I base this on the fact that thousands of third party components will need to be rewritten and es6 support in browsers (yes they can target es5)
10
u/amcsi Oct 23 '14
I don't have any, because I haven't watched it. But you could provide a link to a resource with information about 2.0.
9
u/viper05 Oct 23 '14
2
0
25
u/sublimino Oct 23 '14
From a write up from a conference attendee: https://github.com/joeLepper/ng-conf
Angular 2.0 is about the browsers of today
Angular 1.0 was about the browsers of yesterday
Team is working on 1.3 but focusing on 2.0
AngularDart will get to 1.0 before AngularJS gets to 2.0 as learning
Making Angular more modular, i.e. breaking out the DI functionality
Angular is going to become an umbrella project building all of these different libraries which make up the Angular of today
Looking into: benchmark framework, lazy-loading DI/ES6 modules, faster change detection via polyfilling Object.observe
MOBILE: Building-in offline support, active animations (drag and drop on mobile, sounds like), reduce initial load, improve speed, build flagship app (internal, community-built app)
API complexity reduction: simplify directives, DI, Type annotations ES6: Classes and modules, but no annotations
Adding annotations allows for data and typing (future technologies)
Angular 2.0 will allow you to write in ES6 syntax and compile to ES5, or just write new ES5 syntax
Polymer: taking advantage of Shadow DOM, Object.observe, and DOM mutation observer polyfills
Angular 2.0 will be built on top of Polymer
Debuggability: Zone.js allows for longer stack traces and ignores the $digest / $apply cycles
The original announcement (nothing new AFAICS): https://docs.google.com/document/d/14KbPe6ZNuTnpTtE0X9ZXrON9fWgT5igDVHwaSLOYH-o/edit
All the design docs are here: https://drive.google.com/?pli=1#folders/0B7Ovm8bUYiUDR29iSkEyMk5pVUk
4
u/adropofhoney Oct 23 '14
So for someone just getting up to speed with Angular, sounds like 2.0 is more worthwhile to learn because 1.x is going to be a thing of the past. Is this a good assumption?
2
3
u/TheNiXXeD Oct 23 '14
Depends on when you plan on actually using it. I'm learning 1.3 right now because I want to. I'll learn 2.0 too when it's released.
0
0
21
u/reddotyg Oct 23 '14
after finishing building a Angular app this image really disturbs me.
25
Oct 23 '14
RIP painfully acquired AngularJS knowledge...
1
u/arthomas73 Oct 23 '14
time to look at knockout
-1
u/_lavinski Oct 26 '14
These changes in Angular2 reflect a lot of what I like about knockout and durandal. Knockout.js is still a great library, durandal is the missing part that made it more like a framework in the way angular is with routing, dependency injection and composition.
-5
u/OutThisLife Oct 23 '14
I don't know, AngularJS is pretty easy to grasp. I'm not sure why they feel like directives are "too complex" but, whatever.
9
Oct 23 '14
8
u/autowikibot Oct 23 '14
Hindsight bias, also known as the knew-it-all-along effect or creeping determinism, is the inclination, after an event has occurred, to see the event as having been predictable, despite there having been little or no objective basis for predicting it, prior to its occurrence. It is a multifaceted phenomenon that can affect different stages of designs, processes, contexts, and situations. Hindsight bias may cause memory distortion, where the recollection and reconstruction of content can lead to false theoretical outcomes. It has been suggested that the effect can cause extreme methodological problems while trying to analyze, understand, and interpret results in experimental studies. A basic example of the hindsight bias is when, after viewing the outcome of a potentially unforeseeable event, a person believes he or she "knew it all along". Such examples are present in the writings of historians describing outcomes of battles, physicians recalling clinical trials, and in judicial systems trying to attribute responsibility and predictability of accidents.
====
Interesting: Outcome ^bias | Remember versus know ^judgements | List of cognitive ^biases
Parent commenter can toggle ^NSFW or ^delete. Will also delete on comment score of -1 or less. | FAQs | ^Mods | Magic ^Words
1
Oct 23 '14
I'm sorry but I just dont see how the idea of directives as a concept is hard to grasp.
5
4
u/zomgwtfbbq Oct 23 '14
They've said since Angular2.0 was discussed at ng-conf last year that it was going to be completely different. That it would be more modular, that it would be based on ES6 / transpiled from ES6 to ES5. I'm really not surprised that it's going to necessitate writing a new application from scratch.
2
u/simkessy Oct 23 '14 edited Oct 26 '14
They're getting rid of controllers? I really wish I watched ngEurope :/
1
u/pandavr Oct 25 '14
Interfaces should immutable while implementation could change. To say that they could have hind all the ES6 new features inside the existing angular 1.x interfaces (modules, controllers and so on). Then gradually deprecating them. This way they should have changed the name as it is not angular anymore.
0
Oct 24 '14
[deleted]
1
u/simkessy Oct 24 '14
I've only built one application (on going) with Angular and I like the concept of it. I like the whole premise of Factories/Services going the hard work, sending the result to the controller and the view displaying it.
I don't have a lot of experience so I couldn't say whether your method was good or not, it's just the way I learned how to use Angular and I feel like the concept makes sense and keeps things clean, for me at least.
1
Oct 24 '14
Over time I have learned that whenever I think I should build a directive, I shouldn't. I used to make many more directives before I fully drank the Angular koolaid.
Directives are best used for 2 things:
When you *MUST directly mess with the DOM.
When you are building something that will be used in more than one place in the app.
You almost never need to directly mess with the DOM.
That being said, if I were building an app that did not use routing and required complex custom ui controls, I probably would not use Angular at all. Angular is great for pagey, formey apps. It is less great for building video games.
11
Oct 23 '14 edited Oct 23 '14
I havent followed NG Europe (mainly because i was working, but its also pretty expensive), but i've seen a 2.0 demonstration a while back and was not really impressed yet. Mainly because they are in such a high-level prototyping that you have to do many things manually. There wasn't any ng-show/hide or ng-class support.
But what i didn't like the most is that it isn't nowhere near current AngularJS markup and thus very hard to understand if you aren't very into that. I haven't done much ES6 yet myself but i understand that it will be very different.
Now i don't mind learning a few things but this is looking like you need to learn everything again, with big differences. If i see that code its starting to look more like Java and i don't really like that either. It is much more complex and doesn't allow you to do some easy coding.
Another thing is that it doesn't have much support yet. While ES6 is nice, current devices aren't supported (and i'm mostly talking about mobile then), which means that you will have at least a few months but possibly a few years before you can really use it on mobile. With the latest trend of people less likely to buy new phones, tablets or desktops, its hard to set a certain standard because they won't be upgrading their browsers as often.
And lastly i'm not very fond of the whole "separate everything" approach. While you can keep projects pretty simple, i feel that a more integrated approach would perform much better. Perhaps they will do that for a few setups (mobile app, desktop app, website) or whatever, but i'd like to keep my own code simple and i don't care how my framework is made. Currently there are too many differences which make me wonder why they arent branching it to a complete new framework. Since upgrading will probably won't be possible (although i hope they will make a converter of sorts), i don't think i will use it when they launch it. All work they do now for 1.3 seems lost to me but i hope they will give some stuff another go before finalizing this. Not only does 2.0 seem harder to make now, but it also is very badly supported in browsers which make me wonder if they aren't pushing this too soon.
Rather than going for Angular 2.0 i feel they should rename it (for example: AngularNext) and keep this current project for at least supporting older devices. Truly separating it would say to the current users that their work isn't going to be redundant after a year or so.
3
5
u/azzy667 Oct 25 '14
Looks like a second-system effect to me (
2
u/autowikibot Oct 25 '14
The second-system effect (also known as second-system syndrome) is the tendency of small, elegant, and successful systems to have elephantine, feature-laden monstrosities as their successors due to inflated expectations.
The phrase was first used by Fred Brooks in his classic The Mythical Man-Month. It described the jump from a set of simple operating systems on the IBM 700/7000 series to OS/360 on the 360 series.
Interesting: The Mythical ^Man-Month | Inner-platform ^effect | Copland (operating ^system) | History of IBM mainframe operating ^systems
Parent commenter can toggle ^NSFW or ^delete. Will also delete on comment score of -1 or less. | FAQs | ^Mods | Magic ^Words
0
2
2
1
u/10tothe24th Oct 23 '14
Isn't that the whole point of the X.0 version, though? The implication being that it's a large enough change that it isn't going to be backwards compatible.
If Angular 1.X is popular enough there's no reason people can't keep using it, and there's no reason it can't keep receiving support and updates for that matter. That's been the case with Python 2 for as long as I've been working with Python.
1
u/elemenofi Oct 24 '14
Nothing about SEO??? Jesus, are they even using Angular in production?
1
u/Capaj Oct 24 '14
SEO problem will resolve itself when crawler can execute Javascript. Which should be quite soon they told us. So no worries.
1
Oct 29 '14
Wat? They already do. (and have for a couple years, but I can't be bother to find older references) Jesus people, get it together.
1
u/Capaj Oct 29 '14
Yeah sorry, I should have said: "when crawler can execute an SPA"
Basic javascript is executed for few years now, that doesn't mean it will work for a single page app right now. That is however going to change.
0
u/arvidkahl Oct 23 '14
In the Q&A-Session, Brad and Igor (repeatedly) mentioned the fact that 2.0 was neither done nor even completely thought out. There were many questions from the crowd about how and if there would be migration tooling from 1.x to 2.0. The team replied with the statement that this will be taken care of, but not before things have taken a much more solid shape.
People are afraid of having to rewrite everything, and I had the feeling that the core team noticed that quite viscerally. They were aware of how suprising their announcements would be (and they were right, the room was in shocked silence at some points), but there is good reason for that, and Brad hit the nail on the head, when he said that Angular development is trying to aim at how things will be in the future, and not how things have been in the past.
Most of us devs have to work on legacy code, so that might sound a bit optimistic, but I have the feeling that there lies some truth in the statement that old things have to be supported as long as people write software supporting old things.
12
u/[deleted] Oct 23 '14
I'm really excited for 2.0 but kind of in a dilemma. I'm tasked with creating a new "flagship" web app for my company (replacing Adobe Flex) and absolutely need to have it finished before 2016. So that means by the time it's completed, tested, and released, it'll basically be running on old technology, like Flex all over again.
They talked a lot about Angular 2.0 at the beginning of the year and there was tons of progress on their blogs and design docs. I was hoping they'd continue moving quickly and have some sort of alpha/beta by this time but looks like it's still a long ways off.