documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Add docs of life-cycles for elements, views, dependecies and how to add steps into their pipelines

Open tomasbonco opened this issue 9 years ago • 2 comments

I'm submitting a feature request

Expected/desired behavior:

Aurelia provides many layers of abstraction and useful libraries which is good, and it would be even more amazing if it was documentated. I have sevaral questions that could (imho should) be covered in documentation.

  1. What is a lifecycle of custom element (or view)? In docs of binding there is written that templating engine recognizes use of custom element and (as far as I understand) starts whole procedure. In the end of this procedure there is bind and attached inside view. What's in the middle (creating containers and stuff)?
  2. What is a lifecycle of dependency? What "global" variables are used in Aurelia? Even though I thought DI is simple, there are few layers. In curent docs I found how to use DI, not how it works inside. Also I found out that there are some "global" variables, like Root Router. What else is in "global" variables? What are they used for? What are Metadata, how can I use them in my plugins? What and why are DOM Events used?
  3. How can I set hooks to lifecycles above? It would make creating plugins so much easier knowing not just lifecycles but also how to correctly add hooks to them, or extend a library. How to add hook to changing view? How to extend View class? How to create a class that works in as low level as Animator is?
  4. What context is provided to Aurelia Plugins? As plugins are not documentated not at all.

I'm also adding scenarios, that I found impossible to achieve with current state of docs:

  1. I would like to add au-animate class (by some logic) to element before Animator starts processing it. I have no idea where and how to add hooks. It should be somewhere after start before attached or bind. I want to do that using plugin.
  2. Because Aurelia-Flux is not longer being maintened (which is very sad itself), I would like to know when are classes (and dependecies) created, how is aurelia wrapping them, then when they are destructed, and how to properly link some other classes to them with weak connections if possible. With current state of docs I have no chance to even know how is aurelia-flux working. How do I attach to those life-cycle events of changing view, dependency resolution and stuff?

tomasbonco avatar Oct 18 '16 12:10 tomasbonco

Any progress here (maybe a plan to document it)? Should I address my questions somewhere else?

tomasbonco avatar Oct 27 '16 11:10 tomasbonco

@AshleyGrant This might be a good one for you as well since you did some templating documentation already. Basically, a single document that explains the component lifecye and the navigation lifecycle, then shows how they relate.

EisenbergEffect avatar Oct 27 '16 14:10 EisenbergEffect