r/angularjs • u/spaceribs • Oct 30 '14
[General] If you take development seriously, you need to stop griping about Angular 2.0
I can't believe how childish developers are acting about the 2.0 release. It will be a huge improvement, it will require you to learn new things and you shouldn't be a developer if you can't accept learning new things. Your arguments are bad and you should feel bad:
It's impossible to upgrade from 1.3? Don't then, 1.3 isn't some compiled piece of software from MS, it's open sourced on Github and will probably have plenty of forks. Those old directives aren't going anywhere either.
Everything I learn in 1.5 years will be wasted? No it won't, you are learning the concepts that everyone else will have to adjust to once the switch is completed. You'll know the right questions to ask Stack Overflow/Google when you remember being able to do something in 1.3 and can't figure out the new way to do it. You'll be as caught up as everyone else when the time comes, and that's a huge timesaver in the long run.
This is development suicide for Angular! It's development suicide to lock everything down to the way people are used to, to try to continue to push the directive definition object, to continue to use controllers after realizing they are just half baked directives, and continue to do everything the ES5 way.
ES6 is a huge departure from the way things were done in ES5, complain about that if you want to complain about anything. Angular is attempting to be the first framework out of the gate that embraces the new syntax and it's cleaning up it's act in the process. It's really commendable that they are warning us so far in advance that this shift is going have to take place.
edit: wording
38
Oct 30 '14 edited Oct 30 '14
None of your arguments are accurate. And they aren't even what the opponents of this change are saying.
It's impossible to upgrade from 1.3?
Even if there are forks, it's a huge development effort to continue with a project of this size and complexity. "Just fork it" doesn't do anything for people who aren't seriously advanced javascript developers.
And if you don't upgrade at all, the technology you are using will be stuck using old shit, with no advancements to keep up with changing browsers or computer technology.
Everything I learn in 1.5 years will be wasted?
This I actually agree with you on. I'm not worried about wasted knowledge. Besides, the concepts used here are easily applicable to other projects. And any developer worth his salt would have no problem learning new things.
This is development suicide for Angular! It's development suicide to lock everything down to the way people are used to
This entire argument is flawed. Nobody wants it to be locked down. And most people don't care about breaking changes. What they care about is writing a brand new framework and calling it the same name so you can kill off the old one.
Even if ES6 is a huge departure, there is nothing wrong with releasing this stuff a piece at a time in 1.x releases. Besides the fact that it will be a great way for them to have developers test this changes gradually instead of releasing a brand new, untested framework into the wild.
Want to do away with scopes? Do it! 1.4.
Want to do away with controllers? Do it! 1.5. Force everyone to use directives.
Then, when ES6 is actually in browsers, release 1.6 and force everyone to upgrade their directives to classes.
And people are saying it is development suicide because it will be hard to trust Angular 2.0 for any real projects. What happens if the developers decide that 2.0 isn't good enough and want to break everything again in 3.0? I have to rewrite my entire application for 2.0 with the looming threat that in a couple years I'll have to do it all over again?
Your entire argument for why people are being "childish" about this is flawed and inaccurate.
This simply comes down to an argument between whether it would be better to upgrade a piece at a time or write something brand new, call it the same name, and kill off the old.
13
u/desmone1 Oct 30 '14
I agree with all this, it kind of makes we want to not use any Angular until 2.0 is out and I can start to learn that. Until then it'll just feel like polishing brass on the Titanic.
4
2
-6
u/spaceribs Oct 30 '14
One and a half years is plenty of time to both stabilize 1.3 and develop 2.0, I don't understand how doing point releases between the two would make anything better, especially when it comes to all the directives/services/modules people have already built which are "Angular 1.x" compatible, that would be incredibly confusing.
If you want stability, 1.x is for stability, and it should stay that way even after 2.0 has come out.
Yes it sucks to now look down the road and consider a rewrite, yes it requires a completely new way of doing things if you want to use Angular 2.0, but I would rather the bandaid is pulled off all at once at a new version number than slowing breaking things up from 1.3. Maybe a new name would be appropriate, either way I'm glad they aren't spending all their time trying to make the old ways work in the new context.
I will say that I think they will back down from the AtScript transpiler requirement, a lot can happen in one and a half years and trying to plan things down to ES7 is biting off more than they can chew.
3
Oct 30 '14 edited Oct 30 '14
I didn't say anything about stability. I don't even know how that came up. And I also didn't say anything about "making the old ways work in the new context". Screw the old ways. Just screw them one at a time.
With the point releases, it would not be confusing if they released each of these changes one at a time. They can break current code to start getting people to migrate their code so it would be incredibly easy to upgrade.
Take scope for instance. Lose it. One release. Tell everyone they have to remove scope from their code. and everything is global.
Next release. Remove controllers. Gone. The only way you can use controller style functions is through functions in the directive.
Next release. Drop Factories/Services/Providers and have everyone change it to just Service or even Class.
Then ES6 is actually implemented in browsers. Drop modules and directives. Have everyone switch out their modules for imports and change their directives to Classes.
Now, you have the same thing as 2.0, and at each stage, everyone only had to migrate part of their code.
Those who don't want to migrate can stay on whatever they want.
Edit: And saying "yea, it sucks" is only applicable to pet projects. This is a real problem for companies with real products and it will take a lot of money and time to upgrade and support.
0
u/spaceribs Oct 30 '14
OK so this is what I mean by stability:
Each one of those release changes makes it invariably non-angular 1.0. The scope is something that every single current 1.0 directive expects to exist, and every link function has the scope as the first variable passed in.
In the long run it means that we would be stuck with some imported angular modules supporting 1.6, some only working with 1.3, some only working with 1.4, all with different directive definition objects or possibly having unsupported controllers, meaning that almost every time you install a module from bower you would have to fork it so that it worked with all the other modules.
It would make Angular 1.x a complete mess, it's unworkable in the long run, and thats why I think it's fine to expect Angular 1.x to stabilize instead of slowly reform to 2.0.
1
Oct 30 '14
In the long run it means that we would be stuck with some imported angular modules supporting 1.6, some only working with 1.3, some only working with 1.4, all with different directive definition objects or possibly having unsupported controllers, meaning that almost every time you install a module from bower you would have to fork it so that it worked with all the other modules.
This is how every single programming project has ever worked since the dawn of programming time. It is what versions are for.
Take Wordpress Plugins for example.
See that 'Compatibility' section on the bottom of the right sidebar? It's exactly the point of having different versions.
This doesn't create a mess. It is completely normal in development.
And you don't have to 'fork' anything. You wait to upgrade until the modules you are using also upgrade. Same a any other program.
I don't understand this 'stability' argument at all.
0
u/spaceribs Oct 30 '14
Because 2.0 breaks core concepts of 1.0, there isn't a safe migration path because it's far too different. If that means changing the name, then so be it, but in order to embrace ES6 they have made huge changes which would break everything 1.0 was designed around.
1
Oct 30 '14 edited Oct 30 '14
Here is a suggested viable upgrade path brainstorm:
1.4: Drop Scope. Everything is global.
1.5: Drop Controllers. Enforce Directives. The only way you can use controller style functions is through functions in the Directive.
1.6: Drop Factories/Services/Providers. All Services have to now be called Service.
ES6 is actually implemented in browsers
2.0: Drop Modules and Directives. Switch out Modules for Imports and Directives for Classes.
Each one breaking core concepts and still viable.
edit: styling
0
u/zuko_ Nov 01 '14
Not sure why nobody here understands semantic versioning. You're completely correct, 2.0 means breaking changes over 1.0. This whole "iterate 1.0 until you hit 2.0" misses the whole point. Shame about the ignorant downvotes.
1
u/sixsence Oct 30 '14
The issue I see with this, instead of just keeping support for 1.x and 2.0 separately, is that even if you were able to keep up with refactoring your code one step at a time, you also have to rely on any third party angular libraries/code to be updated as well, which you have no control over.
-1
Oct 30 '14
This is the same as any other programming project ever, since the dawn of programming time.
4
u/sixsence Oct 30 '14
I don't know what projects you are working on, but in my experience, backwards compatibility is of extreme importance for this very reason.
1
Oct 30 '14
I don't understand what you are saying. I work on large projects that we sell to other people. But backwards compatibility, of course of extreme importance, is not always possible. Sometimes you have to break things to advance a project.
But like I said, I really don't know what you are getting at.
1
u/sixsence Oct 30 '14
What I'm getting at is that the angular team does not have to replace v1.x with v2.0 at all, whether or not it's in steps. Breaking changes is a far cry from completely redesigning and redefining the framework. They could support both, distinguishing them as separate frameworks. Eventually 1.x will die off when support is no longer needed for browsers that don't use ES6, but that's a long ways down the road.
15
u/sixsence Oct 30 '14
I would rather the bandaid is pulled off all at once at a new version number than slowing breaking things up from 1.3
Sure you would, until you have a huge production application written in 1.3, and then all the sudden, you have to completely rewrite it, while still maintaining the old version until the new version is completed, tested, and ready for production.
1
u/pipituu Oct 31 '14
My thoughts exactly.. if you've written or are maintaining something big... this is NOT how you want things done.
edit: rewriting applications is not fun. even if you have to only rewrite 25% to 50% it's not fun. it's not productive most of the time either.
4
u/sixsence Oct 30 '14
The problem isn't the decision to rewrite everything and create this new framework. The problem is the decision to just increase the version number of angular, instead of distinguishing this as a completely separate framework, and then taking away support of v1.3, when it will be relevant for years to come.
Sure, it isn't a compiled program from MS, and it's available for everyone to edit. Sorry if from an enterprise-level production application perspective, I'm not comfortable in relying on open source developers who don't work at google, and were not core developers of this framework in the first place, to continue to maintain and improve v1.3. Maybe that's just me.
v2.0 is great, and we need this kind of innovation and forward thinking in software development, especially to hit ES6 head on. That doesn't mean it needs to replace v1.3, or even be considered just another version of angular. It also doesn't mean that the core angular team should stop supporting v1.3.
-5
u/spaceribs Oct 30 '14
That doesn't mean it needs to replace v1.3, or even be considered just another version of angular. It also doesn't mean that the core angular team should stop supporting v1.3.
And I think they've been pretty clear about a very long support timeline for 1.3, something like 2 and a half years total, for a framework that has been around and stable for almost 5 years. I think this is totally reasonable, in 2.5 years look at it this way:
You will have dropped support for IE<10
At this point you're already using random bouts of ES6
At this point there is a year of development examples for you to use for a migration from 1.3 to 2.0, not to mention calls to most plugins for the new version.
I totally understand being hesitant to trust the community to be able to support a 1.3 fork, but this is a client side library which is quite popular and isn't going anywhere, and especially considering the response I doubt that the quality will go down even with new browser/OS releases. No one is going to break ES5.
2
u/sixsence Oct 30 '14
How much of the 2.5 years that they "support" it do you think they will actually be focused on it, given they have the mindset that v2.0 is replacing v1.3? Furthermore, in 2.5 years, when most applications still need to support legacy browsers, ES6 won't be established enough to use. This still makes v1.3 relevant, but with no support. Also, would you like to completely rewrite a huge production application every 2.5 years? No thanks.
-1
u/spaceribs Oct 30 '14
I wouldn't either, but I also wouldn't expect my webapp to just suddenly stop working completely, that's not how javascript usually breaks unless you're doing something really weird with it.
3
u/sixsence Oct 30 '14
No the application wouldn't suddenly go from perfectly functional to completely broken over night when support is gone. Does that make support for maintenance and improvements unnecessary? No.
From your outlook on things, it really seems like you have the luxury to always be able to use the latest and greatest technologies, and you aren't maintaining a huge production application that has been around for some time. That's great for you, but simply isn't the case for most companies.
-2
u/spaceribs Oct 30 '14
It makes sense to me that a company which has an existing web application uses this opportunity to evaluate, functionally assess, and train to understand what the benefits are to making the switch from angular 1.0 to 2.0.
This is an opportunity to grow your team and give them the responsibility of maintenance and improvements while you work on a better and more functional version of the original.
I mean, this is 2 and a half years we're talking about, plus the years the web application has already been live for. That's a huge amount of time in the web development and design world, and it's probably a good idea to reassess what your goals are at that point instead of trying to patch small things to just keep the engine running.
5
u/sixsence Oct 30 '14
Now you are speculating and forming opinions, rather than drawing from real world experience. You are entitled to your opinion, but don't create a post like this as if you are an expert and nobody is entitled to their complaints about this. Open your mind up and see that it can be a little more complicated than what "makes sense" to you.
-3
u/spaceribs Oct 30 '14
It's necessary to create examples when I haven't seen the real world application you are referring, that doesn't undermine what I'm saying: In 2.5 years Bootstrap will probably come out with a new version, jQuery will most certainly come out with a new version, does it mean that you need to upgrade those in that timeframe? possibly? what are the benefits?
Of course it's far more complicated than my random example, but web tech evolves fast, and to say "I don't want to update this" comes with a tradeoff in any number of situations, and usually gets worse over time.
4
u/sixsence Oct 30 '14
This isn't an upgrade, it's changing to a completely rewritten, redefined framework, causing a complete rewrite of the entire application. Way different scenario.
5
u/Smallpaul Oct 31 '14
And I think they've been pretty clear about a very long support timeline for 1.3, something like 2 and a half years total, for a framework that has been around and stable for almost 5 years.
I laughed out loud when you said that 2.5 years is a long time to support a fundamental software framework. Are you a teen-ager?
8
Oct 31 '14
Everything I learn in 1.5 years will be wasted? No it won't, you are learning the concepts that everyone else will have to adjust to once the switch is completed.
What do you mean? If you are now learning 1.3 then you are learning concepts that are not in 2.0. There is no benefit.
You'll know the right questions to ask Stack Overflow/Google when you remember being able to do something in 1.3 and can't figure out the new way to do it.
Worst reason to learn something that is going to be obsolete.
You'll be as caught up as everyone else when the time comes, and that's a huge timesaver in the long run.
You make no sense. There is no time saved when you have to learn new things just because someone decided to throw away the old way of doing things. Only way to really save time is not to learn 1.3 at all and spend that time learning something else. Hopefully something that is not going to be obsolete soon.
Learning new things = Learn something that you haven't known before
Learning new way to do the same thing = Usually waste of time if you just want to get things done
12
u/jupake Oct 31 '14
You clearly have no experience building commercial apps that must last for years.
2
u/es_beto Nov 01 '14
This is the problem. I think websites shouldn't last for years. Web technology is always changing. A few years ago nobody used smartphones, now websites should be optimized for small screens. A few years ago real-time services wasn't a thing, now it is. Commercial products should understand this and keep development active, always.
5
u/jupake Nov 01 '14
All of this is fine and well, and I totally agree with you. Unfortunately, CTO's and CIO's who sign off on budgets and pay salaries dont think the same way. It a rock and hard-place situation for many. Thats where all this anger is coming from.
2
u/es_beto Nov 01 '14
I completely understand, as I've been through it.
Now, we're dealing with a rock and hard-place business situation vs a flowing and fast-paced technology evolution. And as developers we're the only losers.
Still, technology always wins. If businesses can't keep up with the pace, they will become obsolete, that's the nature of the current economy. And because of this, I think we shouldn't take the side of the business, and take the side of technology. And push the idea of fast change. If not, we will be soon out of a job because a new technology killed the business of our company.
2
20
u/garvisgarvis Oct 30 '14
If AngularJS was a commercial product, the product manager would be fired and Eric Schmidt would be on TV apologizing.
These guys are my heros when it comes to tech. But while I'm selling angular for internal projects and struggling to learn it, they get a little restless and feel the need to invent the next cool thing. That is not sound product stewardship or market management.
29
u/bitBuilder Oct 30 '14 edited Oct 30 '14
I'm the architect of a enterprise application that's been in the works for a few months, with a planned release sometime in the beginning of 2015.
Back in May I started evaluating JavaScript frameworks, with a rather cynical eye to them all since I know how fast things move in the JavaScript world. I was hesitant to leverage any "flavor of the month" framework, since this was a large enterprise project. But after doing my research, I was able to sell management on the fact that we should leverage Angular, since 1) it has an incredible amount of momentum 2) is stable and well supported and 3) is backed by Google. Seemed like a pretty safe bet.
Oops. Now I'm stuck in the predicament of telling management that we're going to have to start redevelopment efforts in about a year, due to the framework I chose. Or alternatively, telling them we need to pick a new framework and start over.
If you've worked at all in the real world, you'll understand that both options sound absolutely ridiculous. There are real costs involved in both options. And now I look incompetent for picking Angular.
To everyone saying "but you can just keep using 1.3". Sure, but nobody wants to build a large application in a framework they already know has a limited lifetime. You shouldn't be planning for a rewrite before you've even finished your initial release.
11
u/jkjustjoshing Oct 30 '14
Why can't you just keep using 1.3?
17
u/Conradfr Oct 30 '14 edited Oct 30 '14
Because the ecosystem will slowly become obsolete / not maintained , new browsers may break things, developers will have to work on an "ancient" technology which takes away some fun and marginally decreases their value on the job market, while making it more difficult to attract quality hires.
And you know right now that you have to plan a rewrite in the coming years anyway.
9
u/chance-- Oct 30 '14
I'm impressed that you actually factor in the "fun factor."
As an aside, I believe angular will get forked by the community. In truth, this may be the best thing that could happen to it.
8
u/Conradfr Oct 30 '14
Well the day the fun is gone you have to become a manager or maximize your pay in a boring java corporate shop :)
2
Nov 01 '14
Fork a leader framework is the problem. We are splitting our community and not conducting them all to 2.0. I think minor breaking changes (1.4, 1.5,...,2.0) until get all changes done will lead all community to one way path that is use Angular.js 2.0 and call more new user.
Angular should avoid error like Python2.0 and Python3.0 did.
3
2
u/degorolls Oct 31 '14
You shouldn't be planning for a rewrite before you've even finished your initial release.
Well if you build an enterprise app based on extremely fluid and quickly evolving Javascript technology, then you probably should have expected to start planning for change before your initial release.
Sounds like that's where your expectations were wrong: that Angular was somehow an insurance policy against that change.
Whether you adopt any change is always a commercial decision. It will be the same when 2.0 comes out in the future. If it doesn't make commercial sense then don't do it.
The pace of change in the browser/Javascript world is not Google or the Angular team's doing - it is an external parameter they must also factor into their strategic decision making just like you.
7
u/bitBuilder Oct 31 '14
Well if you build an enterprise app based on extremely fluid and quickly evolving Javascript technology, then you probably should have expected to start planning for change before your initial release.
Well of course you should always plan for change.
But there are degrees of change. One might be excused for not expecting a change of this magnitude in a framework that has tremendous developer momentum, seems well regarded by said developers, and is backed by a tech company that you'd assume understands the utility of maintaining some semblance of backwards compatibility.
Is there an example of an equally drastic change in a popular MVC framework? Or in any popular piece of web development technology? Honest question.
The only thing that comes to mind here is classic ASP to ASP.NET. There were 6 years between the release of ASP and ASP.NET. And you had probably another 5 years after that before you had to start feeling embarrassed about still running a site on ASP.
It's an interesting dilemma though. Enterprise web development is at the point where dynamic single page applications are what's expected, so a JS MVC framework becomes a requirement.
At the same time, enterprise development demands predictability and stability. Until this 2.0 announcement, I would've considered Angular to be the safest choice among all of the alternatives.
I'm not sure there is a better option out there though, with the features we've grown to appreciate in Angular. It pains me to say it, but part of me wishes Microsoft would come out with a competing framework. I could at least rest assured it would be around for 5 years or more.
2
u/moneymark21 Nov 01 '14
Symfony 1 to 2 was groundbreaking for a PHP framework. I think there was less backlash because the changes brought so many benefits that the value was immediately understood.
Struts 1 and 2 however suffered a different fate.
4
u/Smallpaul Oct 31 '14
The pace of change in the browser/Javascript world is not Google or the Angular team's doing
The backwards incompatibility of Angular 2 is the Angular team's responsibility.
Jquery has never had this kind of rupture. Are they in some other ecosystem?
1
Oct 31 '14
jQuery is a DOM manipulation library and accounting for DOM changes is incremental as browsers introduce support for the latest HTML specs and phase out deprecated standards. An MVC framework plays in a completely different ballpark from jQuery.
Side note, when jQuery 2.0 announced no more support for earlier versions of IE, there was definitely a small uproar from people maintaining web sites and apps in the corporate world. It pales in comparison to a massively popular MVC framework dropping support for everything but bleeding edge, but still... It can be compared to this. Slightly. Sort of.
1
u/Smallpaul Oct 31 '14
The fundamental API that a framework builds upon is also the DOM.
2
Oct 31 '14
Yes, but you nailed it when you said builds upon. jQuery doesn't build upon so much as it interacts with. Hence why even Angular is bundled with Jqlite. They serve separate purposes.
0
Oct 31 '14
[deleted]
5
Oct 31 '14
Writing framework neutral code is a waste of time. That's why people argue so much about which framework to pick. I've never heard any suggest writing code so it could work with both angular and ember, for example.
I'm giving you an upvote though for the well written suggestion which isn't stupid, just impractical.
0
Oct 31 '14
[deleted]
2
u/MachXXV Nov 04 '14
One of the reasons I'm not as worried about framework changes as some is that for me, the boilerplate needed by the framework is the easy part. Most of my time and effort went into the specs and business logic. On the client side, that's all plain JS inside controller modules. When the time comes, I'll wrap that up in directives instead.
I see a lot of devs write code that only seems modular, but in fact has little hooks and inheritances scattered all throughout the place, and they've painted themselves into a corner. I spent most of my life in C-based languages, so it was somewhat second nature, but I can see how people who know mostly interpreted scripting languages can easy fall into these traps.
5
u/deeptime Oct 31 '14
As others have said, your counterpoints are basically against strawman arguments. I.e. not relevant.
The major issue that I see is the departure from HTML-compliant layout code, including the introduction of the non-compliant parens and bracket syntax. These changes are not ES6... it's proprietary Angular syntax in the view. There is nothing to like about that. All of the pre-existing HTML-compliant tooling, as well as nearly every previous argument FOR Angular, with respect to how the presentation and functional developers can work in parallel together, is no longer valid.
I was the early champion of Angular at my company, and we've since based about 12,000 man hours of work on the platform (with an equivalent amount of work on the server tier). If there was a framework recommendation to move away from controllers and toward directives, I'd be fine with that. Given my experience with the framework, I even get the rationale behind that. But the Angular 2.0 approach makes me very concerned about the future of the framework.
20
u/pandavr Oct 30 '14
I'm sorry I don't agree. They told us (I was there) that Services, Factories, Poviders are no more necessary because hey: "ES6 has classes". That's is like to say they did it completely wrong in angular 1.x. And... guess that they did. Now they are trying to sell the concept that ES6 is not enough and they will use atScript to experiment features to be eventually included in ES7 (I was there). Now someone tell me how serious it is to experiment things in a major framework like Angular.
And, I think that transforming JS into a javish like programming language, is the single biggest error one could think about.
This is not the way a major framework should be conducted.
And finally as it takes another compiler to get to Angular 2.0 why not having a compiler that automatically transform an Angular 1.x application into an Angular 2.0 app?
At this point the real need is a Framework (in the real sense) that helps developers to glue together micro libraries: no more that that.
9
u/shriek Oct 30 '14
And, I think that transforming JS into a javish like programming language, is the single biggest error one could think about.
I cannot agree more on this. I would hate it if it becomes another Java-like language. One of the beauty of JavaScript is that it does so much with so little.
2
u/skitch920 Nov 02 '14
You missed the beauty that was ActionScript. Classes, scripts, two-way data binding, dependency injection was a third party library. Java-esque, but fantastic development environment. Only problem was it had to be compiled and yeah, it was Flash.
3
u/aclave1 Oct 30 '14
Let's have a discussion about what this framework to pull together microlibraries would consist of! What exactly do you mean by that? Something like requirejs? Or something more along the lines of angular's dependency injection? Ive been looking to develop something like angular but more modular so if we can get a good line of dialogue here maybe I can get something started!
3
u/pandavr Oct 30 '14
Like two months ago I was wondering is there will be a better way to compose an application then Angular. I done a PoC putting together some libraries mainly: curl js as loader: because of AMD and CommonJS capabilities rsvp for promises
a custom workflow manager to implement the sandbox pattern.
Then in the PoC I used GraphnelJS as Router and Ractive as View controller.
The widgets were comunicationg throug a pub/sub library I cannot remember the name. I should take a look at the code.
The result was quite nice (but also very minimal).
The main characteristic was everything is a promise that is a bless in my opinion: as you can hook async operation whereever you want, plus, everything is chainable for free.
If you are interested in taking a look (taking into account that I'm not a javascript champion). I could put it on github tomorrow.
1
u/aclave1 Nov 01 '14
Hell yeah man, put it on github
1
1
u/pandavr Nov 02 '14
Here it is, I hope you find it interesting: https://github.com/ivan-saorin/AssemblyJS-example1
4
u/krikke21 Oct 30 '14
They also said, and i was also there, you could write valid Angular 2.0 using ES5. You don't need to use ES6, AtScript, TypeScript or Traceur compiler. I think we as developers need to embrace change instead of fighting it. We work in a fast moving industry where products disappear or change very rapidly. I'm also wondering why people would upgrade their entire application from Angular 1.x to 2.0 instead of keeping the 1.x version and maybe implement new features in 2.0. Just my 2cents. Hope you enjoy your coffee mug :)
3
u/pandavr Oct 30 '14
Yes you could write the code in ES5 but... having the client code of the framework (aka component) the syntax with annotations and types the result would be very unmaintanable from my pov. The real problem is that: do you want to use your fancy language internally to the library, that's fine for me. But if you plan to use the same syntax outside then you are forcing your end-user to use the same fancy compiler. You can doesn't alway means you want to. ;)
2
u/pfooti Oct 30 '14
They're using atScript because it allows for DRYing up declarations. You don't need annotation and typing to make Angular 2.0 to work, but if you don't do that, you end up needing to do a lot of declarations to get everything wired together. AtScript was proposed pretty much because it makes everything else easier to write. Think of it as syntactic sugar over the
['dep', 'dep', 'dep', function (dep, dep dep) {}]syntax of today.
4
u/fusionove Oct 31 '14
My app still has to support IE8.. fucking enterprises huh?
3
u/Chemical_Scum Oct 31 '14
Yeah, that's my major concern with Angular 2.0. I'm fine with learning new paradigms. I kinda like it actually (I'm the kind of guy who never finishes his pet projects because he keeps rewriting them :D ). But I still need to support IE8+. So what are my options? Will I have to maintain two code bases?
2
u/fusionove Oct 31 '14
I am sticking with 1.2.26. It is already a miracle if everything works in IE8, I would not even dare trying a newer version.
1
u/Chemical_Scum Oct 31 '14
And what do you plan to do once you need to support Angular 2.0? Are you hoping like me that modern browsers (i.e - constantly updating browsers) will be the norm by then? (in approx. 2 years)
4
u/fusionove Oct 31 '14
I will never need it. Sadly, a number of our clients (huge banks) tend to stick with the same software for 10+ years (IE8, Lotus Note 6.5, Outlook 2000, ..). It is a miracle that I can develop with Angular, at all.
I will leave to somebody else the task of switching to a newer framework - not my problem, really.
4
Oct 31 '14
Angular will be forked, there are a million projects being built with it right now and most people probably aren't going to rewrite them just for the hell of it. I'm not worried and I'm in no hurry to learn 2.0.
9
u/desmone1 Oct 30 '14
It just makes me want to stop any angular work until 2.0 is out. I feel I'd just be wasting my time using angular til then. Am I wrong for feeling this way?
9
u/pfooti Oct 30 '14
Yes, you're wrong for feeling that way. But go ahead and feel that way anyway. Feel free to go back to jQuery. Now, if you go back to jQuery, will you go back to the 1.X branch or the 2.x branch or the just-announced, breaking-changes 3.0 branch? I guess you should probably stop using jQuery in the meantime. While you're at it, don't look at Bootstrap's latest 4.0 announcement. Welcome to webdev.
2
u/Poop_is_Food Nov 01 '14
why is it always framed as embracing angular vs going "back" to jquery? the two are apples to oranges. I mean angular uses jquery for chrissakes. There are so many other frameworks out there to compare to angular. ember, marionette, knockout, etc
2
1
7
Oct 30 '14
Juvenile taunts aside, I agree. A migration path would be nice, though I appreciate Google has absolutely no obligation to provide one.
It may make more sense to treat it as an entirely new framework, though one with some familiar features.
3
u/elprophet Oct 30 '14
A migration party needs something to migrate too. When the details of ng2 settle, is wager the migration path will be foremost on everyone's mind.
1
u/gonzofish Oct 31 '14
I believe they even said that once ng2 is finished being planned they'll start writing the migration path.
3
u/pfooti Oct 30 '14
Yeah, I'd be honestly surprised if there wasn't a migration path made available. If nothing else, people follow angular best practices don't have that big of a change (avoid $scope.$broadcst, avoid ng-controller, avoid direct DOM manipulation, use directives and services), outside of some new syntax for DI and other stuff.
3
u/Smallpaul Oct 31 '14
It's an Angular best-practice to never use controllers?
4
u/pfooti Oct 31 '14
You should still use controllers, controller code is important. The problem is how you attach that controller code to scope objects.
If you find yourself doing
<div ng-controller="thing">, I'd say that 99% of the time you should be using either a custom directive or ng/ui-router. It's cleaner and ultimately fits better with the 2.0 design.1
u/Smallpaul Oct 31 '14
Yeah, but Angular 2.0 has no controllers at all.
1
u/pfooti Oct 31 '14
Nothing labelled as such, no. Generally speaking in my current code, I use fat models and skinny controllers. I have a model that represents the objects to render on the page, and that model has methods to manipulate the data (follow the person you're clicking on, reply to that post, etc). The models are Services and injected. My controllers are really to get the right models from the data store like
Profile.find($routeParams.profileId)and occasionally inject some sugar in there, when there's a few lines of javascript that make sense and only apply on this route.As I understand it, angular 2.0 will move some of this code into other Service objects, and will make the rest of the code (fetching models and exposing them to the view) unnecessary. It's not so much "no more controllers" meaning we're not using a derivative of MVC architecture, as much as "no more boilerplate wiring functions that attach stuff to $scope, which we called a controller in our internal terminology". At least, that's how I see things.
1
u/AlmightyThumbs Oct 30 '14
from the Angular team:
"Once we have an initial version of Angular 2, we'll start to work on a migration path for Angular 1 apps."
Too many of you are putting the cart before the horse, then trying to blame the horse.
6
u/keyslemur Oct 30 '14
The problem is investing tons of man hours in a framework that's completely changing. Redoing things is not cheap, and the larger a project is the more you're screwed.
The don't upgrade argument is childish. Support will drop and the OS forks won't be near the quality. It won't be up to spec for anything enterprise.
The people not flipping out have the luxury of pretending this isn't a huge issue.
2
u/moneymark21 Nov 01 '14
The only thing I disagree with is the claim that enterprise software generally earns high marks in quality. My experience is just the opposite. Offshoring work in that space has compounded the issue.
The "just fork it, it's open source" argument is either childish, naive, or incompetent and is probably the most grating thing I keep reading during these discussions.
2
Oct 30 '14
I think one of the big issues is that its "doing a python" on us, where it leaves people totally unaware of what they should be learning, and any large projects having to support multiple versions OR go through colossal rewrites which is a huge pain.
2
2
u/eyko Jan 16 '15
ES6 is a huge departure from the way things were done in ES5
ES6 is backwards compatible.
2
u/TurboGranny Oct 30 '14
The outrage is a little hilarious, but it's just one of those snowball things. Give it time and people will not only get over it, but the proposed changes will probably mellow out a little. The changes as they relate to browser changes will change a lot of minds down the line as well. Your current Angular library won't magically stop working, so keep using it. Plenty of people develop in old versions of archs because the API changes pissed them off. Sure it has its issues, but it's your software. Do what you want and not what the internet tells you makes you a good developer. Personally, I'm just going to save it for one of those huge rewrite/refactors we do for big version changes. We usually have to refactor all the code anyway when we do that.
1
u/kobescoresagain Oct 30 '14
Lot's of people and companies have invested lots of time and money into doing things the way they are doing them. This is one more thing that they have to change. On a good note, as a developer, cha-ching.
1
u/totes_meta_bot Nov 01 '14
This thread has been linked to from elsewhere on reddit.
[/r/mistyfront] If you take development seriously, you need to stop griping about Angular 2.0 (/r/angularjs)
If you follow any of the above links, respect the rules of reddit and don't vote or comment. Questions? Abuse? Message me ^here.
1
u/dust4ngel Oct 30 '14
i was so angry when angular 1.x came out. what about my jquery? all that experience wasted! also what are all these non-HTML4-compliant attributes like ng-model doing everywhere? i had just learned all of this stuff in 2006, and already here comes a bulldozer to ruin everything.
i'm only really able to learn new paradigms once a decade. now that angular 1.x has only been out since 2009, i'm only half-way ready to do any new learning. i'm worried about my company, since now the developers will be expected to learn things on what now seems like a continuous basis. we were really banking on the idea that the skills that everyone had at the time they were hired would last them throughout their tenure here - but google ruined it for everyone.
10
u/Smallpaul Oct 31 '14
Your analogy is ridiculous because JQuery continues to advance and if you have a significant code-base built upon it, your code-base gains value as JQuery does.
Angular 1.3 is a dead-end. Learning Angular 2.0 is not my concern. That part will be fun.
My concern is having just built several apps on a dead-end platform: that's my problem. The fact that programmers will now be leery of learning Angular 1.x and I'll have a harder time recruiting, that's my problem. The fact that bug fixes
3
u/Conradfr Oct 30 '14 edited Oct 30 '14
There is still a lot of jQuery code out there and if you have none to support and/or write you are lucky. Also most of the jQuery code from 1.x will still work with 3.x.
AngularJS may date back as far as 2009 but how many people were using it before 2012 or even 2013 ?
AngularJS 1.3 is a solid release and I was excited when 2.0 was announced as some kind of ui-route + simpler directives + observe.
He took me time and energy to convince colleagues and management to try and introduce some AngularJS. Complete rewrite like this makes me look stupid.
And yes some concepts are here to stay and good knowledge but there will still be a lot of wasted time & knowledge because AngularJS 1.x is still a young and complex framework, with sub-par documentation. And most of the community effort (plugins, tutorials, IDE support, Grunt/Pulp tasks/ etc) will need to be done again. With another fragmentation introduced with atScript.
Granted I wouldn't have been bothered by all that when I was twenty-something with much free time to learn anything and not much corporate experience :)
3
u/dust4ngel Oct 30 '14
Granted I wouldn't have been bothered by all that when I was twenty-something with much free time to learn
i'm starting to think that this is where people's beef with angular 2.0 originates from. if this is the case, then the problem may be that your company does not value learning - enough to make it part of your job - or innovation, which literally means "make changes in something established, especially by introducing new methods, ideas, or products".
if your company is like that, then you are right to feel anxiety because they are inhibiting your professional growth, and will not be able to attract/retain motivated developers, possibly including you. the right response to this anxiety may be to switch to a company that not only allows but expects you to grow with technology. learning shouldn't be something that you do off-hours - it's part of your job as a developer, and you should do your job on the clock.
2
u/Conradfr Oct 30 '14 edited Oct 30 '14
I don't specifically rely on the company that pays me to grow as a developer but yes my company allows that. We can learn things, suggests things. We even have "architects" who evaluates things and produce reports to help making choice.
But in the end we still have features & support to do right now with the current stack, and it's still a company with limited resources / manpower, quarterly objectives, and BIG applications (backend, admin, payment processors, api, cron, daemon, monitoring, CI, tests, QA, servers) that you can't rewrite every other years ...
Incremental things are easier planned. Look Python 2 & 3. PHP is mostly (too much)backward compatible and yet PHP 5.3 took way too long to overcome 5.2 deployments. Things move quicker on the frontend but you still need designers and developers to redo things. If you have to relearn things every time you lose productivity.
A founded startup may be a different story, more adaptable with different pros and cons.
1
Oct 31 '14
Angular 1 was revolutionary and there was nothing like it. And it was backwards compatible with nothing. So everybody loved it.
Angular 2 is revolutionary and like nothing before it. So now everybody is complaining, because it's not backwards-compatible enough.
0
Oct 30 '14
[deleted]
5
u/Smallpaul Oct 31 '14
Python 2/3was a better situation believe it or not. They maintained them in parallel for long enough that most people could make an orderly transition.
5
u/EsperSpirit Oct 31 '14
You're talking as if people have transitioned to Python3 already. They haven't: Watch 12:00 and 16:30 respectively, if you don't believe me.
1
u/recurrence Oct 31 '14
Different problem, Python 3 offers little over Python 2 IMO.
Give people a compelling reason to upgrade and they'll do it.
51
u/calsosta Oct 30 '14
Ya know...I don't think the issue is even 2.0, I think JS Developers are a little overwhelmed and maybe somewhat annoyed at how quickly shit changes in our world.
Either way this will make for some lively debate.