传统的数据验证方法会造成数据验证代码纠缠在一起,使得软件的维护性与重用性大大降低。面向切面编程技术(AOP)可将应用程序中的“横切关注点”从“纵向关注点”中分离出来并被封装到一个可重用的模块中,再利用反转控制(IoC)实现数据验证逻辑与其它业务逻辑间的松散耦合。在此基础上具体构建了一个基于服务器端的数据验证组件-All4validate,并将其以低侵入的方式融入到现有的J2EE/EJB开发过程的组件产品中,有效地解决了传统数据验证方法的弊端,并极大地提高软件的开发效率。
The traditional data validation method cause data validation code tangling, greatly reduces software' s reusability and maintainability. The crosscutting concerns in application program is separated from vertical concerns by AOP, and is packaged in reusable module, hereafter, the loose coupling between data validation logic and other business logic is realized by IoC pattern. On this basis, the data validation component--All4Validate based on server is designed, and is blended into the existing component products of J2EE/ EJB development process. The method effectively solve the disadvantages of traditional data validation method and greatly improves the efficiency of software development.