Font Size: a A A

Design And Implementation Of A Data Validation Framework Based On DSL

Posted on:2019-03-11Degree:MasterType:Thesis
Country:ChinaCandidate:W WangFull Text:PDF
GTID:2428330563953749Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In software development,the validity of input data occupies a very important position.The quality of data validation affects the quality of software products in many dimensions,such as,security of software products,user experience,maintainability,and robustness.It is a function that must be implemented in software development.In the background of the reconfiguration of experimental parameters validation for an electrochemical workstation system,we designed and implemented a data validation framework based on DSL.Our validation framework is language-independent,and supports validity checking for data ranges and dependencies between data.The framework takes variable modeling technology based on DSL to analyze the variability and commonality of data legality,and then builds a metamodel.Based on the metamodel,using DSL to express variability,StringTemplate to express commonality,and then using the DSL tool ANTLR and StringTemplate to implement code generator of data validation.Finally,under the constraint of the metamodel,we design metamodel instances,then use the metamodel instances and code generator to generate all the source code for the checkout part.We have completed the refactoring of parameter validation of more than 80 electrochemical experiments in an electrochemical workstation system using this framework.The framework separates the parameter validation from the business logic,extracts the data validation from the application system,which lower coupling system,reduce maintenance difficulty of data validation in the system.The framework adopts a unified and standard validation mode,uses a same metamodel file and template file to avoid writing repeated validation codes many times,which improves the reusability of data validation.In addition,our validation framework can support multiple languages through template,providing reference for other projects with multi language requirements.
Keywords/Search Tags:DSL, Validation framework, Data validity, ANTLR, Code generation
PDF Full Text Request
Related items