Sheru is an isomorphic framework that used jsdom to create server rendered pages. It is based on Backbone and Handlebars.
Sheru controllers are very important. They are the main piece that interfaces directly with both the server and the client.
Controllers have a life cycle.
This initializes the controller and allows for basic structures that the controller needs to run.
This is a hook in the rendering process that will grab data from a internal or external source. This is meant to be where all the setup calls should be made. decide on wether it smarter to have a promise returned or call a callback or maybe both
This will grab the template needed to render page. The first parameter to this function is url data. This will be a url fragments and query information. This should be mockable to allow for the server side to pass this data in explicitly to render pages. The second param is the data from getLayoutData.
This is a hook to know that the layout rendered. For the server this indicates to pull all data from the layout and spit it into the page.
This is a pre hook meant to allow for mutation to html structure before putting it into a file.
This indicates that the layout mounted and that events are started.
This is a method that allows you to know if the layout should update. It passes in any new data as well as new url information If available.
This is a place where you can update your controllers structures/cache to.