Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have the feeling Angular was fad.

I met many people who bet on it, but most of them, even the 'fanboys' didn't seem to be 100% convinced of it.

"We panicked multiple times, bit it always turned out we were wrong and just didn't do things the Angular-Way"

Ember, for example, is kicking it for a much longer time, even with fewer ppl using it.



I am using Vue, which is much simpler than Angular. With Angular2, I spent a few weeks and still wasn't able to understand how things are working, contrast that with Vue, I was up and running within one week, migrated my html only app to use AJAX in a matter of a week!

https://github.com/thewhitetulip/Tasks-vue

Vue.JS is great to use!


Echoing the same here. I just found Vue a few days ago. Instead of starting with the documented way on their site, I'm going the Typescript with Components route, so I have classes, and typing. Now if I compare all of the frameworks I've been learning lately. Ang2 has a horrible module system that just gets in the way and confuses the crap out of everyone. Vue with Typescript is basically Ang2 without that horrible module system. React's flux model still bothers the crap out of me. Polymer's not on NPM and refuses to see that as the way to win.

Polymer's got the BEST router system however. It makes the URL choppable at the component level, not the app level. So you can literally throw in an external component and it can add it's OWN part of the overall URL. I don't know any other framework that can let an external component eat some of the URL if it needs to.


For the record, we do not refuse to see npm as the "best way to win", we just have work to do to get there without abandoning out current users. We are currently working on npm support, and have kept the github issue up-to-date with developments.


Same with React. Tiny API, not much concepts.

Even Cycle.js just has a few concepts and is even more flexible than React or Vue.

Angular 1&2 feels like someone let loose a Java or C# dev onto JavaScript, who tried to apply all the design patterns™


I feel Vue is simpler and faster as far as programming is concerned as compared with React.


yes, it's more OOP like the others. which is probably easier to understand for most devs.

But I'm currently buying into the FP fad, haha


Given that FP has been around longer than OO, I'm not sure it qualifies as a fad!


:-D I am not in any fad as such, but for some reason I find writing functions better than writing classes, it is faster and more intuitive to write vue-js code than react code. Simple architecture and small API.


Funny you should say that since the other person was implying that React apps are usually functional(largely when paired with Redux).


I was under the impression that functional programming and programming by writing functions are two different things.

Also, I might have said it incorrectly, the thing is, Vue has a clean API, you have to hook up lifecycle functions, so all I have to write is a Vue element with six lifecycle functions and one function each for distinct AJAX call.

Sorry for the confusion.


React seems like an overly complicated mess to me. We've worked for years to separate HTML, CSS and Javascript, and the reasons for doing that haven't changed.


Many think about separation of concerns when splitting up CSS, HTML and JS, but what they are doing is separation of technologies instead.


No, what we are doing is separation of concerns. CSS, HTML and Javascript aren't just separate technologies, they're completely separate and unrelated concepts.

HTML is content. CSS is style. Javascript is shit.


I am enjoying VueJS also and it is the 1st framework I've developed in since starting dev. I measure my skills on how comfortable I am doing whatever it is I am doing. I have to say that I've enjoyed Vue thus far, but I don't have any other framework to compare it to. I also have to say that the Front-End Developer Handbook 2017 looks pretty sweet for anyone in front-end dev right now. But again, I'm only an adolescent at this, what do I know?!?! :)


Me too, the first JS franework, I am writing an easy to ubderstand tutorial for VueJS, would you be interested?


Thanks for the offer, but my plate is full right now, sorry.


When I started looking at frontend frameworks a couple years ago, I ended up with Vue as well. Just enough functionality for the majority of tasks. Angular was waaaaaaay too complex for most needs. Simple two way data binding is where it's at.


For those thinking about Angular2, I would recommend angular-cli[1] and then going through the tutorials in Angular documentation[2].

Angular-cli because it provides a scaffold for getting started with the project and getting something up and running. The documentation feels pretty good. I like the example app they are building and the documentation format (they provide the full source code for the files right there in the documentation, no need to navigate to somewhere else).

[1] https://github.com/angular/angular-cli [2] https://angular.io/docs/ts/latest/


I worked with Ember at a YC company a year and a half ago. At the time at least, it was really hard to find good docs about it; I read Ember.js in Action, but it was already mostly outdated since ember-cli was just released. Lots of help ends up being found in random gists or people's blog on page 10 of Google Search. I haven't touched it since last winter though, so not sure how the situation has evolved, but I'm sure that was one of the big entry barriers for Ember.


True, but I had this feeling with many frameworks.

I'm not saying this is a good thing, but I started to read more in the frameworks repos after trying a few of them.

I think this is a barrier for most devs, but I think it made me better at coding.


The highest barrier is time. If people need to get things done, do they have time to look into the code?


I have the feeling Angular was fad.

The only client side JS library that doesn't seem to be a fad is jquery. Which now has backlash - maybe that's a sign of success in frontend dev land?


My definition of "not a fad" is "now has native browser support". I'm thinking of jQuery influencing native querySelector as an example.


Well, jQuery is rather low level. So this abstraction level seems to be solved.

Current frameworks try to solve a higher level and most failed.


What is this "higher abstraction level"? The frameworks are trying to solve components, and they're doing it by introducing a needlessly complex API. All you need is a template library like Handlebars and you're mostly set. For an SPA, a routing library like PageJS (https://visionmedia.github.io/page.js/) should have you covered. If you prefer server-side rendering over SPA, just use jQuery-Pjax to get all the speed advantages of an SPA and all the SEO advantages of server-side rendering.


I think "just a template library" would re-render the complete DOM for every update, or require you to manually wire up all components. The "shadow DOM" at the root of React is quite central to its appeal, as it speeds up DOM changes by several orders of magnitude.


That's if you use your template library to emulate React. What jQuery brings to the table is that you can sprinkle in a few selectors, event listeners and ajax calls, then you have no need for a shadow dom.

The minimal transform is usually trivial to implement by hand:

  var message = $('.widget__message'),
      title   = $('.widget__title'),
      button  = $('.widget__button');
  button.on('click', () => {
      $.get('/api/widget/1', response => {
          title.text(response.text);
          message.text(response.message);
      });
  });
Not only is this technique significantly more flexible than react, there's no magic about it so it's far easier to reason about when things aren't working.


I am genuinely curious what percentage of web apps are demonstrably affected by "slow DOM updates" of several orders of magnitude.

You realize React solves a performance problem that it imposes on itself, due to immutability, right?

Pre-react web apps to do attempt to re-render the entire page root on every press of a key. They simply handle events and remove/add/update the specific DOM nodes that are appropriate.

remember appendChild() and removeChild() ? These are quite fast.


Usually I've experienced the performance issues with poor event handling (at the control level) on grid-like views...

That said, I like React's component structure... it works with me more than most. Though I tend to dev against react and build against preact-compat for reduced size. Which iirc uses real dom as point of truth.

The main take away from React is flux-like state management (ie Redux)... this is what helps with the real pain of larger apps (especially MVC) and that is cross-cutting concerns and state management. This is why Redux has been adopted, or roughly copied to all the up and coming options.


O.K., these organizational/structural concerns are fine, but are not what my point is addressing, which was OPs motivation of React on performance grounds.

Yes, grids seem to always be a problem. This is one of those 'sticky wickets' (for frameworks too!). Of course it can be solved, but i'm more interested in the general case here.


The problem with that is then you end up with the same horrible mess of event handlers all mutating global shared state. That's the same problem you have in most C# and Java UI programmes too.


not what my point is addressing


Yes it is. You said:

>They simply handle events and remove/add/update the specific DOM nodes that are appropriate.

Don't bloody pretend you didn't.


yes, "They simply handle events and remove/add/update the specific DOM nodes that are appropriate." is intended as a clarification as to why DOM updates in this style are FAST. I am not intending with that statement for it to serve any purposes about code clarity or structure. (Which i think is clear in the context of what I wrote in the same paragraph, and what I am responding to.)

I am specifically responding to this:

The "shadow DOM" at the root of React is quite central to its appeal, as it speeds up DOM changes by several orders of magnitude."

Of course you can take isolated sentences from me and purport alternate motivations (code clarity) to them so that you can make a new argument against that alternate motivation, but that is a different conversation.


There seems to be a downvote brigade on us React disparagers. Try not to worry too much about. We're releasing faster than them anyway ;)


I am in total agreement with you. I am rarely updating more than a handful of DOM nodes in a pass. I don't need a diffing algorithm to tell me which ones are gonna change.


Honestly I had hoped Angular 2 (with iminent release of 4) would be the holy grail. It took soo long to come out, I dabbled in React and have not looked back. However I'm under no illusions that "this is it". Vue is definitely one I want to explore.


Look into polymer, its like vue (vue was inspired by it a lot), and it is really small in size (polyfills IF needed weigh only 20kb). And everything is a component - imo this is what Angular 2.x should have been.

You just use pure javascript/web standards html to create your application. All the people that I worked with that used it were really happy with it.


I think Cycle.js is a better Observable framework than Angular 2.

But I guess React will be big for the next years, because of FB.


As with any JS framework, much of what you want to achieve with it, has a lot to do with the number of developers building packages to make things easier. There is a lot going for React because a lot of effort is going into the world of React outside of FB.


When I hear the word "way", I reach for my gun.

Seriously though, if there has to be a certain "way" of using some technology I can't help but remember Code Complete, that you should always code into a language as opposed to coding in it.


Same here.

I did Ember while Angular was "a thing".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: