I'm so out of the loop… Feels like a week ago everyone talked about how cool and performant v2 will be when it's finally out of the beta and officially ready for production, and now there is v4 release.
It makes breaking changes that might break some users. That is following semver. Semver doesn't follow backward compatibility in the major number, it follows potential breaking changes that will impact downstream consumers.
Aka when in doubt, increment leftmost, also we won't tell you wether we did a complete conceptual overhaul or just found a corner case that is provably incompatible. And I really thought it would be good.
All of the Angular modules were 2.x.x with exception to the router, which was version 3.x.x.
So to keep all of them at the same major version, they pushed everything to version 4.
Also, the jump from AngularJS (1) to Angular 2 was drastically different. Going from 2 to 4 however is much less significant in terms of breaking changes.
You won't have to relearn hardly anything if you already know 2.
"Angular 1" is now known as Angular.js and is effectively at the end of its line.
Angular 2+ is now simply Angular. All new releases follow a naming of version X.Y.Z where X indicates breaking changes, Y non-breaking new features, and Z is bug fixes.
Version 3 is being skipped over due to poor naming of the related Angular Router lib.
A breaking change in your dependencies is a breaking change for you. If it weren't, minor version upgrades would cause you to pull in incompatible dependencies.
This is why keeping your dependency list as tiny as possible is imperative.
Wait, I'm confused. Say I'm the author of a library. Some of my dependencies had breaking changes, but they didn't affect the users of my library, as it's handled in some method.
Should that be a new major version of the library?
The sensible default answer with no context is: bump your major version as well.
The more nuanced answer is that it depends on your packaging system and your language runtime. If either cannot handle more than one minor version of a dependency at the same time, you need to bump a major version. The problem is that the code that uses your library might also indirectly be using that dependency, but pinned to a different major version. This means that the application is broken even though the breaking changes aren't used by your library.
Say, as the maintainer of banana-1.0 want bug fixes in carrot-2.0, so you pull it in and bump your minor version. And then an application updates it dependencies.
In some, though not many, systems, you can pull in two versions as if they were different libraries. But in almost all, you get a dependency conflict and apple will be broken.
Even if you can juggle two dependencies of the same library, you need to make sure there wouldn't be any logic changes that would break the system or even corrupt data (!).
Anyway, it's simpler to be conservative and bump the major version. Yes, that can be a pain. But, again, it's good to keep your dependency list small or at least very boring to keep that pain to a minimum.
I think the distinction is that a breaking API change breaks some of your code, a backward incompatible change breaks your entire codebase -- i.e., fix a few method signatures vs refactor your entire codebase.
You've got it backwards. If you make a breaking change, semver requires you to bump the version number. There is absolutely nothing in the semver spec requiring you to make a breaking change when you bump the version number.
The spec only specifies one of those directions, you're free to bump the major version for any change if you feel like it. Doing so would make your versioning scheme much less useful, but it's not actually breaking the semver rules.
There's also nothing in the spec that stops you from taking a very conservative view of what constitutes a "breaking change". There are many types of changes that may be backwards compatible and you're mostly sure shouldn't break anything, but you want to signal that it might just in case. What constitutes a breaking change that warrants a major version bump is a subjective problem left to project maintainers.
Totally agree, and I think that's what's going on with Angular. Bumping the major version for a set of modules also communicates that you really should be using 4.x of all these modules together rather than mixing and matching with 2.x, even if some subset of them are technically backwards compatible.
I'd like to interject for a moment. Before using vanilla-js, have you tried Svelte, the magical disappearing UI framework? It compiles/transpiles your JavaScript to... vanilla JavaScript and it literally "solves the JavaScript bloat crisis".
Someone on hackernews said it would be the future!
1) I'm still new to this, but why would someone not use Angular Universal/why is it not default? I have only read positives, but am sure there must be a reason.
2) Why do we need Angular Material 2, when Google's official Material Components Web project is meant to be used with all kinds of frameworks and even has framework integration examples with Angular2: https://github.com/material-components/material-components-w...
3) Should I follow Quickstart or CLI Quickstart in the docs to get started? I have heard that the CLI is recommended nowadays, but the Angular 4.0 release blog says the CLI isn't even stable.
1) the core of Angular Universal "graduated" into @angular/platform-server with 4.0 - previously it was a more experimental project. We're officially supporting a "renderToString()" API that can be used however you like.
So really, it's brand new, and we're excited to see what the community does with it.
Philosophically, pre-rendering every SPA server side isn't a silver bullet. For a ton of cases it makes a lot of sense, but we want to avoid the impression that we're positioning SSR as a replacement for making your app fast.
2) The expectation of the Material Components Web project is that everything be "wrapped" for the specific framework. Angular Material is native Angular, and we have a team dedicated to that. Polymer has a material suite as well, and most of those components can work in Angular apps too. Components for everyone!
2a) you're asking a Googler that question. We have like, 11 messaging apps. I don't know what to tell you.
3) CLI went stable today, with its 1.0 release. We'll be moving the docs over to use the CLI everywhere soon - personally, i'd use the CLI to generate a new project and then follow along the tutorials.
Because Angular was the only real choice for awhile. That's like saying PHP is still bigger than you think because half the web runs on PHP but that is old legacy shit. Almost othing new and serious is using it.
I didn't want to sound arrogant. But when Angular 2 was released the whole web broke down in anger and had questions like this. So there are a lot of good answers on StackOverflow and other sites.
So my answer to the question was something like: "You can find a lot of info by Googling it".
We have a huge Angular 1.x app, but after hiring some new developers for our team we found the pool of React devs was huge compared to Angular devs. So much developer goodwill and mindshare has been lost.
After carefully evaluating the technical aspects of Angular and React and externalities like the above, we decided to start building new software with React.
Angular won't go away overnight, it will see a very steady and slow attrition, with developers themselves leading the way.
I also skipped Angular 2 and moved to VueJS. Never been happier.
But I was responding to "You had it, and you blew it. Most people aren't going to use any version of Angular, now, and have switched to React and Vue."
When you look at the stats and look at other places online there are still very much people liking and using Angular. So it's not going away soon.
These fad shifts are inherent because there is little point in competing with 0 years experience in an established tech if the market will allow breaking changes.
Angular is actually better off with the break as new graduates may use it to replace vue as the new fad once vue has replaced react.
That's legacy projects I bet. Of course, big projects have to stay with a technology for at least 2 years, can't keep rewriting things every time a new framework comes out. In this case, they unfortunately picked a framework that was discontinued.
I talked to many devs who didn't accept a job because it was Angular instead of React.
That is purely anecdotal. There are a lot of companies and devs outside your circles that don't jump on the new shiny, and will continue to use Angular going forward.
Good to read this comment because I definitely feel this way too. Angular 2 just made things weird and confusing for everyone, experts and newbies.
Even though there are some things common but the differences are just too many. It would have been better if it was just release under a different banner altogether.
Angular 2 is a different framework, plain and simple. You can continue to use AngularJS 1.x if you were on that framework.
I understand the frustration of someone who has used AngularJS 1.x. There is not really a straightforward and low risk path to upgrading a production app.
But that is like saying there is not really a straightforward risk to switching from AngularJS 1.x to React. They're different frameworks. AngularJS is different from Angular.
In my opinion the Angular team has created something really special with this new framework. I think it falls into a category of its own, very difficult to compare it to something like Vue.
I always figured it was to give the illusion of stability and continuity (ironically). Like "Angular has been out since 2010, before React and Ember" especially since a common criticism of Google is that they frequently abandon their projects.
You can't get people to adopt your framework, stop developing it leaving millions of projects in shit, and then expect people to do it all over again.
I'm glad that Google paid this strategic error dearly, having a huge percentage of people switching to React. Perhaps next time they'll think about it more deeply.
We're using the universal fork of the CLI with the recent AOT (client side) patch for a current project. Will my upgrade path be straightforward? The project is a simple content based website which consumes a ruby API that we had built earlier. We use universal for setting up meta tags, crawlability, etc.
Major release every 6 months, 2 major version deprecation policy.
There was definitely some initial pushback, but we hope to demonstrate with this release that it's a) not that scary and b) good for both developers and users.
Most devs should see significant reduction (upwards of 50%) in their output builds. We think that's a reasonable trade off for a couple hours of work to upgrade.
In this release, most developers should be able to simply update their dependencies and rebuild. We're aiming for regular, planned, minimal changes, rather than Big Bang style change from AngularJS -> Angular.
I think you're right. Probably something similar to how they changed Java from the 1.x to the 5, 6, 7... series. It did take a couple years for people to stop saying 1.5 though, as I suspect will be the case for people saying "Angular2" trying to find a way to distance themselves from Angular 1 but not really caring if some component was written for 4, 5, etc..
If my experience is any indication of general industry practices, businesses are very risk averse when it comes to upgrading libraries or dependencies as it usually triggers costly regression testing. At my current gig, we still run on angular 1.3.something and there is no way the business will allow us to migrate to v2 as we struggle to justify exactly what added value will we get from essentially a top-down rewrite.
> there is no way the business will allow us to migrate to v2
We as engineers should not accept this. Business should not be involved in technical decisions like library upgrades. Business and engineering should negotiation development scheduling, nothing more. This means what new features are worked on, what bugs are prioritized, etc. All remaining time should be up to engineering's discretion.
And if business has you working on features full-time, then that's a (really) bad business and you should find a more acceptable company to work for.
I dont't disagree with you, but after some years in the industry I noticed certain patterns in how businesses operate: as they get larger and stable they get more risk averse and more in love with legacy systems. But I never worked for Google or the likes, so maybe somewhere out there, the grass is greener :)
similar to your case, our product was also built on angular 1.x. However, we (and the product as well) have had a better fate in which we successfully convince the big guy to use React for any new feature that we want to build or code we need to fix. Now, we are having more and more react components, and lesser angular 1 code every day.
All hiring posts that are looking for "Angular 2" developers are now outdated and have to be switched to Angular 4 :) And recruiters will probably not understand that the difference between ng2 and ng4 is minor, while the difference between ng1 and ng2 is night and day.
And the person who eventually gets hired points out that this is impossible, he could not possibly have made more than the two years he has on Angular 3. And he must be really ahead of the curve, all the other losers who applied barely got that much on 2...
Most developers should be able to simply update their dependencies and rebuild. A few APIs have been deprecated, but they continue to exist and can be removed at a developer's leisure, per our versioning policy [0]
Lol, if only the real world were that simple. I have an Angular 2.4 project that when updated to 4.0.0 produces about 300+ build time errors (guess you can't access `private` members from templates anymore, it'll be fuuuuuun updating every component and template to work with "backwards" compatible v4), but basically every other version of Angular breaks your code so you just sorta have to live with it.
That didn't change between Angular 2 and Angular 4 - but maybe you changed your build process and are now running AoT with error checking? That would explain why your templates are now error checked and were not before.
I've been testing out 4 since it hit beta, and haven't had any issues. Code literally just works after updating to the new version with 0 issues, in my case at least.
Angular 1 to 2 was a complete rewrite with a change of paradigm, but 2 to 3 then 4 is just because semver (i.e. there may be some breaking changes, it's not 100% backward compatible).
With all people complaining about Java, we don't have to deal with this shit so often.
Most breaking changes I see on the JavaScript ecosystem seem like mostly cosmetic. It has been a rough road trying to make decisions on tech that won't get stale quickly and have support dropped in a 1-2 year frame.
Angular is really one of the worst offenders in this regard. What was so fundamentally broken with Angular v1's api that could not just be worked internally and incremented?
It also has ramifications which are pretty dire in my opinion. We have an app written with Ionic 1, so I go check out Ionic 2 see what's going on, and oh look such shiny things, how do we migrate? Nope, full rewrite of course.
There are some decision makers in these teams which are completely disregarding the fact they are burning through several work hours of people around the globe without real value.
Stop breaking things because new. Fine, use semver, but don't you change that first digit lightly, it hurts when you do.
I propose a variant versioning scheme that bumps the MINOR version for backwards incompatibilities and reserves MAJOR version bumps for subjectively "big" changes.
Huh, thanks for the info! Would you happen to have any hyperlinks to the discussions where people hated on the old scheme? I'd like to read up on this more.
But man, am I getting jaded about all this javascript framework stuff. Every 6 months stuff breaks, every 2 years there's a huge shift.
The problem with javascript I've been facing is value. Time and effort doesn't always correlate to what I get in the other end. In fact, I can say when building, going single-page is a time sink.
And it's almost always a mistake to go SPA first. Using a django or a rails lets you get the basics and data flow nailed down early on. Get into a framework too early and have a need to change something? Have fun explaining to your manager/client how costly it is to do a "simple" modification to a JS app when you have to throw the state you built it upon out the door.
What I want is a system tightly coupled into a server-side framework like a Django or a Rails that degrades gracefully and I only have to program the interactivity one time. Something that'd plop right into the asset pipeline/django compressor so I don't have to go outside of the framework to build.
Hundreds of hours of my life have been spent chasing this dream of sharing server side code with client side JS frameworks. That's what I need.
Meteor didn't do it for me. As for rendr, I've done stuff better with backbone/express in-house. As of 2017, I get my best bang for the buck using django and pjax. No joking, I went from full DRF + Backbone Marionette -> to plain old jquery and pjax and couldn't be happier.
All these new build tools (grunt, gulp, webpack... come on), ES versions (I was ok with ES5). None of these things are helping me ship stuff ahead of / on time and correctly. They're creating an even larger gap between the server side data, logic and templates and the JS interactivity.
If anyone is listening, I'd love to have a well-supported opinionated distribution of django or rails that just renders forms, tables, etc. with angular/react/etc. and degrades gracefully.
I'm actually really excited about Angular "2+" for something you've expressed here. I know that a React developer won't see this the same way, but I really feel like it's come down (for me at least) to either Angular "2+" or React - and whatever the reason someone is going to be on one side of the fence or the other. I've written smallish to largish programs in Vue, React, Ember, Polymer - and in all of those cases tried, wherever possible to do so in RXJS and Typescript. When everything else shakes out, I'm finding that nothing is coming close to the RXJS and Typescript combination "sweet spot". There have been various attempts to make a lot of the other frameworks "typescript friendly" but it's just nowhere near.
So why is Rx and Typescript so important to me? Well specifically those two are kind of like the drug that once you try them, you literally can't go back. I've been wanting this level of type checking for 10 years on the front end. I am not willing to lose it now. As for Rx, it's the one true way to do async flows. Promises and Callbacks just end up creating large pyramidic code.
I think Typescript can sometime have a mind of its own, but it's certainly an enrichment and with Rx everything just falls into place.
At this point it's hard to ignore that all the UI libraries are just paradigms and patterns, and how we use them is getting less important. These days I just want to write Component-style UI code, and I'll be fine.
Similarl things can be said about RxJS, but I think since it's a different level of abstraction, it will hit much harder, once it gains more traction. And it's already building up a solid community much faster than before. the only thing standing in the way of people learning RxJS is the same as Angular / Vue / React. It's scary and there's a lot of fatigue still. I hope that this year is thus going to be even better for teaching. ^^
Tldr; RxJS is going to be huge, if we can teach it more and JS fatigue calms down.
We've got some really cool ideas to make Rx really first class in Angular. It's already pretty deeply integrated, but with a little work, it'll be awesome.
definitely agreed! It's become one of the biggest "advocators", so to speak. But I think people will want to learn it as a default, async primitive in JS as promises now are. Not saying support from Angular and other projects and also companies doesn't help, since it makes it look less like a "scary, new thing", but I think more people should start to teach it's benefits to be frank and blunt about it ;)
What are they? I've been developing with the @ngrx suite, and it's been mostly pretty smooth, what more do you want? I would like to see a piece of documentation that lays out explicitly what happens when you pass around Observables. Hot ones, cold ones, when the auto-unsubscribe clicks in, whether
Yep, I realized and regretted saying that after I posted that - there certainly are typed languages on the front end, but at some point or another they are all very disconnected from Javascript itself. I feel with Typescript you get both a user-configurable level of type checking combined with the cowboy coder flexibility of Javascript - I guess that's what I was aiming to say. Whether that's a good thing to others is up to them however. ;)
By itself it doesn't really have anything to do with it; they're solutions to completely different problems. (That said, I'm not quite sure what you mean by the "problem" of virtual DOM?)
What _is_ interesting, though, is having your virtual DOM be the output of a reactive stream, and having a virtual DOM library use that to update the actual DOM. This is the approach Cycle.js takes: https://cycle.js.org/
Preach brother. I've been saying the same thing for years now after a similar experience moving from an Angular SPA to a Django + Pjax app. I noticed an order of magnitude increase in productivity.I can't imagine going back now.
Community here has been pretty negative on this lately. So I'll just add I've been using Angular 2x and also Ionic 2 the last year or so with great success.
One real benefit we saw was the ability to take a lot of Backbone code and just quickly port it (models to services, templates just back to html for a component, etc). This is helping us help our enterprise clients in conversions of both older front end code and older Java EE code (for example JSP + Struts => Restful + NG2X).
increasingly, angular seems less like a tool I'd use and more like a platform that exists to sell typescript and generally influence the web.
in 2017 I'm curious why I'd pick angular over vue for a web-based project, if anyone has insight. not over "x js framework" -- over vue specifically. vue 2 is pretty much exactly what I wanted angular 2 to be.
Well, less than half of the site on madewithangular actually have any "ng-app" or angular strings in their web page when they are not in 404.
I was suprised, so I made random check, and it was true as far as I can tell.
Plus for fun I randomly checked, also among the remaining sites: very few are «angular powered» on the whole domain. Making the claim these people use angular even less solid.
Please feel free to contribute to my script checking your claims if you feel I missed some true positive
You can already use most simple web components in Angular without issues - as far as Angular is concerned, it's just another DOM element.
We also support native (or emulated) Shadow DOM out of the box.
It gets a little more interesting when you start interleaving Angular and WebComponents, but one of the deprecations in 4.0 (regarding Angular's use of the <template> tag) is squarely aimed at making that easier in the future.
It's unlikely we'll ever have developers write Custom Elements directly - that said, the View Engine rewrite we just did gives us the ability to (theoretically) have our compiler output Custom Elements. We're investigating some use cases on this.
If you don't like TS stay away from Angular. In fact, just stay away from Angular, even if you like TS. You will save yourself a lot of headaches...but hey with Angular you might be able to hire some cheap/junior programmers who are familiar with OOP or move some backend guys who like C#/Java to do frontend.
As I said in another comment the fun part is less than 50% example on madewithangular actually use angular on advertised pages, and even the true positive on one page do not imply a significative part of the web domain is powered by angular.
Check by yourself. (Condition for tagging a page made with angular is no 40X/50X/60X and m/(angular|ng-app)/ in html feel free to correct me if I was wrong, I will make my mea culpa and published revised figures. Domain checking was random, by hand (I never trust my software))
So making the hypothesis of good faith from the submitter it means 50% of historic users of angular dropped it since 2015. Most of them anyway did not «fully» adopted it.
If a technology is being dropped after 2 years by their early motivated adopters, maybe there is a smell?
VueJS is the only of these JavaScript UI Libraries/Frameworks I can stand... The only one whose syntax doesn't make my eyes bleed!... I can't wait for Alibaba's Weex to be officially released so Vue can be used for developing mobile apps too. Reusing components across platforms and the web is the only reason why I would like to jump into the JS wagon!
> VueJS is the only of these JavaScript UI Libraries/Frameworks I can stand...
Agreed. I just can't stand Angular's bloat, especially its IoC container. If I want to use one, then let me choose the one I want. A UI framework shouldn't come with it's own container it makes no sense. If this UI framework is too complicated to boostrap manually then it's too complicated at first place.
To make things clear I actually liked Angular 1 since it allows people to easily upgrade from jQuery and raw DOM.
>A UI framework shouldn't come with it's own container it makes no sense. If this UI framework is too complicated to boostrap manually then it's too complicated at first place.
I don't think Angular is just a UI framework though.
The only one whose syntax doesn't make my eyes bleed.
To me that sounds like choosing a tool based on the experience it gives the developer rather than the experience it gives the user. That's entirely the wrong way to pick what to build an app with. User experience is far more important.
(That's not a comment about Angular or Vue. They're both great, and you should use whichever is best for the web app you're writing.)
I've messed around with Quasar Framework[0], which lets you build mobile apps in Vue (Electron too). Seems like its inspired by Ionic. Still in dev, but I liked what I saw.
I'm sure the Angular team are great people, and they're clearly talented devs... but stay away from Angular.
It doesn't help with the problems you will actually face. Typed Javascript is a cargo cult. Angular just plain confusing for no apparent benefit. Dependency injection is bizarre. The distinction between modules, components, and directive is unnecessary. The Javascript community in general is moving away from OOP towards functional programming, but Angular has hitched it's wagon to OOP. It's reliance on the decorator pattern is maddening. It's view layer performance is sub standard. It's opinionated in all the wrong ways.
And I say this as someone with a lot of experience with Angular 1, Angular 2.
Trust me, go for libraries over frameworks every time. Redux, React, Immutable, Sagas, and reSelect. That's the future of web app development.
Problem is you get a cumbersome templating language, extremely verbose component declarations, even more verbose dynamic components and a bunch of other horrible stuff.
In React it is a breeze to make Higher Order Components to connect to a store and it also makes it much easier to separate those smart components from small reusable presentation components.
I have seen people shy away from making smaller components just because Angular makes it so damned painful to make components. It is just easier to stuff everything in a template and copy paste everything around, which leads to a serious case of spaghetti code. I am happy for you if you don't have to work with something like that. I do, and I can tell you it is not nice in any way.
I agree with this, few months ago I was trying to learn AJAX, I tried Angular (because it is backed by Google), few weeks into reading more about it, I was still reading the docs.
Then, I read that VueJS was a somewhat better and lean version of React, so I skipped React and started with Vue, I was surprised that I wrote the complete app within a week of starting to learn Vue (https://github.com/thewhitetulip/Tasks-vue) , of course, there were issues I faced, but they were solved quickly thanks to the amazing vue community.
I really don't want to sound like an ass, but if you were at the stage of 'learning AJAX' a couple of months ago you are probably not in a position to judge the merits of JS frameworks like React, Vue or Angular.
Please note that I didn't say Angular sucks. I merely pointed out that Vue is easy to learn.
I am hardly an expert on either Angular/Vue to recommend them based on their internals, I stated my experience, of course, the final decision depends on those who choose one framework over another.
Some tools are harder than others, sometimes because they accomplish more.
Imagine if you'd said "one day into learning about homeopathy, I was able to prescribe homeopathy-things, but after 4-5 weeks of med school I was still taking classes about blood cells."
I'm not actually defending Angular as such, because I am super ignorant about it. Perhaps Angular is a byzantine mess. But there are many great tools which do not have smooth onboarding procedures, which are still valuable because of how they work on complicated projects.
Of course, the BEST tools make easy things easy and hard things possible. Angular might (or might not) make hard things possible, but I think everyone agrees it's not particularly good at making easy things easy.
>Imagine if you'd said "one day into learning about homeopathy, I was able to prescribe homeopathy-things, but after 4-5 weeks of med school I was still taking classes about blood cells."
I get your point, I removed the last statement, it was incorrect. the thing is, I wanted to state that Vue is super easy to use, now, if it is a toy or a serious framework is upto the programmer to decide :-)
Yes and no. It says as much about you as it says about Angular or Vue. Look, Angular is far from being my favorite framework, and I have nothing against Vue, I'm more of a ClojureScript / om.next guy myself. I'm just really allergic to brash statements about frameworks, or hype in general.
How easy it is to get up and running with a framework doesn't actually tell me that much about the framework. Is the apparent simplicity simply an artefact of a huge layer of magic that I will end up fighting 4 months down the row?
A good example for this is actually the much maligned Angular 1, two-way data binding looks easy on the surface, but it comes with a cost. And guess what, two-way data binding was all the rage for a while in the HN echo chamber during the early days of Ember, Angular and Knockout.
In the end, whether you use Angular, React or Vue is really secondary to what you build with it. You can create shitty and good code with all of them.
Now, specifically about Angular2+. People act as if its approach was this awful, monstrous abomination. This all really depends on your circumstance tho, or not? There are instances where it makes perfect sense to tailor your setup and use a libraries-first approach. But if you do this, let's say in React, you need to make a lot of decisions up front. Do you want manage state? How? Redux? MobX? What about message buses? Do you want to use Flow? Just ES6 / Babel? TypeScript? What about routing? Lazy-loading? What about bundling? Webpack? Rollup? And so on.
Now, if you are part of a heterogenous developer team working in an enterprise shop, maybe you are happy to know that there is a framework that has made a lot of decisions already for you and prevents you from having to discuss the initial setup for 2 months, but at the same time is flexible enough to be adapted to your needs (I mean, this even applies to experienced front-end shops, there's nothing more horrible than endless discussions about shit like pure ES6 vs Flow vs TypeScript from senior devs). On top of that it uses patterns that you already know, such as dependency injection and annotations. While you personally might not feel at ease with this, many developers do.
True, I didn't mean to sound brash, I have edited out the statement, I wasn't belittling Angular, neither did I intend to say that Vue is the way better in it's internals over Angular. I wanted to share my experience that learning how to write an app in Vue was faster than Angular.
> In the end, whether you use Angular, React or Vue is really secondary to what you build with it.
yes and no, you are also making a tradeoff at the learning curve of the chosen framework.
Having used Vue for a month or so and Angular now for only a short period, I can easily say Vue is easier to learn for two reasons (neither of them being magic):
1. The documentation is excellent. It's short enough to read in one sitting and comprehensive in that every option is documented without needing to resort to third party websites. When a new feature is added even in a minor version upgrade, that new feature is in the documentation (and marked as NEW). The search is also great and separates results into "Guide" and "API" categories.
2. Vue itself is extremely cohesive and user friendly. User friendly can mean many things. One of those is simply terminology. For example, in both Angular and Vue, templates can have child content. AngularJS and Angular use the terms Transclusion and Content Projection while Vue templates can have "slots": a term which doesn't require a CS degree to understand the intent.
The Angular documentation is simply not good: the organization, navigation, search, and writing style are vastly inferior to Vue's docs. Many sections are written in tutorial form repeating the same information (or mentioning important information in an unrelated section). It's hard to find what you're looking for and in many cases things simply aren't documented. For instance, speaking of Content Projection, it's a major feature and it's nearly impossible to find in the docs unless you already know ahead of time that it's called "Content Projection". I had to learn about it from a third party blog which made me question if it was even safe to use. There's even an open JIRA item noting this:
As someone who is new to React, Angular, Vue, etc., he/she is in the PERFECT position to judge them. Libraries/frameworks are not just about performance, but how you learn them as well.
Those frameworks/libraries don't write themselves.
Frameworks are also about comprehensiveness. The start of the learning curve is not the sine qua non. That always reminds me of those complaints that writing a "Hello World" application in your GUI library of choice requires plenty of boiler plate etc., but you're probably not going to spend your developer life doing that. Often benefits for larger apps aren't obvious for the neophyte.
This is really aggravated that -- as opposed to native GUI libraries -- frontend requirements vary wildly. You might just need it to embellish some elements (i.e. the jquery level), you might also use it to build some large desktop app replacement.
Which is why I take most comparisons with a large grain of salt. In this regard, "JS framework XYZ sucks/rules" is the new "PHP is great/awful".
I agree with your points, I'd like to make one small point, Vue is not a framework per se, it is a library. That puts the responsibility of everything else on the programmers shoulders.
However, to me it's not really that Angular is bad in itself, it's more that the alternatives (React/Inferno/Preact combined with redux or MobX) are just superior in so many ways, and by a huge margin.
Once you've done React with TS/TSX, with type checked components all the way, great code completion, incredible performance...it's hard to go back.
Angular's components would be ok if React didn't allow you to declare functional components in just a few lines of code, create HOC to decorate exiting components, etc. Angular's components are certainly better than Angular 1's but when you compare it with what you can do with React it just can't compete.
Honestly, from my experience, there is not a single thing that Angular does better than React and friends. Not a single one. It does things better than Angular 1/Ember/Backbone but that's it.
I think this is a bit like the solar/renewables revolution that is happening in energy. There are more efficient combustion engines, filters and whatnot, but when you compare them with the other paradigm, it falls short.
The definitive answer to this question is: it sells itself better to managers. The truth is that for many good and bad reasons, people with decision-making power are scared of dependencies.
My company uprooted a few months of React development because Angular (2) comes with batteries included and we wouldn't have to rely on third-party stuff to fill in the gaps. The amount of stuff you get is... not actually that much, but it's enough to sell it. Of course, our new package.json is just as long, if not longer using Angular than it was before, and I've spent arguably more time doing setup (before @angular/cli stabilised) than I ever did with React. The whole @angular/router situation with module loading is silly, who wants to load modules via strings? Yes, the default batteries-included parts work with each other very well for the basics, but what about power and flexibility?
React could go a long way in this regard just by having a few more official ways of doing things and offering a few tools straight up (a @react/router for instance) while still selling the just-part-of-a-wonderful-ecosystem thing. React is so much better at satisfying real development needs, like the hyper-extensibility via functional composition and the super-DRY code you can get out of it very quickly, that proving its worth in ways that are only superficially important would be well worth it.
This makes me feel sad. As you said, maybe React could do more when it comes to packaging things up. I think Create React App is a good step in that direction but there is still work to be done.
Totally agree. I really don't get how anybody can take a look at the mess at https://angular.io/docs/js/latest/api/ and think to themselves, yep - that's for me! Our first version was done in Angular v1 and we bit the bullet and converted over to React and never looked back.
No more factories, or dependency injection, or crazy template language that is never quite expressive enough, and no more digest cycles to optimize.
Angular 2+ is very different than Angular 1.X. The single directional data flow removes the need for digest cycle tweaking. You only need services for data and components for rendering and business logic.
The benefit over react is how you don't need anything additional to manage your workflow. It's nice to set up a project and not need to glue together libraries.
Angular 2+ is very different than Angular 1.X. The single directional data flow removes the need for digest cycle tweaking. You only need services for data and components for rendering and business logic.
The benefit over react is how you don't need anything additional to manage your workflow. It's nice to set up a project and not need to glue together libraries.
ANY web developer is someone that once upon a time looked at an api that was a complete mess (javascript, dom, ...) and still said to himself - that's for me!
Update : absolutely not saying they wrong to think so. Building the right things is more important than building the things right.
The website seems like a mess. The title of linked page changes from `(v4.X.Y)` to `(v)` to `(v4.0.0)`. At the start it displays empty page shell, then fires two ajax request, each causing the page to redraw. This all could have just been statically generated web page.
We went from jquery to backbone to angular to react and every single time there is a post like yours telling everyone that the future of web development is this new thing. Get real... The future changes every 3 months.
I have about two years of experience with both Angular 1 and React. What was truly astounding to me was how while Angular required months of continually poring docs and Stack Overflow threads for every new thing I wanted to do, React took all of a week or two to get pretty comfortable with, and after that minor investment of time I was rewarded with dramatically increased development speed.
I will never go back to using a framework with an approach like Angular. Trying to abstract away the browser environment and have developers learn a whole new set of APIs with nearly the same level of complexity is just a fundamentally bad idea.
JSX doesn't do any abstraction. Unless you're using React Native, you're writing HTML, just that JSX turns it into `React.createElement(...)` calls.
The VDOM is kind of an abstraction, as React Native can use the same reconciler as React, but the React (web) VDOM is just a tree of HTML DOM nodes that gets diffed against the component rerender output and the changes are applied to the DOM.
Ummm.. kabes is right. React is an even bigger abstraction on the browser than angular 1 is. Its just that with React the abstractions are mostly opaque - and with Angular the abstractions are not so opaque ( and maybe sometimes leaky! ).
I think you got that backwards. React's abstractions are transparent, as in the developer doesn't need to "see" them or be aware of them. Your existing web dev knowledge largely applies.
> I think you got that backwards. React's abstractions are transparent, as in the developer doesn't need to "see" them or be aware of them.
He doesn't have it backwards.
He means they're "opaque" abstractions, in the sense that they're the opposite of a "Leaky Abstraction"[0]. A leaky abstraction is one wherein the abstractions below it "leak" up and you have to keep multiple abstractions in your head at once. This happens more with Angular than React.
I see what you mean by calling it a transparent abstraction though, since React's abstractions get out of your way and let you directly think about the lower level. This doesn't really fit with the Leaky abstraction analogy though, but it's a great point.
If you're going to switch JS frameworks every time some hipster on HN tells you to, you're never going to get anything done. Use Angular/TS if you like it.
Oh no, I am a desktop and mobile developer, but a recent article on HN made me decide I should dip my toe in web dev just to get a better understanding, so I hit up Pluralsight and was recommended Angular and Typescript.
Then 3 minutes into a Angular 2/Typescript lesson I read that. But point taken.
I think I will stick with Angular and Typescript purely on the basis that it seems to have better integration with .Net core etc. I say all of this from a huge point of ignorance and just what I could gather from an hour or so of research online.
Go with what you like. Take a look at Polymer documentation - it is very easy to pick up and works like a charm. I prefer it to react and angular nowdays.
You will still be able to use redux/whatever with it.
Is ironic just yesterday I read almost the same thing but trashtalking pseudofunctional programming in js, declarative components, microframeworks and dependency hell over all-in solutions, etc etc...
The reality is you don't really have any idea of what future of web development is, as anyone has. The community is not oriented in any way... rather we are probably in the time of biggest uncertainty and most frequent change of ideas of the whole web dev history.
Honestly the only and best suggestion I can make is "ignore everyone who try to say * this is how you should do things, the rest is shit * ", for the big part of the time they are just trying to self-justify an over investment on their own solution (or worst, ego), telling themselves they for sure had understood everything and the others are just wrong or "not there yet". They don't even know that they don't know.
All good points, but FP has been a solid paradigm for a very long time, from people that had time and wisdom. It reduces very quantifiable issues like shared mutations, lines of code.
Now that doesn't make js revisitation of fp pristine but still it's quite a refreshing thing.
I never used Ang2+ but Ang1 was such a heavy thing; it was a OOP theory in itself, flipped around the DOM (I forgot their terminology but basically, the DOM tree became the inheritance tree).
Angular is a mess but typescript is alive and kicking on its own, even with react.
Personally I'm one of the apparently rare breeds that hate angular but loves typescript. I wish there were more of us.
They're really in different realms and please don't make them part of the same whole. Typescript is a transpiler but the transforms it does are designed to mimic accepted JavaScript idioms.
When I'm debugging typescript it makes sense, it looks almost like JavaScript written by somebody that knows what they're doing.
Contrast that to Babel, Closure compiler, and countless others that produce "JavaScript" that reads more like assembler.
Typescript is easy to make back into human readable JS and it's equally easy to slowly transform your JavaScript into typescript.
It's the most forward and backward compatible language transformer I've ran across so I don't appreciate you shitting on it :)
I want to move on from Jquery... Have been learning C# on the back end for the past year and a bit, but now it's time to do the front end.
Looking at both A1 and A2 has confused me, so might just try React and see if that is more compatible with my ageing me. :) Nevertheless, I also really like the looks of Typescript. Could your possibly recommend a(n opinionated) way to get started with the two?
I have heard the same from many people. Angular takes the web and makes it look like traditional event driven UI. This is not a bad thing at all, it's how UI works in everything that isn't web.
React is a lot less abstraction and feels more natural to people that started out making UI with plain HTML.
Each has its merits but Angular uses way too much magic for my taste to make the web seem like something it's not. Much like a client side re-imagination of webforms
It's interesting how OP says people are moving towards more functional-style Javascript, but also dismisses statically typed Javascript. The two work really well together.
I'm convinced functional style is a fad and nothing will change my mind. The style has been around for forever and there's a good reason most languages are still OOP.
We're in the phase of the hype loop where everyone assumes language designers from 15 years ago are idiots. In another few years everyone will be talking about the revival of OOP
I can understand if people think it's a fad, but I would expect people who _do_ like it to also like TypeScript :)
That said, if someone thinks language designers from the past are idiots, then they also shouldn't like functional programming, as it's at least as old.
Functional style programming is not a fad so much as a different taste. Not everyone will always have the same tastes. It's like peanut butter and chocolate: you can love only one or the other, you can also love both or know that each has different strengths for different needs (projects/desserts).
I feel like Typescript is the only thing that will stick around for sure in the coming years.
Frankly, I don't know if I can say the same about all the other libraries/frameworks/etc since every month there is something new that's supposed to make all the other competing tools part of ancient history.
TypeScript is an invaluable, mature technology that provides large productivity boosts to any team that maintains a mid-sized code base.
It plays extremely well with React too, and it's benefits are independent of the tech stack. If you are used to typed components/templates, you will NEVER want to go back.
I would argue that is more important to have static typing in the front-end compared to the back-end in a web-application context. There is more state, lot's of shared entities and unit tests are expensive to write and maintain.
> There is more state, lot's of shared entities and unit tests are expensive to write and maintain.
Good point, but only to an extent: Unit tests boilerplate in dynamic languages that is redundant with static typing is only a (minor) subset of unit tests that you should be writing for your code. Static typing is not an excuse to skip unit tests altogether. I've unfortunately met people claiming exactly that...
In 2014 I used Typescript on a four month long project. I liked it alot compared to using just JS, however compiling was slow.
I retried using Typescript 1 month ago. Compiling took 6-7 seconds for about 8 files. I could not find a solution and gave up using TS. I hope that's just me doing not good enough research.
Must be something with your setup, tsc is known to be quite fast. Maybe try using it with the watcher? "tsc -w" and you'll never need to compile more than one file at a time.
Unfortunately I've met some devs new to SPA stuff and they believe it's either react/flow or angular/typescript. They're being promoted this way in the intro docs on both sides.
I haven't dabbled too much with it, but as still an outsider, Typescript + React honestly seems like a great fit especially to make it even more approachable.
What I like most with React over Angular is that it seems like it cuts to the core of the problem I'm actually trying to solve here. It just feels like a lean, clean, proper solution to the main issue at hand. (this of course helps with dev adoption too because it's easier to find people knowledgeable in lean frameworks, or at worst much quicker to train them)
I've been using TypeScript with React now for about six months - prior to that I was working on a large React/Redux app written in ES6 using Babel.
In my experience, I have seen a significant increase in my productivity after embracing TypeScript. With the static type support I am fixing/avoiding more errors at 'authoring' time due to intellisense and the VSCode editor flagging what will be compile errors. I am able to refactor across files with a lot less fear.
The advanced types in TS (specifically discriminated unions) make Redux actions and reducer code a lot more maintainable.
Overall I'm very pleased with the transition to TS. I spent time learning Elm last year and simply fell in love with that development experience. For reasons out of my control I cannot use it in production but with my current TS+React approach I can at least get close to what Elm offers.
My guess would be that static-typing is what they're trying to add albeit in an OOP form.
Javascript is more of a 'Prototype' based language. They call things 'Object's but I've seen few portions of JS code that actually use OOP in the traditional sense (encapsulation, polymorphism, etc)[0]. Mostly objects are just used for namespaces for finding vars and functions.
Agreed on the frameworks versus libs.
I would recommend that you work on a large codebase in a statically-typed language for a spell. Duck-typing is great for a shell script or blog post but things may be different when refactoring 100k lines of code, finding references, etc.
[0] Yes I know about the JS 'library' 'pattern'. That's more gymnastics than encapsulation.
Sorry, but this is one of my technical pet peeves. Polymorphism isn't solely an OOP concept. Every language has polymorphism of some sort. Most have several. Duck typing is an example of polymorphism actually.
You probably mean "inheritance", which is a way to achieve polymorphism, not a synonym for it.
I think something must have a form before you can say it has many. By your definition a cloud is a polymorph instead of a random shape. If you weaken the definition that much, it takes on a lot less meaning.
The wikipedia page lists three types of polymorphism. Duck typing is linked in the page as another kind of polymorphism. I've seen several other types in the wild, such as link-time polymorphism.
The general idea is that you can have one expression dispatch to many different concrete implementations depending on the context. Virtual function calls is one approach, but C uses function pointers, C++ uses templates, dynamic languages use duck typing, several languages use message passing, and so on.
1. Angular 2 is not object oriented in the standard meaning of the term: it does not rely on inheritance or polymorphism that much.
But it does rely on classes as the backing structure of your UI components. In other words, they tried to create a platform for creating widgets that compose. And more or less succeeded.
This is a tried and true pattern that has been used to create complex user interfaces since forever. I would wait a while before claiming that this stile is obsolete.
2. Angular 2 is quite functional.
Decorators in Javascript are just higher order functions (like python I guess). They look like like Java's annotations, but work in a completely different way.
They made streams (RxJs) the standard way of working with data.
And pipes are also a functional construct.
3. There are some good things to say about their routing module too, but I have to go.
Anyway, my opinion is that Angular and React address different needs and there is definitely room for both of them.
React is a framework. You can call it a library as much as you like, but that doesn't make it a fact.
It comes down to this: What is the relationship between your code and the 3rd party code? Are you calling it, or is it calling you?
If most of the code you write is extending some 3rd party code, e.g. React.Component, and most of the time your code is being executed by the 3rd party code, e.g. as render() calls, then what you have is a framework.
React and its myriad extensions may be as great as people are saying, but this insistence that it is a "library" only serves to make the community look delusional.
Having toyed with React and Angular for similar amounts of time (~3 weeks of each), I found React whole lot simpler and more understandable. Probably because it only covers the V in MVC. There is so much stuff in Angular that seems like it belongs in the back end and is just duplicated unnecessary on the front end. (It's not like you are likely to write an application in Angular without a server based back end are you?).
Angular isn't really OOP. ES6 made JavaScript more like OOP. Typescript just applies types so you can lint your code better.
I am rewriting a React/Redux app I wrote to Angular 2. It's more readable, the control flow is easier to understand, and it's better to work on as a team. Instead of reducers and action creators, I have services separated into their own files. It's much easier for me to manage the work of others on the team.
Agree generally, but the future of web app development is looking more and more like a hundred languages and frameworks. Here's someone who built a 50k LoC web app in Haskell - both client and server in the same codebase - and very happy about it: https://www.reddit.com/r/haskell/comments/610qp7/hiring_pure...
F# has Fable that compiles down to Javascript, OCaml has BuckleScript, and the new kid on the block, ReasonML. I've read about one or more production websites running in these what we'd call esoteric choices. (Add Elm and PureScript to the mix)
There is increasing adoption in the web for both Typed FP through these languages and Untyped FP through ClojureScript. Non-FP communities on the other hand don't seem too keen on the web. Ruby for example has Opal, but with the pace at which Javascript is getting better, porting similar languages just for their familiarity doesn't seem to generate the same kind of excitement as transpiling from a more powerful one.
And once Web Assembly becomes viable and browsers are free from Javascript (except for being the lowest common mass adoption denominator), we'll be able to choose our languages just like we can when programming for any other environment. It'll be a Wild West out there, but in a nice kind of way.
I have been leading a good sized Angular app for work for the past 8 months, and upgrading from v2 to v4 has been painless, even while having an AOT compilation build pipeline set up - the only modifications we had to do was switch OpaqueToken to InjectorToken, <template> to <ng-template>, and Renderer usage to Renderer2, and these weren't required to be done yet. We only did those changes to get ahead of the curve from the deprecation messages.
On first note, the codegen size decreased dramatically for AOT compiled builds - we went from ~600 KB vendor + app minified and gzipped (not counting 50 KB of polyfills) to ~400 KB. This is huge, and the boot speed feels even faster on first user load of the page!
Thanks to the Angular team for this fantastic work!
absolutely same experience in our case. Painless update with few template to ng-template ctrl+f changes.
Angular CLI stabilization is a much more important news, actually. One of mistakes of Angular team - Angular CLI had to be ready before Angular itself.
The monolithic javascript framework era is over and has been.
Anyone choosing monolithic over microframeworks/libraries will regret it over time, that time may be as quick as 6 months, right around launch and switching to maintenance. Pour some out for the poor bastards that have to support legacy versions of these frameworks.
Man y'all niggas is trippin. Angular changed completely with angular 2.0. If you say 2 and 1 are the same you are plain lyin' to yourself. I am not kidding. They are not the same thing, and should not be named the same. Likewise, pretending that 1+2 = 4 is just fool's talk. I don't care anymore for angular; Having your app-state in-sync with your code is great, but changing your whole paradigm every 6 months because the powers-that-be told you that your major version number _should_ increment for no apparent reason? You must be out of you got-damn mind. So fuck angular, and fuck all that bullshit that comes with it. Downvote me all you want, you guys gotta get a grip on reality, or let go completely, because this honey-do-good-half-assed-bs is getting you absolutely nowhere.
> Just reading about 'renderModuleFactory' in this announcement makes it sound enough like Java EE bullshit that I want to stay far away from it.
it is old school JEE, which is ironic as JEE,Spring and all that bullshit are trying to move far away from what they used to be. All that complexity has a cost.
This still doesn't describe how Angular is objectively "better." In fact, because it requires Javascript just to render HTML, it is objectively worse than straight up HTML delivered from a server-side solution.
To be clear, I don't eschew JavaScript. Of course you need that for applications. JS stuff goes into a Mako template where I import and call the JS when I need it.
This has the added benefit of extremely small page sizes. Nothing gets loaded globally. Every page has only and exactly what it needs to function properly.
I'm just wondering if I am that much of a dinosaur and I need to invest the time into learning some of these frameworks to be competitive on the market in the future.
What I do works well. It's fast, it's scalable, and I'm very fast at developing with that toolchain. The code is clean, clear, well-organized, and modular. Anyone who knows Python, SQL(Alchemy), and JavaScript can pick it up and work with it.
I can work on any different part of an application without worrying about if it might break something elsewhere. I feel like the patterns I've gotten comfortable with are kind of a sweet spot between micro-services and monolithic. My apps are technically monoliths, but the various modules are clearly isolated.
I'm in my late 30s now, and I want to keep up and not turn into one of those old guys who refuses to stay current. I'm genuinely curious what the value proposition is, outside of learning a new paradigm for its own sake. There's always value in learning new ways to solve problems you already have a good handle on.
But outside of those things, is there some secret magic I'm missing out on?
I'll say personally I've never been a fan of Angular, but I think if you want Java/J2EE-ish all-encompassing component model and decorator-/annotation-based GUIs, it certainly is a very strong contender (though kindof the thermonuclear option and absurdly complex IMHO, at least if you have some prior web development experience). I think Google's track record wrt. long-term maintainance isn't half bad really (GWT and closure tools have been around for a long time).
That said, I've recently talked to recruiters, and was told Angular has already peaked as the go-to framework for enterprise MVC web apps, and is replaced by React and others (and I'm assuming Angular wasn't all that much used outside that demographic because of the heavy setup and on boarding/buy-in).
In the course of JavaScript generational cycles I'm expecting we're bound to re-discover "evergreen" web apps, those being characterized by lack of heavy build pipelines, simple browser-refresh driven development cycles, and straightforward use of web forms (+ maybe components).
An open question for me is what about TypeScript, eg. since Angular has been a major driver/user behind its type-heavy approach, will it suffer along with Angular?
Rails, bootstrap, react when necessary on portions of pages. Use regular links again - use regular forms again, remember - AJAX can be cool, but it doesn't have to be the whole app.
Remember when the server generated HTML? You could middle click a link!
I'll even use normal browser history, instead of re-implementing it in Javascript for my app (with bugs).
359 comments
[ 5.1 ms ] story [ 325 ms ] threadWhat's going on with versions?
So to keep all of them at the same major version, they pushed everything to version 4.
Also, the jump from AngularJS (1) to Angular 2 was drastically different. Going from 2 to 4 however is much less significant in terms of breaking changes.
You won't have to relearn hardly anything if you already know 2.
Angular 2+ is now simply Angular. All new releases follow a naming of version X.Y.Z where X indicates breaking changes, Y non-breaking new features, and Z is bug fixes.
Version 3 is being skipped over due to poor naming of the related Angular Router lib.
http://angularjs.blogspot.com/2016/12/ok-let-me-explain-its-...
https://webdev.dartlang.org/angular
A major version bump for a module could signal a breaking change, or it could just be due to the packages it's locked to having had a breaking change
This is why keeping your dependency list as tiny as possible is imperative.
Should that be a new major version of the library?
The more nuanced answer is that it depends on your packaging system and your language runtime. If either cannot handle more than one minor version of a dependency at the same time, you need to bump a major version. The problem is that the code that uses your library might also indirectly be using that dependency, but pinned to a different major version. This means that the application is broken even though the breaking changes aren't used by your library.
To illustrate:
Say, as the maintainer of banana-1.0 want bug fixes in carrot-2.0, so you pull it in and bump your minor version. And then an application updates it dependencies. In some, though not many, systems, you can pull in two versions as if they were different libraries. But in almost all, you get a dependency conflict and apple will be broken.Even if you can juggle two dependencies of the same library, you need to make sure there wouldn't be any logic changes that would break the system or even corrupt data (!).
Anyway, it's simpler to be conservative and bump the major version. Yes, that can be a pain. But, again, it's good to keep your dependency list small or at least very boring to keep that pain to a minimum.
The spec only specifies one of those directions, you're free to bump the major version for any change if you feel like it. Doing so would make your versioning scheme much less useful, but it's not actually breaking the semver rules.
Install the latest version of the CLI: npm install -g @angular/cli
And then run: ng new project-name --ng4
The "--ng4" flag is currently required, as it doesn't yet install ng4 by default.
Edit: it's released! npm install @angular/cli
Someone on hackernews said it would be the future!
Main change, as noted, is the new View Engine. The design doc[0] is worth a read if you're interested in front-end at all.
Happy to answer any questions!
[0] https://docs.google.com/document/d/195L4WaDSoI_kkW094LlShH6g...
We (and our colleagues at Google working on the web in general) find that the largest impact on performance comes from simply shipping less code.
Edit: correction: turns out our tests show we didn't take a perf hit on updates at all, and in fact ever-so-slightly improved. So win win :D
2) Why do we need Angular Material 2, when Google's official Material Components Web project is meant to be used with all kinds of frameworks and even has framework integration examples with Angular2: https://github.com/material-components/material-components-w...
3) Should I follow Quickstart or CLI Quickstart in the docs to get started? I have heard that the CLI is recommended nowadays, but the Angular 4.0 release blog says the CLI isn't even stable.
So really, it's brand new, and we're excited to see what the community does with it.
Philosophically, pre-rendering every SPA server side isn't a silver bullet. For a ton of cases it makes a lot of sense, but we want to avoid the impression that we're positioning SSR as a replacement for making your app fast.
2) The expectation of the Material Components Web project is that everything be "wrapped" for the specific framework. Angular Material is native Angular, and we have a team dedicated to that. Polymer has a material suite as well, and most of those components can work in Angular apps too. Components for everyone!
2a) you're asking a Googler that question. We have like, 11 messaging apps. I don't know what to tell you.
3) CLI went stable today, with its 1.0 release. We'll be moving the docs over to use the CLI everywhere soon - personally, i'd use the CLI to generate a new project and then follow along the tutorials.
Who thought it was a good idea to make Angular 2 incompatible with Angular 1?
You had it, and you blew it. Most people aren't going to use any version of Angular, now, and have switched to React and Vue.
This is so much discussed that I am not going to answer that. Google it.
But according to the latest StackOverflow survey [1] Angular is still bigger than you think: AngularJS 44.3%, React 19.5%
[1] http://stackoverflow.com/insights/survey/2017/
[0] https://discuss.emberjs.com/t/why-is-ember-3x-5x-slower-on-a...
[1]https://eviltrout.com/2016/02/25/fixing-android-performance....
So my answer to the question was something like: "You can find a lot of info by Googling it".
But I am not able to change my comment anymore.
We have a huge Angular 1.x app, but after hiring some new developers for our team we found the pool of React devs was huge compared to Angular devs. So much developer goodwill and mindshare has been lost.
After carefully evaluating the technical aspects of Angular and React and externalities like the above, we decided to start building new software with React.
Angular won't go away overnight, it will see a very steady and slow attrition, with developers themselves leading the way.
But I was responding to "You had it, and you blew it. Most people aren't going to use any version of Angular, now, and have switched to React and Vue."
When you look at the stats and look at other places online there are still very much people liking and using Angular. So it's not going away soon.
Also take a look at Google trends: https://trends.google.com/trends/explore?q=angular,react Both Angular and React are growing at an equal pace.
So the claim that developing new versions of Angular is a waste of time is nonsense.
https://trends.google.com/trends/explore?q=%2Fm%2F0j45p7w,%2...
Angular is actually better off with the break as new graduates may use it to replace vue as the new fad once vue has replaced react.
I talked to many devs who didn't accept a job because it was Angular instead of React.
Even though there are some things common but the differences are just too many. It would have been better if it was just release under a different banner altogether.
I understand the frustration of someone who has used AngularJS 1.x. There is not really a straightforward and low risk path to upgrading a production app.
But that is like saying there is not really a straightforward risk to switching from AngularJS 1.x to React. They're different frameworks. AngularJS is different from Angular.
In my opinion the Angular team has created something really special with this new framework. I think it falls into a category of its own, very difficult to compare it to something like Vue.
I wonder if, strategically, it would have been a better idea to give it a new name rather than a subsequent version number?
Yes. Retaining the Angular name is just a way to slightly disguise that they've dropped a framework altogether and left its user high and dry.
Give it another name, then.
You can't get people to adopt your framework, stop developing it leaving millions of projects in shit, and then expect people to do it all over again.
I'm glad that Google paid this strategic error dearly, having a huge percentage of people switching to React. Perhaps next time they'll think about it more deeply.
Am I being dense? Shouldn't that be everyone reading this thread?
There was definitely some initial pushback, but we hope to demonstrate with this release that it's a) not that scary and b) good for both developers and users.
Most devs should see significant reduction (upwards of 50%) in their output builds. We think that's a reasonable trade off for a couple hours of work to upgrade.
In this release, most developers should be able to simply update their dependencies and rebuild. We're aiming for regular, planned, minimal changes, rather than Big Bang style change from AngularJS -> Angular.
We'll see how it shakes out, but so far our community has been pretty awesome about it.
We as engineers should not accept this. Business should not be involved in technical decisions like library upgrades. Business and engineering should negotiation development scheduling, nothing more. This means what new features are worked on, what bugs are prioritized, etc. All remaining time should be up to engineering's discretion.
And if business has you working on features full-time, then that's a (really) bad business and you should find a more acceptable company to work for.
Required: 3+ years experience building Angular 4 apps
Angular 1 to Angular 2 made me drop angular entirely, that happened less than 6 months ago I believe.
Just reading Angular 4 gives me the creeps.
Is 4 widely different from 2? How am I suppose to know if you using semver and already have a really bad history?
http://angularjs.blogspot.com/2016/10/versioning-and-releasi...
With all people complaining about Java, we don't have to deal with this shit so often.
Most breaking changes I see on the JavaScript ecosystem seem like mostly cosmetic. It has been a rough road trying to make decisions on tech that won't get stale quickly and have support dropped in a 1-2 year frame.
Angular is really one of the worst offenders in this regard. What was so fundamentally broken with Angular v1's api that could not just be worked internally and incremented?
It also has ramifications which are pretty dire in my opinion. We have an app written with Ionic 1, so I go check out Ionic 2 see what's going on, and oh look such shiny things, how do we migrate? Nope, full rewrite of course.
There are some decision makers in these teams which are completely disregarding the fact they are burning through several work hours of people around the globe without real value.
Stop breaking things because new. Fine, use semver, but don't you change that first digit lightly, it hurts when you do.
http://www.bayleshanks.com/wiki.pl?proj-sanDiegoVersioning
But man, am I getting jaded about all this javascript framework stuff. Every 6 months stuff breaks, every 2 years there's a huge shift.
The problem with javascript I've been facing is value. Time and effort doesn't always correlate to what I get in the other end. In fact, I can say when building, going single-page is a time sink.
And it's almost always a mistake to go SPA first. Using a django or a rails lets you get the basics and data flow nailed down early on. Get into a framework too early and have a need to change something? Have fun explaining to your manager/client how costly it is to do a "simple" modification to a JS app when you have to throw the state you built it upon out the door.
What I want is a system tightly coupled into a server-side framework like a Django or a Rails that degrades gracefully and I only have to program the interactivity one time. Something that'd plop right into the asset pipeline/django compressor so I don't have to go outside of the framework to build.
Hundreds of hours of my life have been spent chasing this dream of sharing server side code with client side JS frameworks. That's what I need.
Meteor didn't do it for me. As for rendr, I've done stuff better with backbone/express in-house. As of 2017, I get my best bang for the buck using django and pjax. No joking, I went from full DRF + Backbone Marionette -> to plain old jquery and pjax and couldn't be happier.
All these new build tools (grunt, gulp, webpack... come on), ES versions (I was ok with ES5). None of these things are helping me ship stuff ahead of / on time and correctly. They're creating an even larger gap between the server side data, logic and templates and the JS interactivity.
If anyone is listening, I'd love to have a well-supported opinionated distribution of django or rails that just renders forms, tables, etc. with angular/react/etc. and degrades gracefully.
So why is Rx and Typescript so important to me? Well specifically those two are kind of like the drug that once you try them, you literally can't go back. I've been wanting this level of type checking for 10 years on the front end. I am not willing to lose it now. As for Rx, it's the one true way to do async flows. Promises and Callbacks just end up creating large pyramidic code.
At this point it's hard to ignore that all the UI libraries are just paradigms and patterns, and how we use them is getting less important. These days I just want to write Component-style UI code, and I'll be fine.
Similarl things can be said about RxJS, but I think since it's a different level of abstraction, it will hit much harder, once it gains more traction. And it's already building up a solid community much faster than before. the only thing standing in the way of people learning RxJS is the same as Angular / Vue / React. It's scary and there's a lot of fatigue still. I hope that this year is thus going to be even better for teaching. ^^
Tldr; RxJS is going to be huge, if we can teach it more and JS fatigue calms down.
Still works, incidentally.
What _is_ interesting, though, is having your virtual DOM be the output of a reactive stream, and having a virtual DOM library use that to update the actual DOM. This is the approach Cycle.js takes: https://cycle.js.org/
ever looked into clojurescript?
I found building sites this way refreshing.
We are not quite at the point of using NodeJs on the backend normally (and honestly the JVM is 100x better) but you can share the language.
You want get a django or rails like app at the moment.
I am seeing : platform-browser / platform-server namespace. Can we expect platform-android, platform-ios, platform-jvm ?
Looking at the angular compiler pipeline, with AST this should be possible ?
The last one, well, that's a bit more complicated. Let's just say that sort of thing is on the radar.
in 2017 I'm curious why I'd pick angular over vue for a web-based project, if anyone has insight. not over "x js framework" -- over vue specifically. vue 2 is pretty much exactly what I wanted angular 2 to be.
Looks like cool features, but I have a hard time envisioning on how they all work together.
I was suprised, so I made random check, and it was true as far as I can tell.
Plus for fun I randomly checked, also among the remaining sites: very few are «angular powered» on the whole domain. Making the claim these people use angular even less solid.
Please feel free to contribute to my script checking your claims if you feel I missed some true positive
https://gist.github.com/jul/7056d4535da42103407ba2424e47d507
after all no detection tools can claim to be 100% accurate.
We also support native (or emulated) Shadow DOM out of the box.
It gets a little more interesting when you start interleaving Angular and WebComponents, but one of the deprecations in 4.0 (regarding Angular's use of the <template> tag) is squarely aimed at making that easier in the future.
https://gist.github.com/jul/7056d4535da42103407ba2424e47d507
So making the hypothesis of good faith from the submitter it means 50% of historic users of angular dropped it since 2015. Most of them anyway did not «fully» adopted it.
If a technology is being dropped after 2 years by their early motivated adopters, maybe there is a smell?
Agreed. I just can't stand Angular's bloat, especially its IoC container. If I want to use one, then let me choose the one I want. A UI framework shouldn't come with it's own container it makes no sense. If this UI framework is too complicated to boostrap manually then it's too complicated at first place.
To make things clear I actually liked Angular 1 since it allows people to easily upgrade from jQuery and raw DOM.
I don't think Angular is just a UI framework though.
To me that sounds like choosing a tool based on the experience it gives the developer rather than the experience it gives the user. That's entirely the wrong way to pick what to build an app with. User experience is far more important.
(That's not a comment about Angular or Vue. They're both great, and you should use whichever is best for the web app you're writing.)
I agree that "beautiful" is not a very precise or important metric but easy to read and update is important. That said I think React is really good.
i don't know that this is strictly true, nor that these notions are mutually exclusive.
I've messed around with Quasar Framework[0], which lets you build mobile apps in Vue (Electron too). Seems like its inspired by Ionic. Still in dev, but I liked what I saw.
[0] http://quasar-framework.org/
I'm sure the Angular team are great people, and they're clearly talented devs... but stay away from Angular.
It doesn't help with the problems you will actually face. Typed Javascript is a cargo cult. Angular just plain confusing for no apparent benefit. Dependency injection is bizarre. The distinction between modules, components, and directive is unnecessary. The Javascript community in general is moving away from OOP towards functional programming, but Angular has hitched it's wagon to OOP. It's reliance on the decorator pattern is maddening. It's view layer performance is sub standard. It's opinionated in all the wrong ways.
And I say this as someone with a lot of experience with Angular 1, Angular 2.
Trust me, go for libraries over frameworks every time. Redux, React, Immutable, Sagas, and reSelect. That's the future of web app development.
[1]: https://github.com/ngrx/store
In React it is a breeze to make Higher Order Components to connect to a store and it also makes it much easier to separate those smart components from small reusable presentation components.
I have seen people shy away from making smaller components just because Angular makes it so damned painful to make components. It is just easier to stuff everything in a template and copy paste everything around, which leads to a serious case of spaghetti code. I am happy for you if you don't have to work with something like that. I do, and I can tell you it is not nice in any way.
Then, I read that VueJS was a somewhat better and lean version of React, so I skipped React and started with Vue, I was surprised that I wrote the complete app within a week of starting to learn Vue (https://github.com/thewhitetulip/Tasks-vue) , of course, there were issues I faced, but they were solved quickly thanks to the amazing vue community.
I saw that many many people who are trying Vue are facing the same problems as I was, thus, I started writing this guide (https://github.com/thewhitetulip/intro-to-vuejs/).
Vue is amazing.
edit: link
Edit: removed a brash statement.
I am hardly an expert on either Angular/Vue to recommend them based on their internals, I stated my experience, of course, the final decision depends on those who choose one framework over another.
Some tools are harder than others, sometimes because they accomplish more.
Imagine if you'd said "one day into learning about homeopathy, I was able to prescribe homeopathy-things, but after 4-5 weeks of med school I was still taking classes about blood cells."
I'm not actually defending Angular as such, because I am super ignorant about it. Perhaps Angular is a byzantine mess. But there are many great tools which do not have smooth onboarding procedures, which are still valuable because of how they work on complicated projects.
Of course, the BEST tools make easy things easy and hard things possible. Angular might (or might not) make hard things possible, but I think everyone agrees it's not particularly good at making easy things easy.
I get your point, I removed the last statement, it was incorrect. the thing is, I wanted to state that Vue is super easy to use, now, if it is a toy or a serious framework is upto the programmer to decide :-)
How easy it is to get up and running with a framework doesn't actually tell me that much about the framework. Is the apparent simplicity simply an artefact of a huge layer of magic that I will end up fighting 4 months down the row?
A good example for this is actually the much maligned Angular 1, two-way data binding looks easy on the surface, but it comes with a cost. And guess what, two-way data binding was all the rage for a while in the HN echo chamber during the early days of Ember, Angular and Knockout.
In the end, whether you use Angular, React or Vue is really secondary to what you build with it. You can create shitty and good code with all of them.
Now, specifically about Angular2+. People act as if its approach was this awful, monstrous abomination. This all really depends on your circumstance tho, or not? There are instances where it makes perfect sense to tailor your setup and use a libraries-first approach. But if you do this, let's say in React, you need to make a lot of decisions up front. Do you want manage state? How? Redux? MobX? What about message buses? Do you want to use Flow? Just ES6 / Babel? TypeScript? What about routing? Lazy-loading? What about bundling? Webpack? Rollup? And so on.
Now, if you are part of a heterogenous developer team working in an enterprise shop, maybe you are happy to know that there is a framework that has made a lot of decisions already for you and prevents you from having to discuss the initial setup for 2 months, but at the same time is flexible enough to be adapted to your needs (I mean, this even applies to experienced front-end shops, there's nothing more horrible than endless discussions about shit like pure ES6 vs Flow vs TypeScript from senior devs). On top of that it uses patterns that you already know, such as dependency injection and annotations. While you personally might not feel at ease with this, many developers do.
> In the end, whether you use Angular, React or Vue is really secondary to what you build with it.
yes and no, you are also making a tradeoff at the learning curve of the chosen framework.
1. The documentation is excellent. It's short enough to read in one sitting and comprehensive in that every option is documented without needing to resort to third party websites. When a new feature is added even in a minor version upgrade, that new feature is in the documentation (and marked as NEW). The search is also great and separates results into "Guide" and "API" categories.
2. Vue itself is extremely cohesive and user friendly. User friendly can mean many things. One of those is simply terminology. For example, in both Angular and Vue, templates can have child content. AngularJS and Angular use the terms Transclusion and Content Projection while Vue templates can have "slots": a term which doesn't require a CS degree to understand the intent.
The Angular documentation is simply not good: the organization, navigation, search, and writing style are vastly inferior to Vue's docs. Many sections are written in tutorial form repeating the same information (or mentioning important information in an unrelated section). It's hard to find what you're looking for and in many cases things simply aren't documented. For instance, speaking of Content Projection, it's a major feature and it's nearly impossible to find in the docs unless you already know ahead of time that it's called "Content Projection". I had to learn about it from a third party blog which made me question if it was even safe to use. There's even an open JIRA item noting this:
https://github.com/angular/angular.io/issues/3099
Other things that bit me recently were key modifiers in which the possible options are only mentioned on the github issue page (not in the docs).
Those frameworks/libraries don't write themselves.
This is really aggravated that -- as opposed to native GUI libraries -- frontend requirements vary wildly. You might just need it to embellish some elements (i.e. the jquery level), you might also use it to build some large desktop app replacement.
Which is why I take most comparisons with a large grain of salt. In this regard, "JS framework XYZ sucks/rules" is the new "PHP is great/awful".
Which often has the same end result, with a bit of added customization and some hard choices way too early.
However, to me it's not really that Angular is bad in itself, it's more that the alternatives (React/Inferno/Preact combined with redux or MobX) are just superior in so many ways, and by a huge margin.
Once you've done React with TS/TSX, with type checked components all the way, great code completion, incredible performance...it's hard to go back.
Angular's components would be ok if React didn't allow you to declare functional components in just a few lines of code, create HOC to decorate exiting components, etc. Angular's components are certainly better than Angular 1's but when you compare it with what you can do with React it just can't compete.
Honestly, from my experience, there is not a single thing that Angular does better than React and friends. Not a single one. It does things better than Angular 1/Ember/Backbone but that's it.
I think this is a bit like the solar/renewables revolution that is happening in energy. There are more efficient combustion engines, filters and whatnot, but when you compare them with the other paradigm, it falls short.
My company uprooted a few months of React development because Angular (2) comes with batteries included and we wouldn't have to rely on third-party stuff to fill in the gaps. The amount of stuff you get is... not actually that much, but it's enough to sell it. Of course, our new package.json is just as long, if not longer using Angular than it was before, and I've spent arguably more time doing setup (before @angular/cli stabilised) than I ever did with React. The whole @angular/router situation with module loading is silly, who wants to load modules via strings? Yes, the default batteries-included parts work with each other very well for the basics, but what about power and flexibility?
React could go a long way in this regard just by having a few more official ways of doing things and offering a few tools straight up (a @react/router for instance) while still selling the just-part-of-a-wonderful-ecosystem thing. React is so much better at satisfying real development needs, like the hyper-extensibility via functional composition and the super-DRY code you can get out of it very quickly, that proving its worth in ways that are only superficially important would be well worth it.
No more factories, or dependency injection, or crazy template language that is never quite expressive enough, and no more digest cycles to optimize.
The benefit over react is how you don't need anything additional to manage your workflow. It's nice to set up a project and not need to glue together libraries.
The benefit over react is how you don't need anything additional to manage your workflow. It's nice to set up a project and not need to glue together libraries.
ANY web developer is someone that once upon a time looked at an api that was a complete mess (javascript, dom, ...) and still said to himself - that's for me!
Update : absolutely not saying they wrong to think so. Building the right things is more important than building the things right.
React is 4 years old.
Vue is 3 years old.
I will never go back to using a framework with an approach like Angular. Trying to abstract away the browser environment and have developers learn a whole new set of APIs with nearly the same level of complexity is just a fundamentally bad idea.
JSX doesn't do any abstraction. Unless you're using React Native, you're writing HTML, just that JSX turns it into `React.createElement(...)` calls.
The VDOM is kind of an abstraction, as React Native can use the same reconciler as React, but the React (web) VDOM is just a tree of HTML DOM nodes that gets diffed against the component rerender output and the changes are applied to the DOM.
He doesn't have it backwards.
He means they're "opaque" abstractions, in the sense that they're the opposite of a "Leaky Abstraction"[0]. A leaky abstraction is one wherein the abstractions below it "leak" up and you have to keep multiple abstractions in your head at once. This happens more with Angular than React.
I see what you mean by calling it a transparent abstraction though, since React's abstractions get out of your way and let you directly think about the lower level. This doesn't really fit with the Leaky abstraction analogy though, but it's a great point.
[0] https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-a...
I really like the idea of Typscript, but now... now I guess back to the drawing board on what to learn.
Then 3 minutes into a Angular 2/Typescript lesson I read that. But point taken.
I think I will stick with Angular and Typescript purely on the basis that it seems to have better integration with .Net core etc. I say all of this from a huge point of ignorance and just what I could gather from an hour or so of research online.
Edit: Changed to single toe.
You will still be able to use redux/whatever with it.
The reality is you don't really have any idea of what future of web development is, as anyone has. The community is not oriented in any way... rather we are probably in the time of biggest uncertainty and most frequent change of ideas of the whole web dev history.
Honestly the only and best suggestion I can make is "ignore everyone who try to say * this is how you should do things, the rest is shit * ", for the big part of the time they are just trying to self-justify an over investment on their own solution (or worst, ego), telling themselves they for sure had understood everything and the others are just wrong or "not there yet". They don't even know that they don't know.
Now that doesn't make js revisitation of fp pristine but still it's quite a refreshing thing.
I never used Ang2+ but Ang1 was such a heavy thing; it was a OOP theory in itself, flipped around the DOM (I forgot their terminology but basically, the DOM tree became the inheritance tree).
The angular team seems to hate simplicity and love made up words.
Personally I'm one of the apparently rare breeds that hate angular but loves typescript. I wish there were more of us.
They're really in different realms and please don't make them part of the same whole. Typescript is a transpiler but the transforms it does are designed to mimic accepted JavaScript idioms.
When I'm debugging typescript it makes sense, it looks almost like JavaScript written by somebody that knows what they're doing.
Contrast that to Babel, Closure compiler, and countless others that produce "JavaScript" that reads more like assembler.
Typescript is easy to make back into human readable JS and it's equally easy to slowly transform your JavaScript into typescript.
It's the most forward and backward compatible language transformer I've ran across so I don't appreciate you shitting on it :)
Plus you can do some cool things like Component inheritance.
I've never tried Flow, but I guess it's practically the same.
Looking at both A1 and A2 has confused me, so might just try React and see if that is more compatible with my ageing me. :) Nevertheless, I also really like the looks of Typescript. Could your possibly recommend a(n opinionated) way to get started with the two?
Of course the whole web stack is a new thing. Angular makes web app development much more productive.
React is a lot less abstraction and feels more natural to people that started out making UI with plain HTML.
Each has its merits but Angular uses way too much magic for my taste to make the web seem like something it's not. Much like a client side re-imagination of webforms
We're in the phase of the hype loop where everyone assumes language designers from 15 years ago are idiots. In another few years everyone will be talking about the revival of OOP
That said, if someone thinks language designers from the past are idiots, then they also shouldn't like functional programming, as it's at least as old.
you seem a bit committed. is this an emotional thing?
> there's a good reason most...
is there? is this reason related to languages themselves or their use? does it necessarily imply anything specific about "functional style"?
This is a HUGE red flag if you're seeking employment long-term in the tech sector.
Anders Hejlsberg has done a brilliant thing.
I'm also always a bit sad that Knockout seems to be overlooked a lot. It is not as opinionated but often times exactly the right tool for the job.
Frankly, I don't know if I can say the same about all the other libraries/frameworks/etc since every month there is something new that's supposed to make all the other competing tools part of ancient history.
There's literally no reason to not use typescript
TypeScript is an invaluable, mature technology that provides large productivity boosts to any team that maintains a mid-sized code base.
It plays extremely well with React too, and it's benefits are independent of the tech stack. If you are used to typed components/templates, you will NEVER want to go back.
I would argue that is more important to have static typing in the front-end compared to the back-end in a web-application context. There is more state, lot's of shared entities and unit tests are expensive to write and maintain.
Good point, but only to an extent: Unit tests boilerplate in dynamic languages that is redundant with static typing is only a (minor) subset of unit tests that you should be writing for your code. Static typing is not an excuse to skip unit tests altogether. I've unfortunately met people claiming exactly that...
I retried using Typescript 1 month ago. Compiling took 6-7 seconds for about 8 files. I could not find a solution and gave up using TS. I hope that's just me doing not good enough research.
(And I happen to agree with him on angular being confusing and not well designed)
What I like most with React over Angular is that it seems like it cuts to the core of the problem I'm actually trying to solve here. It just feels like a lean, clean, proper solution to the main issue at hand. (this of course helps with dev adoption too because it's easier to find people knowledgeable in lean frameworks, or at worst much quicker to train them)
I've been using TypeScript with React now for about six months - prior to that I was working on a large React/Redux app written in ES6 using Babel.
In my experience, I have seen a significant increase in my productivity after embracing TypeScript. With the static type support I am fixing/avoiding more errors at 'authoring' time due to intellisense and the VSCode editor flagging what will be compile errors. I am able to refactor across files with a lot less fear.
The advanced types in TS (specifically discriminated unions) make Redux actions and reducer code a lot more maintainable.
Overall I'm very pleased with the transition to TS. I spent time learning Elm last year and simply fell in love with that development experience. For reasons out of my control I cannot use it in production but with my current TS+React approach I can at least get close to what Elm offers.
Javascript is more of a 'Prototype' based language. They call things 'Object's but I've seen few portions of JS code that actually use OOP in the traditional sense (encapsulation, polymorphism, etc)[0]. Mostly objects are just used for namespaces for finding vars and functions.
Agreed on the frameworks versus libs.
I would recommend that you work on a large codebase in a statically-typed language for a spell. Duck-typing is great for a shell script or blog post but things may be different when refactoring 100k lines of code, finding references, etc.
[0] Yes I know about the JS 'library' 'pattern'. That's more gymnastics than encapsulation.
You probably mean "inheritance", which is a way to achieve polymorphism, not a synonym for it.
https://en.wikipedia.org/wiki/Polymorphism_(computer_science...
The general idea is that you can have one expression dispatch to many different concrete implementations depending on the context. Virtual function calls is one approach, but C uses function pointers, C++ uses templates, dynamic languages use duck typing, several languages use message passing, and so on.
1. Angular 2 is not object oriented in the standard meaning of the term: it does not rely on inheritance or polymorphism that much.
But it does rely on classes as the backing structure of your UI components. In other words, they tried to create a platform for creating widgets that compose. And more or less succeeded.
This is a tried and true pattern that has been used to create complex user interfaces since forever. I would wait a while before claiming that this stile is obsolete.
2. Angular 2 is quite functional.
Decorators in Javascript are just higher order functions (like python I guess). They look like like Java's annotations, but work in a completely different way.
They made streams (RxJs) the standard way of working with data.
And pipes are also a functional construct.
3. There are some good things to say about their routing module too, but I have to go.
Anyway, my opinion is that Angular and React address different needs and there is definitely room for both of them.
Golden cage then eh?
Nah, I'd rather go with polymer instead which is much closer to DOM and is a small library indeed (It's not like redux is working only for react).
And without polyfills I'm looking into 15kb download for users, instead of react + reactDOM behmoth.
I can't wait for someone to add JSX+VDom support for polymer (for the folks who like that approach).
It comes down to this: What is the relationship between your code and the 3rd party code? Are you calling it, or is it calling you?
If most of the code you write is extending some 3rd party code, e.g. React.Component, and most of the time your code is being executed by the 3rd party code, e.g. as render() calls, then what you have is a framework.
React and its myriad extensions may be as great as people are saying, but this insistence that it is a "library" only serves to make the community look delusional.
I am rewriting a React/Redux app I wrote to Angular 2. It's more readable, the control flow is easier to understand, and it's better to work on as a team. Instead of reducers and action creators, I have services separated into their own files. It's much easier for me to manage the work of others on the team.
F# has Fable that compiles down to Javascript, OCaml has BuckleScript, and the new kid on the block, ReasonML. I've read about one or more production websites running in these what we'd call esoteric choices. (Add Elm and PureScript to the mix)
There is increasing adoption in the web for both Typed FP through these languages and Untyped FP through ClojureScript. Non-FP communities on the other hand don't seem too keen on the web. Ruby for example has Opal, but with the pace at which Javascript is getting better, porting similar languages just for their familiarity doesn't seem to generate the same kind of excitement as transpiling from a more powerful one.
And once Web Assembly becomes viable and browsers are free from Javascript (except for being the lowest common mass adoption denominator), we'll be able to choose our languages just like we can when programming for any other environment. It'll be a Wild West out there, but in a nice kind of way.
On first note, the codegen size decreased dramatically for AOT compiled builds - we went from ~600 KB vendor + app minified and gzipped (not counting 50 KB of polyfills) to ~400 KB. This is huge, and the boot speed feels even faster on first user load of the page!
Thanks to the Angular team for this fantastic work!
Angular CLI stabilization is a much more important news, actually. One of mistakes of Angular team - Angular CLI had to be ready before Angular itself.
With angular-cli ng2 is now usable and in my opinion the best Javacript/typescript framework.
Anyone choosing monolithic over microframeworks/libraries will regret it over time, that time may be as quick as 6 months, right around launch and switching to maintenance. Pour some out for the poor bastards that have to support legacy versions of these frameworks.
it is old school JEE, which is ironic as JEE,Spring and all that bullshit are trying to move far away from what they used to be. All that complexity has a cost.
How does Angular make my life easier or better in some way?
I currently use Python and Pyramid as a framework. Mako templates. And SQLAlchemy for database interactions.
How is any of this really better?
This SPA would typically talk to services via "AJAX" (though probably with JSON). These services could be implemented using any technology.
Of course. Because it isn’t. It’s not worse either. It’s different. It’s a completely different approach to creating web applications.
Everyone has different criteria to meet. Working without JavaScript usually isn’t one with modern web applications.
This has the added benefit of extremely small page sizes. Nothing gets loaded globally. Every page has only and exactly what it needs to function properly.
I'm just wondering if I am that much of a dinosaur and I need to invest the time into learning some of these frameworks to be competitive on the market in the future.
What I do works well. It's fast, it's scalable, and I'm very fast at developing with that toolchain. The code is clean, clear, well-organized, and modular. Anyone who knows Python, SQL(Alchemy), and JavaScript can pick it up and work with it.
I can work on any different part of an application without worrying about if it might break something elsewhere. I feel like the patterns I've gotten comfortable with are kind of a sweet spot between micro-services and monolithic. My apps are technically monoliths, but the various modules are clearly isolated.
I'm in my late 30s now, and I want to keep up and not turn into one of those old guys who refuses to stay current. I'm genuinely curious what the value proposition is, outside of learning a new paradigm for its own sake. There's always value in learning new ways to solve problems you already have a good handle on.
But outside of those things, is there some secret magic I'm missing out on?
I'll say personally I've never been a fan of Angular, but I think if you want Java/J2EE-ish all-encompassing component model and decorator-/annotation-based GUIs, it certainly is a very strong contender (though kindof the thermonuclear option and absurdly complex IMHO, at least if you have some prior web development experience). I think Google's track record wrt. long-term maintainance isn't half bad really (GWT and closure tools have been around for a long time).
That said, I've recently talked to recruiters, and was told Angular has already peaked as the go-to framework for enterprise MVC web apps, and is replaced by React and others (and I'm assuming Angular wasn't all that much used outside that demographic because of the heavy setup and on boarding/buy-in).
In the course of JavaScript generational cycles I'm expecting we're bound to re-discover "evergreen" web apps, those being characterized by lack of heavy build pipelines, simple browser-refresh driven development cycles, and straightforward use of web forms (+ maybe components).
An open question for me is what about TypeScript, eg. since Angular has been a major driver/user behind its type-heavy approach, will it suffer along with Angular?
Remember when the server generated HTML? You could middle click a link!
I'll even use normal browser history, instead of re-implementing it in Javascript for my app (with bugs).