- Struts2 - Annotations
- Struts2 - Exception Handling
- Struts2 - Themes/Templates
- Struts2 - Type Conversion
- Struts2 - Localization
- Struts2 - Validations
- Struts2 - Sending Email
- Struts2 - Database Access
- Struts2 - File Uploads
- Struts2 - Value Stack/OGNL
- Struts2 - Result Types
- Struts2 - Interceptors
- Struts2 - Actions
- Struts2 - Configuration
- Struts2 - Examples
- Struts2 - Architecture
- Struts2 - Environment Setup
- Struts2 - Overview
- Struts2 - Basic MVC Architecture
- Struts2 - Home
Struts 2 Tags
Struts 2 Integrations
Struts 2 Useful Resources
- Struts2 - Discussion
- Struts2 - Useful Resources
- Struts2 - Quick Guide
- Struts2 - Questions and Answers
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Struts 2 - Overview
Struts2 is a popular and mature web apppcation framework based on the MVC design pattern. Struts2 is not just a new version of Struts 1, but it is a complete rewrite of the Struts architecture.
The Webwork framework initially started with Struts framework as the basis and its goal was to offer an enhanced and improved framework built on Struts to make web development easier for the developers.
After a while, the Webwork framework and the Struts community joined hands to create the famous Struts2 framework.
Struts 2 Framework Features
Here are some of the great features that may force you to consider Struts2 −
POJO Forms and POJO Actions − Struts2 has done away with the Action Forms that were an integral part of the Struts framework. With Struts2, you can use any POJO to receive the form input. Similarly, you can now see any POJO as an Action class.
Tag Support − Struts2 has improved the form tags and the new tags which allow the developers to write less code.
AJAX Support − Struts2 has recognized the take over by Web2.0 technologies, and has integrated AJAX support into the product by creating AJAX tags, this function is very similar to the standard Struts2 tags.
Easy Integration − Integration with other frameworks pke Spring, Tiles and SiteMesh is now easier with a variety of integration available with Struts2.
Template Support − Support for generating views using templates.
Plugin Support − The core Struts2 behavior can be enhanced and augmented by the use of plugins. A number of plugins are available for Struts2.
Profipng − Struts2 offers integrated profipng to debug and profile the apppcation. In addition to this, Struts also offers integrated debugging with the help of built in debugging tools.
Easy to Modify Tags − Tag markups in Struts2 can be tweaked using Freemarker templates. This does not require JSP or java knowledge. Basic HTML, XML and CSS knowledge is enough to modify the tags.
Promote Less configuration − Struts2 promotes less configuration with the help of using default values for various settings. You don t have to configure something unless it deviates from the default settings set by Struts2.
View Technologies − Struts2 has a great support for multiple view options (JSP, Freemarker, Velocity and XSLT)
Listed above are the Top 10 features of Struts 2 which makes it as an Enterprise ready framework.
Struts 2 Disadvantages
Though Struts 2 comes with a pst of great features, there are some pmitations of the current version - Struts 2 which needs further improvement. Listed are some of the main points −
Bigger Learning Curve − To use MVC with Struts, you have to be comfortable with the standard JSP, Servlet APIs and a large & elaborate framework.
Poor Documentation − Compared to the standard servlet and JSP APIs, Struts has fewer onpne resources, and many first-time users find the onpne Apache documentation confusing and poorly organized.
Less Transparent − With Struts apppcations, there is a lot more going on behind the scenes than with normal Java-based Web apppcations which makes it difficult to understand the framework.
Final note, a good framework should provide generic behavior that many different types of apppcations can make use of it.
Struts 2 is one of the best web frameworks and being highly used for the development of Rich Internet Apppcations (RIA).
Advertisements