29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.1 Struts overview<br />

Struts is an open source framework for building Web applications according to<br />

the Model-View-Controller (MVC) architectural pattern (see 2.3.3, “MVC<br />

architectural pattern” on page 28). Struts is part of the Jakarta project, sponsored<br />

by the Apache Software Foundation. For reference, see:<br />

12.1.1 Why we use Struts<br />

http://jakarta.apache.org/struts<br />

http://jakarta.apache.org/struts/userGuide/introduction.html<br />

Note: <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> - Express includes support for Struts<br />

V1.02 and V1.1.<br />

The Struts open source framework was created to make it easier for developers<br />

to build J2EE Web applications. Like a building, a Web application must have a<br />

solid foundation from which the rest of the structure can grow. Using Struts as the<br />

foundation allows developers to concentrate on building the business application<br />

rather than on the infrastructure.<br />

The Struts framework has gained considerable attention because of its ease of<br />

use and ability to fit the needs of today’s developers in building applications fast.<br />

Struts combines servlets, JSPs, custom tags and message resources into a<br />

unified infrastructure and saves the developer the time it takes to code an entire<br />

MVC model, which is a considerable task.<br />

The model 2 approach is concerned with separating responsibilities in Web<br />

applications. <strong>Application</strong> development and maintenance are much easier if the<br />

different components of a Web application have clear and distinct<br />

responsibilities.<br />

As an example, consider an appliance with which you are certainly familiar: a<br />

television set. You will probably agree that changing TV channels is quite a<br />

simple task. Now ask yourself these questions:<br />

► Do you know how the television set represents channels internally?<br />

► Do you know exactly what goes on when you change TV channels?<br />

► Do you think you should know these things?<br />

Chances are that you have answered no to all of the questions above. What is<br />

the advantage of you not knowing how TVs represent their data and implement<br />

their operations? You could buy a new TV, which does these things internally in a<br />

completely different way, and you could still change channels.<br />

384 <strong>IBM</strong> <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> - Express V5.0.2 Developer Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!