I am bored with my recent internship. I started to learn J2EE and started to learn from Servlet/JSP. Here I am writing my own learning remarks.
Java Web application development is very simple. Generally, the architecture is: Small Web applications often use JSP + JavaBean development system, or even use JSP development systems completely; medium-sized or large Web applications often use the MVC design pattern to construct the Web framework.
Using JSP + JavaBean Web framework has great advantages for fast and small projects. Some reusable components can be abstracted and written as JavaBean. jsp calls Javabean to store related data and business logic. Most often, it encapsulates database operations using JavaBean. This framework is simple, which not only improves the readability of the program, but also encapsulates all complex business logic in JavaBean, so that JSP does not have so many Java code, which is easy to read and protects the code. I personally think that the JavaBean Component Technology is really great. It encapsulates internal actions and we cannot see its operating mechanism. It only provides simple interfaces for external use.
MVC design patterns are often referred to as model, view, and control ). The MVC design pattern is perfect for developing Web applications using Java. Model implements the business logic layer through components such as JavaBean and EJB. View outputs HTML streams through JSP to implement the user interface layer, and control controls the processing process of applications through servlet. Ha, as shown in the figure below:
The adoption of servlet (server-side applet) technology is an essential part of reuse. The servlet class diagram framework:
Although I only learned Servlet/JSP, I can feel that the J2EE enterprise application architecture is flexible. Next I will study STRUTS + hibernate + spring, and then study EJB.