How to write an SSH Project (I) general idea of program design, ssh Program Design
SSH: Spring, Struts, and Hibernate respectively. Later, Struts2 replaced Struts, So we often call SSH Spring, Struts2, and Hibenate.
Spring is generally used to configure bean. Struts2 to configure the processing class. Hibernate is an excellent ORM framework used to configure the relationship between the entity class and the database.
When we decide to use SSH to write a project, we should understand the program running process.
MACRO: You click a button on the Interface ------ the corresponding parameters will be taken to the background processing class for processing -------- the processing result will be a field and the field corresponds to a jsp view and will be returned to you, but can we be the developer of Skyfall only limited to this ?! No! No! We need to have a god perspective to see every corner we want to see.
The development process is: jsp -----> web. xml -------> (load strtus. xml, spring. xml) ---------> Struts. xml ----------> corresponding processing class --------> business logic processing (using spring. xml, hibernate. xml), return a field ------> In strtus. search for the corresponding logical view in xml -----> return to the front-end and show it to the customer.
After the process is clear, we need to know how to transfer it? How to configure the configuration file? Which of the following traps will beginners encounter? What are the shortcuts?
These will be introduced one by one later.
For the guide package, I always think that it should be constantly enriched in the process of continuous improvement of the Project. Anyone who comes up will know all the packages to be used. but there are still some required packages involved in the framework, that is, you only need to export these packages if you use SSH.
Struts jar package
Hibernatte jar package
Spring jar package
All right, jar is finally finished. The configuration files and details will be described later.