cjss like to write css as developing web applications

cjss provides a way to use something like css to write web applications

cjss included stage

  • data
  • prepare
  • body
  • element

Some explanations

So the stage is not to be used, but each level can only exist in a script 
json support stage presence data 
html can only be used in body stage, you can bind a character template data by interpolation processing ${} 
javascript can be applied at any stage, including two modelsjs js-expr

  • js a code block may be performed, you can return the desired value
  • js-expr to perform a single expression

We can use access data also can access the body node yield 
in the body stage, the return value of the user to replace the element content, if the return value is not defined, not to make any changes, or delete existing content

Explanation

cjss concept is still very good, but also a similar component-based development model, we have a detailed look at the source code

Reference material

https://github.com/cjss-group/CJSS

Guess you like

Origin www.cnblogs.com/rongfengliang/p/11118209.html
Recommended