29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 2-6 shows the typical flow of a Model 1 application.<br />

Browser<br />

Figure 2-6 Model 1 architecture application flow<br />

For small projects, prototyping, and to quickly get an application completed, the<br />

Model 1 architecture is quite popular because of its ease of development.<br />

However, more complex applications will need to follow a different approach.<br />

That approach is described as Model 2 architecture.<br />

2.3.2 Model 2 architecture<br />

1<br />

Request<br />

Response<br />

3<br />

<strong>Application</strong> <strong>Server</strong><br />

2<br />

JSP Database<br />

The all servlet and all JSP approach both have inherent problems mixing the<br />

business logic of servlets with presentation of HTML. These two approaches<br />

cause applications to become difficult to maintain and less flexible. For these<br />

reasons, Model 2 architecture was introduced. Model 2 is basically a<br />

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

pattern” on page 28) that separates the business logic and content presentation.<br />

Model 2 applications are more flexible and easier to maintain and extend<br />

because the business logic and the presentation are isolated from one another.<br />

Chapter 2. <strong>Application</strong> design 27

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

Saved successfully!

Ooh no, something went wrong!