Live data from Hacker News

Ask HN: Is there a sane alternative to Angular and React?

news.ycombinator.com

31–40 of 85 posts

Re: Ask HN: Is there a sane alternative to Angular and React?

#31
post #26

Vue.js is saner because it does not have that JSX nonsense and you can still write most of the code however you like, and later upgrade to babel,typescript etc. Particularly I like component structure https://vuejs.org/v2/guide/single-file-components.html which kinda does the same in more traditional approach.

It also works well in non npm/node.js environments.

Re: Ask HN: Is there a sane alternative to Angular and React?

#32

No, none of this platform is sane. It's not designed, it's evolved. Embrace the madness or fail. The web is not desktop applications. The network is always there, the network is slow, the network is asynchronous. The network can fail. You cannot abstract over this with a clever library. Unless you don't care about pushing out 4mb of javascript before first render, you can't ignore it. The front-end is not a server ba…

This is one the most insightful responses, so much of this rings true to me.

It's relatively straightforward to just echo out some html from a server. This works pretty well, and conceptually it's easy.

I remember reading an article recently (I can't find it) that argued that the human readable part of the web should have been just this, a place for static pages to render and be read. The reason it works so well is because that was what it was designed and build for. So it has basically just completely escalated by its attempt to replace native applications. Except it is and always will be worse at everything a native application does.

You have to seriously ask yourself if you actually have that problem before just jumping on the bandwagon.

I suppose that is sort of complicated by the fact that every framework out there tries to sell itself as the best thing since sliced bread, except advertising what is for.

Browsers have come a long way in 10 years, if you haven't been paying attention.

It is absolutely amazing what has been achieved.

Re: Ask HN: Is there a sane alternative to Angular and React?

#34
post #2

Excellent question. Turns out there is: http://elm-lang.org Is a Haskell inspired programming language that makes developing front end a delight. It helps to build Reliable front ends. Watch this conference to get a sense of what Elm does. Making the Backend Team Jelous[1] Plus the Elm architecture makes everything orderly and easy to understand. Quite a change from the mess of react components and Angular rewrites.…

This looks great, and thanks for providing the links. Is Elm production ready? Have you used it to build any apps?

I talk about my experience. I deployed Elm to production in several projects for the biggest group fitness company in the US.

It's incredible. Compiler errors are incredible. No undefined bullshit. It's purely functional, so the code you need to understand at the same time is always gonna be inside 20 lines. And you can use it with javascript if you want too.

You will learn a lot using a pure functional programming language. Programming is about transforming data, so even if I go back to any OO language I learned that state can cause several problems.

Re: Ask HN: Is there a sane alternative to Angular and React?

#35
post #2

Excellent question. Turns out there is: http://elm-lang.org Is a Haskell inspired programming language that makes developing front end a delight. It helps to build Reliable front ends. Watch this conference to get a sense of what Elm does. Making the Backend Team Jelous[1] Plus the Elm architecture makes everything orderly and easy to understand. Quite a change from the mess of react components and Angular rewrites.…

This looks great, and thanks for providing the links. Is Elm production ready? Have you used it to build any apps?

NoRedInk use it in production and are quite big advocates (having hired the BDFL) - http://tech.noredink.com/

Re: Ask HN: Is there a sane alternative to Angular and React?

#36
post #26

Vue.js is saner because it does not have that JSX nonsense and you can still write most of the code however you like, and later upgrade to babel,typescript etc. Particularly I like component structure https://vuejs.org/v2/guide/single-file-components.html which kinda does the same in more traditional approach.

The main reason I didn't consider Vue was because I like coupling HTML and JS like React does. But this seems like a much nicer way of doing it than JSX. I'll have to give Vue another chance.

Re: Ask HN: Is there a sane alternative to Angular and React?

#37

No, none of this platform is sane. It's not designed, it's evolved. Embrace the madness or fail. The web is not desktop applications. The network is always there, the network is slow, the network is asynchronous. The network can fail. You cannot abstract over this with a clever library. Unless you don't care about pushing out 4mb of javascript before first render, you can't ignore it. The front-end is not a server ba…

This is one the most insightful responses, so much of this rings true to me. It's relatively straightforward to just echo out some html from a server. This works pretty well, and conceptually it's easy. I remember reading an article recently (I can't find it) that argued that the human readable part of the web should have been just this, a place for static pages to render and be read. The reason it works so well is b…

To clarify, when I said "the web is not desktop applications", I meant that you cannot program a "web app" as if it's a desktop application. The assumptions are all different. The entire execution model, and the way modules are included is different. You can achieve things very much like a desktop application, as far as a user is concerned. But: The network will slap you if you ever decide it's something the compiler is taking care of for you.

Re: Ask HN: Is there a sane alternative to Angular and React?

#38
post #36
post #26

Vue.js is saner because it does not have that JSX nonsense and you can still write most of the code however you like, and later upgrade to babel,typescript etc. Particularly I like component structure https://vuejs.org/v2/guide/single-file-components.html which kinda does the same in more traditional approach.

The main reason I didn't consider Vue was because I like coupling HTML and JS like React does. But this seems like a much nicer way of doing it than JSX. I'll have to give Vue another chance.

> But this seems like a much nicer way of doing it than JSX.

Note that there is no requirement to use JSX, JSX is just syntactic sugar for the underlying function calls which you can use directly: https://facebook.github.io/react/docs/react-without-jsx.html

That's useful when you don't want to add a local compilation file when developing/debugging.

Re: Ask HN: Is there a sane alternative to Angular and React?

#39
post #34

Earlier quoted context omitted.

This looks great, and thanks for providing the links. Is Elm production ready? Have you used it to build any apps?

I talk about my experience. I deployed Elm to production in several projects for the biggest group fitness company in the US. It's incredible. Compiler errors are incredible. No undefined bullshit. It's purely functional, so the code you need to understand at the same time is always gonna be inside 20 lines. And you can use it with javascript if you want too. You will learn a lot using a pure functional programming l…

That sounds great. Did you have to convince anyone to adopt Elm or were you free to pick your language of choice? Using a pure functional language appeals to me as well.

Re: Ask HN: Is there a sane alternative to Angular and React?

#40
post #36

Earlier quoted context omitted.

The main reason I didn't consider Vue was because I like coupling HTML and JS like React does. But this seems like a much nicer way of doing it than JSX. I'll have to give Vue another chance.

> But this seems like a much nicer way of doing it than JSX. Note that there is no requirement to use JSX, JSX is just syntactic sugar for the underlying function calls which you can use directly: https://facebook.github.io/react/docs/react-without-jsx.html That's useful when you don't want to add a local compilation file when developing/debugging.

And Vue can use JSX.
Post reply on HN