Live data from Hacker News

Ask HN: What is the best alternative to Angular JavaScript framework?

news.ycombinator.com

41–50 of 64 posts

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#41
post #18

React, which is "just the V in MVC" Combine that with Reflux[1], which is a more opinionated framework around it. It's conceptually a little different than the Flux pattern that Facebook recommends, but the changes make sense after you have some insight into the Flux pitfalls. Stir in some react-router[2]. It's still not as full featured as Angular or Ember, so you'll need to adjust your expectations there. On that n…

Will all due respect, what are the odds that a single guy has "insights into Flux pitfalls" that the gigantic creator of React, that is deploying the tech for billions of people, has missed?

Flux, as prescribed by Facebook, involves a couple singletons and implementing an action requires coordinated changes across 3-4 files. Many people find this undesirable.

The important part about the pattern is the unidirectional data flow, which limits the amount of code you have to search through in order to track down a bug. How to go about making this happen varies and there are quite a few 'Flux' libraries bouncing around the React ecosystem.

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#42
post #18

React, which is "just the V in MVC" Combine that with Reflux[1], which is a more opinionated framework around it. It's conceptually a little different than the Flux pattern that Facebook recommends, but the changes make sense after you have some insight into the Flux pitfalls. Stir in some react-router[2]. It's still not as full featured as Angular or Ember, so you'll need to adjust your expectations there. On that n…

Will all due respect, what are the odds that a single guy has "insights into Flux pitfalls" that the gigantic creator of React, that is deploying the tech for billions of people, has missed?

That's a reasonable concern if Flux is a framework. But if you watch Facebook's presentations on it, it is not: it's a design pattern. And a very lightweight one. There's a pretty big design space for tradeoffs in it.

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#43
EmberJS is a great alternative to Angular, and is often considered its primary competitor. To summarize, Ember is basically Rails for the front-end. It emphasizes convention over configuration, and it was designed to aid in the construction of "ambitious web applications", i.e. Javascript-heavy single-page apps that need best-in-class routing and composable views all the way down.

Companies using Ember: http://emberjs.com/ember-users/

The getting started guide: http://emberjs.com/guides/

The command line tool you should use to initialize your Ember projects (not yet mentioned in the getting started guide but it will be soon): http://www.ember-cli.com/

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#44
post #31

Mithril. https://lhorie.github.io/mithril/

Agreed. Also, combined with https://www.npmjs.org/package/msx it feels even more modern with jsx templating

I really dislike JSX and I don't see the appeal. Mixing HTML/JS just seems like an awful idea. Mixing the two is one of the reasons I hate Angular templates.

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#45
post #33

I really like KnockoutJS, having used it on multiple projects, both personal and professional. Many will say that it can't really be apples-to-apples compared with Angular since it's technically MVVM, it lacks many of Angular's features, like dependency injection etc. etc. And that's all true. But, the end result for me is that I'm able to rapidly build sophisticated client apps. I'd have to dig up the links, but the…

Do you do databinding? I like KnockoutJS too, but to me it is purely limited to making a page more interactive, not much with back-end integration.

Knockout doesn't have built-ins to wire up UI actions automatically to CRUD calls, but the portion of that you end up having to implement is usually extremely small.

As far a wiring up objects to knockout observables you have two options:

1) use the mapping plugin. I tend to stay away from this, as it makes everything on objects observable. Not bad per-se, but I like more control.

2) define your own model...its easy: https://gist.github.com/jdc0589/c48c2355302390ad954b

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#46
post #7

Note that the weird direction is not final yet - Angular 2.0 is still a ways off, you don't actually have to use AtScript to build your applications (ES6, ES6 + Traceur annotations, CoffeeScript, Dart, AtScript should all work), and the funky HTML attribute syntax is still under debate because most browsers don't actually support .setAttribute() with bracketed attribute names. Besides, 1.x works and will keep functio…

even if you don't have to use AtScript to write your app you will still need to know it to understand examples. This will make it mandatory to learn for most intents and purposes.

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#47

I really like KnockoutJS, having used it on multiple projects, both personal and professional. Many will say that it can't really be apples-to-apples compared with Angular since it's technically MVVM, it lacks many of Angular's features, like dependency injection etc. etc. And that's all true. But, the end result for me is that I'm able to rapidly build sophisticated client apps. I'd have to dig up the links, but the…

KnockoutJS is great. It's small, simple, stable, it works on every browser, even IE6 and mixing it in with other technologies is no problem. Being able to easily read through the entire code of KnockoutJS is another big plus. I've used this on a few big projects so far and it's just a pleasure to work with.

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#48
post #46
post #7

Note that the weird direction is not final yet - Angular 2.0 is still a ways off, you don't actually have to use AtScript to build your applications (ES6, ES6 + Traceur annotations, CoffeeScript, Dart, AtScript should all work), and the funky HTML attribute syntax is still under debate because most browsers don't actually support .setAttribute() with bracketed attribute names. Besides, 1.x works and will keep functio…

even if you don't have to use AtScript to write your app you will still need to know it to understand examples. This will make it mandatory to learn for most intents and purposes.

Agreed. It seems like it's primary purpose is to add dependency injection annotations, so its similar to today needing to understand `['$q', function($q) {` notation, or the special `$get` function for providers.

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#49
post #30

Mithril might be worth looking into. It's similar to React in terms of providing a unidirectional data flow pattern for code organization, and it comes with a few other useful tools out of the box (e.g. routing, ajax, promises), despite being smaller in terms of byte count. It's designed to leverage generic knowledge as much as possible, as opposed to introducing a large amount of framework-specific terminology that…

Thanks for your work on Mithril. I haven't had the opportunity to use it professionally, but I'm using it for a hobby project and it's really great to work with.

For those looking for real world uses of Mithril, one site I know of that has a bunch of visitors and uses Mithril is the MELPA Emacs package repository: http://melpa.org

Re: Ask HN: What is the best alternative to Angular JavaScript framework?

#50
post #30

Mithril might be worth looking into. It's similar to React in terms of providing a unidirectional data flow pattern for code organization, and it comes with a few other useful tools out of the box (e.g. routing, ajax, promises), despite being smaller in terms of byte count. It's designed to leverage generic knowledge as much as possible, as opposed to introducing a large amount of framework-specific terminology that…

Thanks for your work on Mithril. I haven't had the opportunity to use it professionally, but I'm using it for a hobby project and it's really great to work with. For those looking for real world uses of Mithril, one site I know of that has a bunch of visitors and uses Mithril is the MELPA Emacs package repository: http://melpa.org

http://lichess.org is also using it on its chess boards. The developer said he was moving everything else over to it as well.
Post reply on HN