Along with the popularity of J2EE,more and more softwares begin to use J2EE technology.but J2EE's core API is very complicated,especially its multilayer structure,that increase the cost of software.So a good design pattern ,a good framework will be the key success factor of a J2EE project.J2EE's official EJB API is too complicated,it has many defects.The most popular light framework called SSH is a combination of Struts,Spring and Hibernate,and it's difficult to being extended and changed.This article use the basic J2EE patterns and APIs,to redisign the J2EE's 3 layer structure and try to work out a new and good framework to replace the old one.In this article,first we researched the basic theories and patterns of J2EE,then we talk about the standard struture of a J2EE framework.At last,we give out a new design of a framework and discuss it through the 3 layers including the data access layer ,the business logic layer and the Web layer.In the end,as to prove the framework is successful and usable,we use the framework to finish a classic project-Petstore,through the project ,we discuss the application of the framework and the shortage. |