Live data from Hacker News

Ask HN: What is the best JavaScript stack for a beginner to learn?

news.ycombinator.com

21–30 of 61 posts

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#21
I'd say its extremely difficult to give you a good answer without knowing what you are trying to build. Is the goal to be able to add some interactivity to otherwise relatively static or content driven websites? Do you want to long running client side apps? Is using JavaScript on both the client and server a goal? The JS community is pretty diverse, largely because there are a lot of wildly different use cases.

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#22
post #13

Earlier quoted context omitted.

This is the right answer. The best stack for a JS beginner to learn is JS, HTML, and CSS. Throw in some localStorage if you need persistence. The OP is definitely coming at this from the wrong perspective (the need to pick a framework). Instead, learn the core fundamentals and perhaps the nuances of a few different libraries, before you have to pick a stack. Otherwise, you won't even know the pros/cons of the stack y…

The word "framework" should always raise flags, because it implies a coding universe that is unfriendly to external software, thus hampering composability.

Totally agree. I would go so far as to say one shouldn't use (or even pick) a framework, before having the skills to write such a framework. The benefit of a framework should be time savings; it cannot make up for lack of understanding of what the framework is doing and why. Continued use of the framework should always be weighed against the cost (unfriendliness to external software and composability).

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#23
My suggestion would be to learn Sencha ExtJs [1]. It has a proper MVC framework and is very mature compared to the others mentioned here.

It's not something that can be learnt over the weekend and takes time to master.

Just like Rails, it seems to be able to a lot of things by magic and needs some dedicated effort to understand. This article from their blog [2] and this video [3] gives a very good comparison of what Sencha ExtJs covers with respect to other Javascript frameworks.

[1] http://www.sencha.com/products/extjs

[2] http://www.sencha.com/blog/4-questions-to-ask-before-choosin...

[3] http://vimeo.com/108127206

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#24

I have to strongly disagree with people proposing Ember. Several teams I work with, teams with very strong js and rails background, have tried it out and uniformly rejected it as being too restrictive, pointlessly baroque, monolithic, unstable, and with immature tooling (ember-cli in particular). I know a lot of people may disagree with that list but that is my experience and that of several people I respect. I'm not…

Also, while I get where people are coming from who recommend plain js, really learning how to do good front end development is only in part about knowing js itself. The OP would also benefit a lot from learning some high level concepts you won't get from doing vanilla js - routing and components in particular - so keep that tradeoff in mind when deciding.

The high level concepts you refer to are implemented in plain javascript. The general purpose of frameworks is to increase productivity for those who already master the language. You will have a harder time learning if you begin by using abstractions you don't understand.

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#25

My 2c: stay away from any complex framework until you have a really good understanding of the language itself. Learn the DOM APIs with all it's drawbacks and bugs, DOM events, standalone browser APIs like Canvas, Audio, etc. Write simple node apps with express and modules whose sources you can read. Start using lightweight libraries like underscore / Backbone - you'll come to understand many of the issues that plague…

Definitely good advice.

I'd like to add also that a simpler approach is often the best choice for experts as well. The big complex frameworks simply are not the right tool for many (perhaps even most) projects.

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#27

I have to strongly disagree with people proposing Ember. Several teams I work with, teams with very strong js and rails background, have tried it out and uniformly rejected it as being too restrictive, pointlessly baroque, monolithic, unstable, and with immature tooling (ember-cli in particular). I know a lot of people may disagree with that list but that is my experience and that of several people I respect. I'm not…

Backbone and react.js is indeed an awesome combination for single-page web applications. React makes for an awesome templating layer, and makes the performance of rendering dramatically faster than using more complex Backbone views in the traditional manner. Throw in backbone-react-component to get react views that automatically update when the underlying model or collection changes and you have a damn good stack.

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#28
I'd say check out sails.js, it mimics the mvc pattern of rails, and coffeescript instead of js since the syntax is cleaner and would be more familiar. (https://www.npmjs.com/package/sails-generate-new-coffee) When youre more familiar you can roll your own cutting edge framework, maybe use koa, write a yeoman generator, fancy non-relational databases like couchDB. Learning to recite APIs as one comment pointed out will actually help you understand good api design, and give you a working idea of how theyre wired usually, allowing you to ramp up faster on a new framework than if you jut knew vanlla js and individual components. IMO. Sorry for any spelling errors, temporarily on a samsung v1 chromebook, things appear a few seconds after i type and the internet is hard to use while listening to music

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#29

My 2c: stay away from any complex framework until you have a really good understanding of the language itself. Learn the DOM APIs with all it's drawbacks and bugs, DOM events, standalone browser APIs like Canvas, Audio, etc. Write simple node apps with express and modules whose sources you can read. Start using lightweight libraries like underscore / Backbone - you'll come to understand many of the issues that plague…

Great advice! And I think it applies usually for every language; learn the language itself first, then start digging into frameworks when you have a good understanding.

Re: Ask HN: What is the best JavaScript stack for a beginner to learn?

#30
What worked for me (two years in webdev):

1. Start with vanilla JavaScript/DOM and try to make a small app with that. You'll learn encapsulating DOM into some kind of DIY views, and browser APIs such as pushstate, requestAnimationFrame, etc. This is an essential step.

2. (Optional) Try a classic MVC framework, simpler is better. Backbone is very basic and might be a good idea as middle step. Refactor your simple app to use Backbone views and models. Learn the hard way about their shortcomings.

3. Learn React and Flux (any flavor). Throw Backbone away. Ditch imperative DOM updates, learn top-down data flow. Even if you don't stick with React, other frameworks (e.g. Ember) are starting to embrace top-down data flow, and it's an essential concept that simplifies webdev so much.

4. (If you really feel like it) Try some Angular. This will help you see why one-way bindings, no templates, no direct DOM manipulation and minimal API surface rock over other approaches.

5. (If you want to stay on the edge) Try exotic stuff like Cycle.js or Om (or Omniscient.JS if you don't want to leave JS land). These build up on ideas React pioneered, but one uses Observables as primitive and other uses Cursors.

Post reply on HN