DUI is a lightweight ui framework based on plugin mechanism, that can run in both node.js and browsers.
In DUI, everything is plugin exactly, e.g., themes, extendtions, features, APIs.
DUI adhere to AMD mechanism, your project need to employ javascript module loaders such as RequireJS, curl, Dojo to import DUI modules.
Our code adopted a compatible coding style in order to make DUI could run in node.js smoothly, and collaborators need to observe this compatible style.
Everyone could use scaffold tools to create primitive widget or plugin.
Use DUI in browsers
Clone a copy of the main git repo by running:
git clone git://github.com/lbxx1984/dui.git
Compile css/dui.less to css file, or add less compiling module to your development environment, then import style sheet in your home page:
<linkrel="stylesheet"href="./dui/css/dui.css"/>
Import widget modules and plugin modules to your customized module like:
define([
'dui/src/widget/Table',
'dui/src/plugin/TableHeader'
],function(Table,TableHeader){
//TODO
});
Create plugin instances like:
var tableHeader =newTableHeader({height:35});
Create initialization parameters for UI constructor like:
var param ={
container:document.getElementById('tableContainer'),// HtmlElement or String