What Is Struts Framework?
The Struts Framework is like a car. It has four wheels, it can drive you somewhere, and when it's not in use, it's just kind of... there. Still with us? Good. We're not talking about cars today. We're talking about the Struts Framework, an open-source Web application framework used to create Java Enterprise Edition Web applications quickly and efficiently. The Struts Framework uses and extends the Java Servlet API to promote the model-view-controller (MVC) architecture. It provides a set of classes that implement the controller part of MVC, including a set of tags (or "action tags") that you can use to specify what happens when a user clicks on something on your site. A while back, this framework wanted to separate its model from its view. It had much success in doing so, so much so that it's still used today! To achieve this goal, struts utilized a design paradigm known as MVC (Model-View-Controller). In this design paradigm, the "model" is the application logic that communicates with the database. The "view" is usually presented to the client/user in HTML pages. The "controller" is an instance that passes information between these two parts of an application. Struts already provide this controller. Just a Java servlet called ActionServlet creates templates for displaying on a page. Web app programmers create models and extend them by making their central configuration files struts-config. XML files to bind together both models and views. It's like a peanut butter and jelly sandwich. The MVC model is like peanut butter, the controller is like jelly, and the idea is like bread. The client sends a request to the controller. When it arrives at the controller, it seems that there are no actions defined for that request, so it asks the model for something to give it. The model works on creating an action object and then passes it back to the controller. The controller takes this action object and runs it through business logic before passing it along to the view layer as an output page string. The view layer then displays that output page string in a browser or mobile application window as HTML markup or Java if you use Java with JSP instead of ASPX pages.
Related Terms by Software Development
Join Our Newsletter
Get weekly news, engaging articles, and career tips-all free!
By subscribing to our newsletter, you're cool with our terms and conditions and agree to our Privacy Policy.