Repository navigation
Description
This plan was composed by @wycats and @pzuraq. Work is underway to implement it.
Octane Components Guides v2
Goal: To create an introduction to the framework that properly sets up the mental model for beginners, and is accessible to existing users, without getting too mired in the details.
What is the overall topics flow?
The guide starts off by introducing templating as a superset of HTML. From there, it moves into extracting components from that HTML, and introducing features of components incrementally. It then returns to other templating concepts, such as helpers, conditionals, and loops.
This is fairly analogous to React's Main Concepts documentation, which seems to be a good flow for introducing new users to the framework. It starts them off with something they probably know (HTML) and then builds on that knowledge with something new (JSX for React, Handlebars for Ember).
A rough outline of the ToC (WIP):
- HTML
- Could use a better name, but introduces the basics of templates, and the idea that templates are a superset of HTML
- Extracting Components
- Introduces the idea of componentization - extracting chunks of our template into separate components.
- Component Arguments
- Introduces component arguments (and possibly attributes?) which can be used to make components reusable.
- Rendering Conditionally
- Introduces
{{if}}and truth helpers (maybe)
- Introduces
- Rendering Lists
- Introduces
{{each}}and{{each-in}}
- Introduces
- Block Content & Children
- Introduces blocks and
{{yield}}
- Introduces blocks and
- Component State
- Introduces component classes, getters, tracked properties, and autotracking
- Handling User Input (or Handling Events)
- Introduces actions
- Template Helper Functions
- Template Lifecycle & Modifiers
Who is the target audience we are writing for?
The sequence of the guides is designed to be approachable to new Ember developers with relatively little experience.
However, the guides are intended to be used by people with all levels of experience.
- It is possible for a beginner developer to make their way through the primary sequence of the guides without getting stuck at advanced concepts
- Interesting tangents, most useful for intermediate and advanced developers, are introduced through "Zoey Says" boxes
- Advanced topics (such as contextual components and other advanced composition patterns) are introduced in dedicated chapters that are clearly marked
This layering allows developers to work their way through the entire sequence to get a high-level view of the programming model, but also provides touch-points for people who are looking for more depth.
The high-level view of the programming model is also useful for experienced developers coming from another framework who are trying to get a birds-eye view of the programming model.
How does this integrate with existing content (octane-guides-preview)?
Ultimately, it is intended to replace the template and component sections.
The new flow is not yet finished. There are some parts of the octane-guides-preview that are not yet incorporated in the new flow, and they will be handled in one of these ways:
- Incorporate them directly into the new flow
- Incorporate them into the new flow via an "advanced topic" page
- Migrate the content to a different part of the guides
- While it is expected to be rare, in some cases we might agree, as a team, that the topic is not important in the Octane programming model
How will we organize this gradual approach alongside the topical pages? (yields, actions, etc)
Some core concepts, like arguments, yields, actions, etc. are important to the high level mental model, and should be woven into the introductory guides titles in sections that are relevant to them. However, not every unique/indexable topic is this important.
For instance, "attributes" are covered under HTML and the introduction to components. Contextual components, the {{component}} helper and other composition patterns are an advanced use case, and could be covered under a more general "Composition Patterns" style page, possibly under advanced topics. In general, the goal is to hone the number of keywords down to the ones that really are fundamental to components/templates, and make sure those are visible, while putting the rest into
Another thing to note here is that the search functionality is very problematic, and results in a sense that the sidebar needs to also serve as an index. We should strive to make the Algolia search behave more closely to Google searches, so this isn't an issue for finding content that's in the advanced topics.
Does this addition affect other sections? i.e. duplicate content with Templates
The template and component sections will ultimately be merged and replaced with this new section. Advanced content from those sections will be retained in dedicated "advanced" pages.
How is this different from the tutorial?
The tutorial walks you through building an app from end to end. It is only expected to be read from beginning to end, and takes advantage of that to create a highly cohesive experience.
While the guides are designed to be read sequentially, if a reader desires, each guides chapter is designed to work completely stand-alone. In particular, it is important that if an Ember developer lands on a particular guides chapter from Google, they do not need to read any other chapter of the guides to understand the answer to their question.
Both the tutorial and the guides attempt to order the topics so that they could be incrementally understood by sequential readers, but only the tutorial is designed with sequential readers as the primary audience.
Philosophy
- If you know HTML, you know a subset of Ember
- You should learn and known Ember Handlebars as a programming language. The surface of Octane makes it easier to learn the basics.
Activity
jenweber commentedon Dec 8, 2019
Closed by #1150