|
|
|
1000 Java Tips ebook
|
|
 

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java
programming articles and tips. Please take your copy here.
Take your copy of free "Java Technology Screensaver"!. |
|
Easy Learn Java: Programming Articles, Examples and Tips - Page 199
Previous
1060 Stories (530 Pages, 2 Per Page)
Next
Which JSP model (Model 1 or Model 2) and when should I use in my web applicatio
|
Question: Which JSP model (Model 1 or Model 2) and when should I use
in my web applications?
Answer: You should use Model 1 only for simple applications and when
you want to get something done quickly.
The main problem with Model 1 is that it is hard to maintain and change (luck of
flexibility).
Model 1 architecture is best when the page navigation is simple and fixed, and
when a simple directory structure can represent the structure of the pages in
the application. Such applications usually embed the page flow information in
the links between the pages. The presence of forward in a JSP page implies that
logic embedded in the page is making a decision about the next page to display.
Model 2 is recommended
for medium- and large-sized applications or applications that will grow in
complexity in the future.
Over time, as the application grows and changes, page flow logic accumulates.
The application becomes difficult to maintain because the page flow logic is
distributed across multiple pages. The best time to switch from Model 1 to Model
2 is before this maintenance problem arises. This is why it's usually best to
choose Model 2 from the outset, basing the application on an existing Web
controller framework that best meets application requirements. Model 1 remains a
viable option for simple, static applications.
*******************************************
Our older tips: March 22, 2001 - October 21, 2002
READ
HERE
All published and not published on the site tips read
HERE
8 comments | | Score: 0
|
Posted by jalex on Tuesday, April 27, 2004 (00:00:00) (3848 reads)
|
|
|