摘要
Struts作为目前非常流行的MVC模式的WEB框架,却存在着持久层开发的问题。文中介绍了一种O/R Mapping工具Hibernate,它通过其强大的O/R映射功能将Java对象同存放于关系数据库中的数据进行映射,避免了开发人员采用JDBC的方式大量使用SQL语句对数据库进行操作,可以让Java程序员能够使用面向对象编程的思维来操作数据库,能够提供更加灵活的业务逻辑。这样结合起来节约了开发WEB站点的成本,同时也提高了工作的效率。这里提供了一个实例讨论了如何具体实现Struts框架和Hibernate对象相结合进行WEB应用的开发。
Struts is a popular WEB Framework based on MVC model,but it has some problems in developing persistence service. So introduces Hibernate,a tool of O/R mapping,which maps Java object to datum in relational database by its powerful O/R mapping function, avoiding programmers operate the database in JDBC by using a lot of SOL sentences and in the thinking way of OOP, providing the better business logic. Applies an instance to discuss how to use Hibernate and Struts to develop WEB application. It has taken full advantages of OAR mapping, saving cost in developing WEB site, speeding work efficiency.
出处
《微机发展》
2005年第9期39-41,共3页
Microcomputer Development