在一般JSP开发中,JSP承载很多代码,复杂度很高。DORADO将开发复杂度从JSP中剥离出来,抽象为视图模型(ViewModel)。ViewModel主要用来定义控件(Controls)与数据集(Datasets),控件的属性、事件以及其它特殊效果都是在ViewModel中预先定义,JSP只负责调用这些Controls。即JSP中一般只有用于声明所用的TagLib和排版代码,因而非常简洁。
(图:DORADO中的JSP)
(图:对应的JSP)
Attachments:


在一般JSP开发中,JSP承载很多代码,复杂度很高。DORADO将开发复杂度从JSP中剥离出来,抽象为视图模型(ViewModel)。ViewModel主要用来定义控件(Controls)与数据集(Datasets),控件的属性、事件以及其它特殊效果都是在ViewModel中预先定义,JSP只负责调用这些Controls。即JSP中一般只有用于声明所用的TagLib和排版代码,因而非常简洁。
(图:DORADO中的JSP)
(图:对应的JSP)