An Approach to Achieve effective Model-View Separation in Template Engine
- Author
- WangJiaMing
- Advisor
- ChenZeLin
- School
- South China University of Technology
- Major
- Applied Computer Technology
- Classification
- TP391.41 Image recognition device
- Degree
- Master's thesis
- Year
- 2010
- Downloads
- 32
- Citations
- 0
Abstract
Template technology in the Web Engineering and Model - Driven Engineering is gaining in popularity . Large-scale Web projects often require highly scalable and flexible page layout needs . A basic approach to meet these needs is the strict separation of model and view. The template engine is precisely for this purpose was born . There are many studies are exploring the strict separation of model and view how the template engine , these studies , however , can not be a good solution to the problem of strict separation of presentation logic and business logic in the template engine . This paper analyzes the method of of Terence strict separation of model and view and FJ García1 dual model . Analyzed their inadequacies , clear presentation logic in the template engine concept , and a template engine, a manifestation of logic to the strict separation of model and view . Then, an implementation of this method , ScriptMark template engine , elaborated on the overall design and detailed design of the ScripMark template engine . Finally, the ScriptMark template engine with other mainstream template engine characteristics and functional comparison , the advantage of ScriptMark template engine and where the lack of . This article consists of three parts , the first part is on the basis of the analysis of the template engine research and current research , select of Terence and FJ García1 , the two template engine for the analysis and improvement of the object , pointing out that their work inadequate. The second part is to propose a strict separation of model and view the presentation logic model , and gives the definition and design of a the template engine ScriptMark of this model . The third part is designed and implemented ScriptMark template engine , and analysis and comparison the ScriptMark template engine template engine .
Table of contents
Abstract 5-6
Abstract 6-10
first chapter 10-14
1.1 Introduction 10-11
1.2 Template Engine Research 11-12
1.3 research background and research objectives 12-13
1.4 Thesis organization and arrangements 13-14
Chapter current research work 14-20
2.1 model and view 14
2.2 C. Kerer of MyXML template engine 14 < br /> 2.3 Terence strict separation of model and view methods 14-17
2.3.1 rigorous approach model and view a graphical representation of 16-17
2.3.2 strict model and view methods lack 17
2.4 FJ García1 dual model approach 17-19
2.4.1 FJ García1 dual model approach graphical representation 18-19
2.4.2 dual model approach inadequate 19
2.5 Chapter Summary 19-20
Chapter strict separation of model and view the performance of Logic 20-29
3.1 Case Study 20-21
3.2 presentation logic 21
3.3 avoid confounding the basic elements of information displayed 21-24
3.3.1 Properties 22
3.3.2 attributes only be used for computing and comparing the performance of logic 22-23
3.3.3 presentation logic acts only in the marginal effect of irrelevant data attributes 23
3.3.4 presentation logic exists and can only exist in the template 23
3.3.5 completely from the presentation logic view designers to customize 23-24
3.3.6 Reception development language consistent with the template language 24
3.4 presentation logic model approach 24-28
3.4.1 template definition 25-26
3.4.2 consistent view 26-27
3.4.3 template engine approach with existing contrast 27 - 28
3.5 Summary 28-29
Chapter ScriptMark template engine design and implementation 29-50
4.1 ScriptMark template engine features 29 -32
4.1.1 Template Language 29-30
4.1.2 template file 30
4.1.3 dynamic data object 30
4.1.4 presentation logic is implemented 30-32
4.2 Rhino scripting engine 32-33
4.3 ScriptMark grammar instruction 33-35 <br / > 4.3.1 Output instruction (template variables) 33-34
4.3.2 conditional control and iterative loop 34-35
4.3.3 comment statements 35
4.4 ScriptMark overall design structure 35-49
4.4.1 ScriptMark template engine package structure design description 36-38
4.4.2 class structure design description 38-39
4.4.3 ScriptMark template engine class structure design description 39-40
4.4.4 ScriptMark template engine functionality schema 40-41
4.4.5 lexical analysis 41-44
4.4.6 Parsing 44-46
4.4.7 scripting engine 46-48
4.4. 8 ScriptMark template engine caching mechanism 48-49
4.4.9 ScriptMark template engine error correction mechanism 49
4.5 This chapter summarizes 49-50 <br / > Chapter System testing and analysis 50-61
5.1 Features Comparison 50-54
5.2 Performance Comparison 54-60
5.3 Chapter Summary 60-61
Conclusion 61-63
work summary 61
further research 61-63
References 63-66
Thanks 66
Related dissertations
- Research and implementation of Word document service based on OOXML
- Design and Implementation of ASP.NET Content of the Three-tier Management System
- Template Technology for Primary School in Content Management System of Research and Application
- Compiler design and implementation of template engine
- The Design and Implementation of Portal Content Management System
- Design and Implementation of the E-government Network Panzhihua
- Design and Implementation of Enterprise Financial Information Management System Based on Web
- Research and Application of Template Technology in Content Management System
- Design and Realization of the Content Management System Based on J2EE
- Template-based automatic code generation technology
- Research and development of high-performance remote control system
- Research of Software Auto-Generation Technology Based on Business Basic Software Platform
- Design and Implementation of Multi-layer Structure Code Generator Based on SSH Framework
- The Study and Design of Publich Service Platform for Construction Project
- On-line E-Learning Platform for Citizens
- Research and Application of Velocity Template Technology in Electronic Commerce System
- Research and Implementation of the Collaborative Browsing Based on Template Engine