News for hackers. Stuff that matters.
Re:Angular 4.0.0 Now Available by kitsune_ on Friday March 24, 2017 @03:26AM (#13947267)
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.
Re:Angular 4.0.0 Now Available by sadok on Friday March 24, 2017 @03:40AM (#13947307)
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.

Re:Angular 4.0.0 Now Available by mhd on Friday March 24, 2017 @04:31AM (#13947479)
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".

Re:Angular 4.0.0 Now Available by thewhitetulip on Friday March 24, 2017 @05:05AM (#13947596)
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.
Re:Angular 4.0.0 Now Available by mhd on Friday March 24, 2017 @05:22AM (#13947650)
Well, with a lot of the light ones, you're buying into an ecosystem, not a framework.

Which often has the same end result, with a bit of added customization and some hard choices way too early.

Re:Angular 4.0.0 Now Available by thewhitetulip on Friday March 24, 2017 @03:33AM (#13947284)
Despite being new to AJAX, I wrote a Vue app within a week, 4-5 weeks into reading Angular, I was still reading the docs.

Edit: removed a brash statement.

Re:Angular 4.0.0 Now Available by kitsune_ on Friday March 24, 2017 @04:46AM (#13947531)
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.

Re:Angular 4.0.0 Now Available by nogridbag on Friday March 24, 2017 @12:30PM (#13950072)
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:

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).

Re:Angular 4.0.0 Now Available by thewhitetulip on Friday March 24, 2017 @04:56AM (#13947569)
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.

Re:Angular 4.0.0 Now Available by minhoryang on Friday March 24, 2017 @06:03AM (#13947796)
+1
Re:Angular 4.0.0 Now Available by jholman on Friday March 24, 2017 @04:29AM (#13947474)
Meh, it says something, but not a lot.

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.

Re:Angular 4.0.0 Now Available by thewhitetulip on Friday March 24, 2017 @05:03AM (#13947590)
>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 :-)

Re:Angular 4.0.0 Now Available by basdp on Friday March 24, 2017 @04:26AM (#13947467)
It says nothing more than Angular has a lot more documentation. Perhaps because Angular has a lot more features.
Re:Angular 4.0.0 Now Available by thewhitetulip on Friday March 24, 2017 @04:51AM (#13947545)
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.

Re:Angular 4.0.0 Now Available by EugeneOZ on Friday March 24, 2017 @05:38AM (#13947708)
Try jQuery - even more simple.
Re:Angular 4.0.0 Now Available by thewhitetulip on Friday March 24, 2017 @06:11AM (#13947838)
I tried jQuery and found it to be more difficult to manage a single page app.
Re:Angular 4.0.0 Now Available by EugeneOZ on Friday March 24, 2017 @06:39AM (#13947972)
Same story with other "simple" frameworks - they are only simple while apps are simple.