Application structure is inspired by different "scaleable" metodologies. In practice that means:

That's acheived by advanced bundler. Note, that we don't have local config for each module, as in BEM. Instead, we use global rules for each resource type (in bundle.yml). That's more simple in our case.

See Bundler section for details.

Local helpers, to simplify resources include

We support extentions for jade / stylus / i18n, to simplify files references:

Notes:

See env.helpers in server modules for standard functions

Views Rendering

In the server, views renderer is an after-filter middleware. Render expect environment to contain response object (see Request Environment) with properties:

Rendering consists of 2 steps:

  1. Rendering page inner
  2. Embedding it into layout

On client side, process looks similar, but automated via navigate.to listener.

Layouts

Usually, page wrapper (layout) is set by hook for all pages of server:** methods. But u can customize it as you wish from your template via set_layout() helper.

Layout looks like usual client block, wich wraps content variable.