In the same logic that started with
Couple of interesting things we can learn from Ruby
and followed by
Couple of interesting things we can learn from .NET
that means it also include HTML5, CSS and stuff like asm.js Web Assembly
If you think I’m just an “ActionScrip 3 lover” or “Flash fanboy” and what I’m doing
here is just trashing JS out of resentment or other delusion, think again.
As a developer, I was writing JS app in DHTML even before Flash was born,
I worked with things like Classic ASP JScript, Windows Script Host,
HTML Application (HTA), JSDB, poored my nose in source code of Rhino, SpiderMonkey engine, V8 engine, etc.
and even today I keep up to date on what’s going on in the JS world, and yeah
guilty as charged I did not try every goddam JS framework, but I do know them.
All that said, let’s begin.
It really started in a stupid way as I was listing numerous “UI kit” framework and comparing their lightness and other features to select a few for a personal project.
Here a non-exhaustive list
- Material Design Lite
At that point I was thinking
oh boy it’s not only the JS framework that popup every day, it is also the UI kit
Simply because I don’t build a huge JS app, simply because I don’t like Single Page Application (SPA) and well why load a gazillion JS file if I only need a very basic AJAX request ? also the whole logic and work is done server-side so really there is not need to use something like React or Angular or whatever.
But … what if I wanted to make a SPA, which one of those JS framework would I chose ?
I thought the answer was obvious: write the code in TypeScript and use AngularJS 2
as I recently watched this video TypeScript and Angular 2 and all the dev are kind of my heroes (if you never read the blog of Miško Hevery it is a goldmine of article about singleton, dependency-injection, testing, etc.).
Well… not so fast.
Angular is made by Google, and there have been already a lot of angry JS dev complaining about the move from Angular 1 to Angular 2, while at the same time there is also something on the rise since 2013 which are the Web Components.
Me, naively, I thought that those web components would simply “plugin” into Angular, you know, as components of something bigger.
So here a little introduction: A Guide to Web Components
In an ideal scenario, the HTML language would be expressive enough to create complex UI widgets and also extensible so that we, the developers, could fill in any gaps with our own tags. Today, this is finally possible through a new set of standards called Web Components.
Yeah that’s true, if your “little” app that use jQuery, Backbone, knockout etc. grow a little bit bigger you find yourself with a lot of bloat, and that’s why since then those JS framework evolved and now we have Angular and React.
But it’s not exactly like that.
If you go there Google Developers Web Tools
you can find first the Web Starter Kit
What is Web Starter Kit?
Web Starter Kit is an easy way to start a new project. It comes with all the files you could need to start a new web project including a build process, boilerplate HTML and styles.
A responsive layout is included with the kit that adapts to fit the device your user is viewing it on. This helps you hit the ground running with an experience that looks good everywhere. Try a sample layout.
Web Starter Kit strives to give you a high performance starting point out of the box and we actively work on delivering the best PageSpeed Insights score and frame-rate possible.
We hope that you tailor Web Starter Kit by deleting anything that you don’t want or need. It’s a starting point - nothing more.
To me, this is pre “Material Design” UI kit (eg. without a JS framework attached), oh good that’s what I want right ?
Just underneath you can also see Polymer Starter Kit
Set up for success using Polymer in production.
Start your project with the Polymer Starter Kit to get the most out of the library, elements built with Polymer, and Polymer-related tools.
Components for nearly any app, out of the box
Get started quickly with the complete set of the same paper and iron elements used by Google products.
Complete build chain
Build your app using a suite of gulp tasks that leverage the full range of Polymer-related tools, such as vulcanize, crisper, and more.
Testing made easy
Test your app and all of its components using the built-in and pre-configured Web Component Tester.
Flexible app theming
Easily theme your entire application, including the built-in elements, using app-level Custom CSS Properties.
Framework-free, or framework-compatible
Build your app out of elements, or wire in an external framework to handle business logic. It’s up to you!
Responsive app layout boilerplate
Start off mobile-friendly with the included layout boilerplate.
Live Browser Reloading
Reload the browser in real-time anytime an edit is made, without the need for an extension.
Material design ready
Use the built-in paper elements to create a full material design-style app.
Holly shit batman, that’s a lot of features.
But wait, it’s not a JS framework ?
No, those are Web Components, 3 years have passed and now the thing seems to be ready for everywhere.
and toward the end of the page
Oh yeah this thing definitively seems ready and Google is even pushing for it.
But wait … wait… wait… what does he leave us with Angular and React ?
first you really want to know what is the difference between Polymer and Angular
Here’s the difference between Polymer and Angular
So you investigate a little more and find this blog post (yeah it took a long time to arrive there)
Why Angular 2 Is DOA
(eg. DOA = Dead On Arrival)
and now all the quote will be from JS dev, and well … you can see that no everyone agree
I have seen and heard some ambitious things being said about Angular 2. It appears as though everyone is making the assumption that because the Angular brand is so well known and people are falsely under the impression it is a first-class Google project (even though Google offers no support).
Same here, everything I heard show Angular 2 as the next big thing by Google (had no idea it was not supported which is already a big hint).
Just because Google provide some resources for the Angular project, they have another conflicting library called Polymer which they seem to be pushing for quite hard, even more-so than Angular 2. I am not saying that Google is snobbing Angular because apparently a few applications internally already are using it, but publicly Google’s stance seems to be very much pro-Polymer.
wait a minute… conflicting ? are not the two supposed to work with each other ?
I think once upon a time the words, “Google quality” carried some weight, but historically Google have shown they have no qualms chopping something (like the beloved Google Reader) if it does not align with their agenda or business.
I use Google products a lot, gmail first and many many more, but that’s true
when Google decide to kill a product they don’t really hesitate.
Some products I could not give a shit like Google Wave, but many others that I miss dearly like Google Reader, Google Code, etc.
When you see that Angular is under the same fate … honestly you can seriously and legitimately worry.
But there is one problem that Angular 2 did not address. The one pain-point of the original framework, which while did not hinder its success, was definitely a point everyone mentioned in most articles written about it: learning curve.
that’s not the only one, sure you go on the learn Angular 2 in 5mn tutorila and spend a couple of hours instead, not because you’re stupid, not because you’re new at JS, but because of all the tooling, the setup, the specific way to do things etc…
I can easily argue that if you’re writing Angular 2, you’re not writing JS.
Even though Angular 2 treats TypeScript as a first-class citizen and like other frameworks, utilises features and API’s in ECMAScript 2015, it still suffers from a bad case of over-engineering.
And sorry JS guys, but when you see the massive adoption of TypeScript
and how close the syntax is to ActionScript 3, which by the way is ECMAScript 4,
you are really wondering about why many years ago the TC39 committee decided
to kill ES4 in favour of ESNext … it is obvious that JS dev want types.
The complexity of the templating language is enough to make me quiver. There is nothing intuitive about Angular 2’s templating syntax and after all of the complaints people had with the confusing terminology and abstraction in the original version, you would think that the Angular 2 team would have wanted to take a more intuitive approach to its design.
Honestly, I want to use Angular 2, but reading this make me want to not to even try.
Let be clear, I did try stuff like Knockout/Backbone/etc. and their downfall was the complexity of the templating which turned in a lot of bloat …
Why on earth would I trade bloated JS framework for another ?
side note: I’m still wondering why all the browsers did not implement E4X,
I mean XML -> SGML -> HTML, who would not want something like E4X ?
see “massive discussion on Github”: Angular 2 DOA
with this interesting little nugget
This has been clarified several times on several channels already. The way A1 was build doesn’t allow to get the benefits, features and performance A2 needs to bring to the table.
so A1 was not performant ? well… at least not enough.
You think I’m unfair towards Angular ?
let’s be clear we’re not talking about a small JS framework build by a motivated guy in his basement (and there is nothing wrong with that)…
we’re talking about a JS framework with the full strength of Google Engineering behind it, if you watched the video “TypeScript and Angular 2”, those guys not only build their own compiler (remember closure compiler) but they can also talk directly to the engineers at Microsoft who work on the TypeScript compiler and ask features …
anyway let’s continue
Compare the getting started setup for Angular 2 to Angular 1 and a library like React. Considerable tooling is required to work with Angular 2 which to be honest is nothing new for a modern front-end web application.
no kidding … not even mentioning the irony of people choosing JS because it is the only language available in the browser … but now everyone use a transpiler
It definitely takes more than 5 minutes to get everything setup once you factor in things like NPM 3 is slow as fuck and slower network connections mean dependencies take longer to download, even Aurelia can fall into this trap. This is where React has the advantage over most modern frameworks in that it requires no tooling and has the fastest setup time of anything else out there currently.
I realise React is being thrown around a lot here and I am well aware that React is first and foremost a library, it is not a framework. However, React is being used for the same purposes as frameworks like Angular are and therefore, it is a framework by association (in my opinion).
At that moment, I was like “oh if Angular 2 is not the solution, that’s OK I will just use React”, I’m sooooooooo naive …
so after long paragraph about who was there first (which imho does not matter at all)
the author end with
So while some have high hopes of Angular 2 becoming just as popular as Angular 1 did, I doubt it will happen. The simplicity of React for me personally is more appealing, I never have to look at any kind of documentation when I use it, but if I do, the documentation is great. And as many of you know, I have been working with Aurelia for nearly a year now and love it (I even use it with React).
I don’t wish harm on Angular 2, but I think some serious poor decisions and the fact it took so long to just release a beta, the odds are not in their favour. Everyone who isn’t still using Angular 1 or waiting for version 2 has since moved on to use React or other libraries/frameworks that have released and matured in the time.
At that point, I was more or less in the situation, my high hopes for Angular 2 were gone, and I was about to look into “React vs Polymer” see which one has more chance to not be killed in the next couple of years.
And then I read the comments LOL
here we go
The biggest mistake in Angular 2 project was they’ve dropped Eisneberg and his brilliant ideas. Now things are complicated so much that spaghetti is a boilerplate, syntax is just stupid, and it creates a lot more problems rather then solving while developing large SPA. Aurelia is emerging and making Angular 2 look really poor.
The fact that google made or use something really means squat huh?
I mean they still use Dart, GO and a few other things internally but externally no one seems to care.
But really, you wonder if they care about anything past 6 months….sorry you had 6 months, didnt become the next sliced bread, so lets try something else.
Any thoughts on using React/Flux for a full SPA? I was thinking that React is really targeted to individual components that need to be very performant, but it seems like React is looking to be a standalone framework now. Is this trying to fit a square peg in a round hole, or would this be a viable option for an enterprise SPA?
Brian if it’s a long term project i won’t put any money on React they are still on early pre-alpha 0.14.5 and changing stuff every day and only fb internals knows what is going on there. When it will be stable 1.0-RELEASE then it will be a real game changer.
oh React is not v1.0 stable ?
I think your article is not valuable. I tried React and now I’m trying Angular 2.0 – I don’t agree with you. React is already more than year and it’s NOT stable. Also I agree with “papasound” thoughts about React: “When it will be stable 1.0-RELEASE then it will be a real game changer”. But it will be too late because Angular 2 is already in beta.
oh Angular 2 seems more close to v1.0 stable than React
but wait … Polymer is the one who have less chance to be killed by Google
Thanks for the comment Aro. It sounds like your experience might differ from others and you are entitled to disagree. I am not actually sure if you have used React, it is quite stable. I’ve built 3 applications with it and they are production applications. The release tag is irrelevant to the state of React in my opinion. It is more of a confidence and feature set thing than stability.
All software can be improved, not even Angular 2 in its beta state is any more or less stable. Your comment really makes no sense because you say it is too late because Angular 2 is already in beta, like the beta tag means it is stable. I think tags are irrelevant. Google’s Gmail was famously in beta for like 5 years and nobody ever had an issue with it.
As of React 0.14, Facebook consider it to be production stable as per this post. They say the following in the opening paragraph:
As with all of our releases, we consider this version to be stable enough to use in production and recommend that you upgrade in order to take advantage of our latest improvements.
No offence to the Angular 2 team, but it took them almost two years to release a beta. They rewrote it so many times, kept changing direction and scope as well. Although React is smaller, it is by no means any less complex in terms of code complexity. The team working on React over at Facebook are incredibly talented and Facebook use this themselves further bolstering confidence in it being production stable.
So React is more stable than Angular 2 ?
React requires “no tooling”?
With Babel 5 maybe. But Babel 6 has dropped its browser.js inline transpiling tool. So it looks like React does require tooling now.
React has the most broken ecosystem in the world, there are like more than a dozen implementations of Flux and you say the stack is stable?
At least one of the guys that started React has left and has created yet another micro framework to handle the shitty React syntax. You have giant switch statements, that look like old Pascal code, etc…
React is far, very far from being perfect as is Angular or any other framework.
Be objective bro! Compare code, measure shit, benchmark it, state your case. Your article is clearly Troll fodder… and they are coming the Troll Wars are coming, hundreds, maybe thousands of Angular 2 vs React…
So sick of this shit, there is no perfect solution use what you think is best without needlessly bashing other shit.
well bro, I really try hard to be objective but so far it look like a huge mess
I disagree. I prefer Angular 2.
thanks that help a lot (completely ironic)
I have tried angular 2 for a few hours and I could not get started with a single small example. It’s seems very difficult to me. And the fact that I can not migrate my old Angular 1 apps to Angular 2 has made me change to React.
ah! exactly what we learned from Ruby
if you want to change some part of your app and the part is a little too big
then you may as well change the whole framework
you may also join the discussion here
which lead to
OMG did that just happen ?
it’s like the vicious circle of the ultimate death, you follow an article, follow the comments, to end up where you started: no fucking solutions.
So, what conclusion ?
it just does not seem fucking ready…
So far, the only thing that seems not being a complete nightmare is to go with Polymer and progressive enhancement, but if you do that you don’t really write a JS app, you write HTML with some bit of JS this and there, like you were doing many many years ago with good old HTML and jQuery.
And do that I will personally use ActionScript 3 server side to render Web Components client side, not because I absolutely want to use AS3 (well… little ) but because it seems the most sane thing to do.