This post will give the basics of the struts framework, its architecture and detail understanding about the basic elements of struts framework. Finally, you will end up with writing the first struts application. After reading this post, you will have an understanding of what the struts framework is, how to write the struts application and configure it. Let’s start now with discussing what is struts and its benefits.

                            Struts are an open-source web application framework implemented by Apache Software Foundation (ASF). It is one of the efficient and high performance open source implementation of Model 2 based Model-View-Controller (MVC). The Struts framework provides utility classes to handle many of the most common tasks in web application development. It is originally started as a small project by Craig McClanahan in May 2000 but later Craig McClanahan donated it to Apache software foundation which is later added with many features that are more commonly required for web application development.

What is a Frame Work?

Framework is a set of well-defined classes and interfaces that provides services to our application. With a framework, it contains the executing routines and invokes operations onto your extensions through inheritance and other means.

Why we Need of Struts Frame Work?

As you have learnt in this post about the requirement of web application and then further about the two development models for developing web applications where most of the huge enterprise applications are developed following Model 2 architecture, it can be identified that while developing the web applications following such architecture gives number of benefits. However, using the basic web technologi3s like servlets and jsp for developing such a web applications is complicated and contains most of the infrastructure logics that results in increase of the application development cost, development time and further affects the productivity of the application. To Solve these problems we want a readymade solution for the infrastructure logics in developing web applications following Model 2 architecture instead of developing it as a part of out project development, which can reduce the development time and cost, and even improves the performance and productivity of the application. This is where the need for web application frameworks comes and as reply for this requirement one of the solution is given by Apache Software foundation group under the title struts framework. Struts framework has restructured the way that web programmers think about and constructs web application in java.




Benefits of Struts Framework

We have number of benefits in using struts framework for developing web applications in java , before we look into the benefits of struts you need to remember that all the benefits of the MVC approach and Model 2 development model are available when using struts. For example, MVC model 2 provides a clear separation between the presentation logic(for example HTML, and tag libraries) from the request handling code( using java servlets, plain java classes and jsp scriptlet etc) is also one of the benefit of struts ie., web applications developed using struts frame work are easier to develop understand and maintain. The following are the added benefits of using struts framework for developing web applications.

 Ø  Struts are open, which allows us to download the source code and modify that  code according to our requirement that supports user extensions.

 Ø  The other important advantage of struts being open source is that its code is exposed to the developers(i.e for us) and this enables fast development and maintenance cycle, as a result web can expect fast response from the struts team in fixing the buts and response to the new requirements in the market.

 Ø  Struts is implemented using the standard java technologies like java servlets and jsp and other open libraries like commons bean library of apache, thus we are allowed to host struts project on any java enterprise web server by just including the struts jar files into the lib on our web application / project.

 Ø  Reduces the development time & cost in developing the controller and view parts of web application developed following MVC architecture and Model 2 development model.

 Ø  Struts uses XML based configuration files to collect the configuration details from the application provider.

 Ø  Centralized XML file based configuration: This allows us to configure most of the application properties in XML files rather then hard coding into java classes, which means that many changes can be made without modifying or recompiling java code, and the changes can be made by modifying a single file.

 Ø  This lets the Java Developers focus on implementing the business logic without needing to know about the overall system layout.



Post a Comment

 
Top