3 ms·
Why not both at the same time? 1. Think of a small project (one you could do in a weekend) 2. Architect it as a backend API + frontend consumer. 3. Explain t
by chatmasta 12y ago
Why not both at the same time?
1. Think of a small project (one you could do in a weekend)
2. Architect it as a backend API + frontend consumer.
3. Explain the architecture to him at a high level.
4. Teach him Python/Ruby with bottle.py/sinatra, make the API.
5. Teach him HTML/CSS, make the layout.
6. Teach him Javascript, call the API and manipulate the DOM.
- lowboy 12y agoI 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.