3 ms·
I like this approach, but I would reconsider step 6 as soon as possible. Most people move away from directly manipulating the DOM, because it's just not sustain
by lowboy 12y ago
I like this approach, but I would reconsider step 6 as soon as possible. Most people move away from directly manipulating the DOM, because it's just not sustainable. Better to set them along the path of having templates that render to the page.
Facebook's React.js [0] could be great for a beginner. Even though it's another library to learn, it's conceptually simple and has a very small surface area. Components (optionally but usually) have a number of properties and (always) a render() method which renders the component to the page. There's more to React than that, but that's enough to get started.
[0]: http://facebook.github.io/react/ http://facebook.github.io/react/
- chatmasta 12y agoYeah, agreed. I was speaking in the general sense. Definitely better to teach Javascript via a framework (whether it's Angular, React, Polymer, whatever) than manipulating the DOM directly.
- lowboy 12y agoRight, gotcha. I wouldn't throw a framework like Angular, Ember, or Backbone into the mix right away though. They have a lot of moving parts. The thing I like about React is that it's just a view layer, and can be a very simple one at that. A beginner could start putting things on the screen very quickly, then pick up a framework or larger app architecture later on. Not only is it a way to get started quickly, but the core concepts of a view layer learned through React would be applicable in larger frameworks.