-
Struts advantages, disadvantages and implementation experience summary
Struts advantages and disadvantages
advantage:
Struts, like Tomcat, Turbine and many other Apache projects, is open source software, which is one of its advantages. Allow developers to have a deeper understanding of its internal implementation mechanism.
In addition, the advantages of Struts are mainly reflected in two aspects: Taglib and page navigation. Taglib is the tag library of Struts. It can be used flexibly and can greatly improve development efficiency. In addition, as far as domestic JSP developers are concerned, in addition to using the common tags that come with JSP, they rarely develop their own tags. Perhaps Struts is a good starting point.
Regarding page navigation, I think that will be a development direction in the future. In fact, doing so will make the context of the system clearer. Through a configuration file, you can grasp the connection between various parts of the entire system, which is of great benefit for later maintenance. This advantage becomes even more obvious when another group of developers takes over the project.
shortcoming:
Taglib is a major advantage of Struts, but for beginners, it requires a continuous learning process and may even disrupt your web page writing habits. However, when you get used to it, you will find it really useful. Great.
Struts divides the MVC Controller into three, which not only makes the structure clearer, but also increases the complexity of the system.
Struts has been less than half a year since its inception, but it has gradually been used more and more in commercial software. Although it still has many shortcomings, it is a very excellent J2EE MVC implementation method. If your system is going to adopt the J2EE MVC architecture, then you might as well consider Struts.
Struts implementation experience:
1. For project development based on Struts architecture, you first need to have a good overall plan, which modules are included in the entire system, how many FormBeans and ActionBeans are required for each module, and it is best to have a dedicated person in charge of Struts-config.xml management. The difficulty in developing Struts-based projects lies in configuration management, especially the management of Struts-config.xml
2. If your project is very tight and there are no experienced Struts developers in the project team, it is recommended not to use Struts rashly. Mastering Struts requires a process. For a skilled JSP programmer, self-study will take about half a month. If combined with titls it will take longer
3. If you use taglib extensively in your web pages, your artist will make some sacrifices. This sacrifice is especially obvious when you combine it with Tiles to enhance functionality. Of course, your choice between functionality and aesthetics is up to you
4. Taglib is a good thing, but using it flexibly requires a process. If you don’t want to spend too much time on Taglib, then you only need to understand a few tags related to FORM, and leave the other tags alone. Look again, study ActionServlet and Struts-config.xml first, you will feel a sense of accomplishment
5. Is Struts only suitable for large projects? No! Struts is suitable for projects of all sizes. Of course, for large projects, its advantages are more obvious.
This article comes from the CSDN blog. Please indicate the source when reprinting: http://blog.csdn.net/zhrl0000/archive/2009/12/17/5027918.aspx