Now that you have seen an overview of the two architectures, how do you decide which approach to take? If you read some articles, you get the impression that the Model 1 architecture is the old or obsolete way, and that Model 2 is the new, better way. This is not the case, and the J2EE BluePrints back that up.
The Model 1 architecture is appropriate for Web applications that have the following characteristics:
The main drawback of the Model 1 architecture is that as sites built on this architecture grow and evolve, they can become very difficult to manage.Various pages are created with business logic within them, and debugging can become harder and harder as you end up with scriptlets in various locations containing small fragments of business logic. It is in these larger applications that the Model 2 architecture can really help.The main benefits of using the Model 2 architecture are as follows:
Although the Model 2 architecture has been introduced already with the sample shopping cart application, there are a number of substantial improvements that could be made.Take this section of the controller servlet for example:
This is only a simplistic example application.Imagine a real application with potentially hundreds of different views. Iwouldn’t want to be the person maintaining an if/else block for that! Also, there is no business logic associated with each view, but if there was, where would it go? In this example,it would need to be invoked somehow from the if/else block.
There has now emerged a number of architectural frameworks that add substantially to the basic Model 2 architecture that you have seen in the previous example.These frameworks will be discussed in the remaining pages of this chapter.
JSP Related Interview Questions
|J2EE Interview Questions||Core Java Interview Questions|
|JDBC Interview Questions||Java Servlets Interview Questions|
|Hibernate Interview Questions||JavaServer Faces (JSF) Interview Questions|
|JSTL(JSP Standard Tag Library) Interview Questions||JBOSS Interview Questions|
|Log4j Interview Questions||NHibernate Interview Questions|
|Apache Struts 2 Interview Questions|
Jsp, J2ee, And The Role Of The Servlet
The Basic Syntax Of Jsp
Further Jsp Syntax
Deploying Jsp In A Web Container
The Jsp Standard Tag Library
Jsp And Javabeans
Jsp Application Architecture
Session Tracking Using Jsp
Developing Custom Tag Libraries
Utilizing Xml From Jsp
Transforming Xml Using Xslt And Xslfo
Invoking Web Services From Jsp
Locating Resources Using Jndi
Databases And Jsp
Jsp And Ejb Interaction
Security And Jsp
Personalization And Web Applications
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.