Computerworld -
Listen to the Computerworld TechCast: Struts.
In his blog, Craig McClanahan recounts how, when he joined Sun Microsystems Inc. in 2000, he continued to support the development of an open-source application project. As part of that effort, he needed to take a U.S.-centric application and produce it in four languages and make it available to European users on the Web and through other channels.
McClanahan couldn't find a development framework that did what he wanted for the project, so he decided to create his own. "Open-source developers often call this 'scratching your own itch,'" he writes in his blog. The result was Struts.
Framework, as we use it here, refers to a set of libraries or classes for a specific operating system that developers can use to implement the standard structure of an application. Because it bundles a large amount of reusable code, a framework speeds development and saves the developer from having to rewrite standard code for each application.
McClanahan's framework worked well for his application, and he moved to make it an open-source project under the auspices of The Apache Software Foundation, which released it in December 2000.
"What happened next was nothing short of extraordinary," McClanahan writes. "Struts quickly became the de facto standard Web application architecture in the J2EE space (the number of significant Internet applications built with it is substantial, but is dwarfed by the number of intranet applications that use it)." Struts was integrated into many major application servers and tools and was "supported by a rich ecosystem of knowledgeable professionals and skilled developers, backed by significant documentation in the form of books and articles," he explains. It was eventually embraced by a large user community.
The name Struts, incidentally, was picked for its reference to architecture, as a reminder of the unseen pieces that support buildings and bridges, according to McClanahan.
Developing for the Web
Since Struts was developed for building Web applications, it has to handle the "stateless" connection between the client and server, in which the server disconnects as soon as a Web page is presented to the user's browser. Thus, if the user modifies the page (for example, by filling in a form or entering data), the server is unaware of the changes until the browser queries the server again.
Struts deals with this by implementing the model-view-controller, or MVC, design approach. Here, the user interface is decoupled from the data and business logic:
- Model contains the core of the application's functionality and/or encapsulates the application's state. It doesn't need to know anything about the view or controller.
- View is the look of the application to the user. The view knows nothing about the controller but can access (though not change) the model. View is implemented with no flow logic, no business logic and no model information -- just JavaServer Pages, HTML pages, style sheets, JavaScript files, Resource bundles, Java beans and JSP tags.


- Excel 2010 Cheat Sheet
- Register for this Computerworld Insider Cheat Sheet and gain access to hundreds of premium content articles, guides, product reviews and more.
- Workload Automation Challenges and Opportunities
- This Executive Brief discusses IDC's perspective on how enterprise workload management requirements are changing and highlights the ways that workload automation solutions can...
- Protecting Against Database Attacks and Insider Threats: Top 5 Scenarios
- Read this new eBook to learn the top five scenarios and essential best practices for preventing database attacks and insider threats.
- Database Activity Monitoring Is Evolving
- Read the analyst report and learn how you can leverage the core capabilities of a DAP solution for better database security.
- Establishing a Strategy for Database Security is No Longer Optional
- The options for securing increasingly valuable databases are very broad and deep, and can be confusing. This research provides an overview of three...
- Thinking Outside The Data Warehouse
- This high level, business problem focused eBook uses 5 customer scenarios to show how people and organizations are tackling real issues using IBM... All App Development White Papers
- Distributed Database Security with Real-time Monitoring
- View this demo and learn how IBM InfoSphere Guardium database activity monitoring can help protect your sensitive data in distributed DBMS environments with...
- InfoSphere Warehouse Packs Demo
- These flash modules make warehousing more tangible and relevant to business users through detailed explanations of the InfoSphere Warehouse Packs.
- Delivery Management -- Extending Lifecycle Management
- Date: Wednesday, June 20, 2012, 1:00 PM EDT
Siloed organizations continue doing the wrong things and doing things wrong, leading to increased costs,... - Leverage automation today to reduce IT complexity
- Date: Tuesday, June 5, 2012, 2:00 PM EDT
Whether your B2B complexity is caused by multiple technologies due to M&A, business or application specific... - Redefine Expectations in the Data Center
- Need to do more with less? Watch this video to learn how HP ProLiant Gen8 servers can help your business deploy servers three... All App Development Webcasts