• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is this MVC?

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a web application at the place I work. It has a jsp front-end and no servlets. The navigation is being implemented using a Navigation.xml which maps the URLs to the jsp's.
There's a java class which parses the xml and builds the corresponding look and feel for the web page.

I am not sure what this pattern is called. But i see this is a very common method of managing web apps these days. Can this be called a MVC model? Does any one know what such a pattern would be called?
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My understanding of MVC is..

JSP for the way the content looks
Servlets for performing opperations on data
Beans for use of storing data.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's right.The model u r talking about is MVC.
But as far as i know it's not specific to jsp's/servlets and so on.
MVC is just a framework in which we have Model, View and Controller recognised individually,that helps for faster development and better debugging and maintenance of web applications developed.

Example of MVC framework is Struts.

Hope that helps!


[ May 18, 2006: Message edited by: Vijendra Runwal ]
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi vishwanath
as you mentioned, you can't call it as MVC.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Al Hollis:
My understanding of MVC is..

JSP for the way the content looks
Servlets for performing opperations on data
Beans for use of storing data.



As Vijendra mentioned, MVC is not specific to Java web apps.
I believe it has its roots in SmallTalk.
I know it was used extensively in early Apple/Mac GUIs.

Usually when building Java web apps, Servlets are used as the controllers (C) and handle web flow. Beans are the Model (M) and handle the business logic and communication with other data objects (such as EJBs or JDBC databases). JSPs are the View (V), and are used for formatting the output.

I have a very simple example of this on my own site http://simple.souther.us. Look for SimpleMVC.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In MVC Model-1,JSP is the one which processes the request and also acts as presentation layer.In MVC Model-2,the request is taken up by the sevlet which is pre-written by the framework vendor.Depending upon the request corresponding business logic is performed and the results are put in a Bean.The JSP will pick the results from the bean and presents to the client.
i am not very sure,but i guess it should be MVC Model1 that you are using.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vishwanath Rajashekar:
In MVC Model-1,JSP is the one which processes the request and also acts as presentation layer.In MVC Model-2,the request is taken up by the sevlet which is pre-written by the framework vendor.Depending upon the request corresponding business logic is performed and the results are put in a Bean.The JSP will pick the results from the bean and presents to the client.
i am not very sure,but i guess it should be MVC Model1 that you are using.




There isn't an MVC-1.

Model 1 is not MVC
Model 2 is MVC
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:



There isn't an MVC-1.

Model 1 is not MVC
Model 2 is MVC



I have interviewed lot of people who make this mistake.
 
He's giving us the slip! Quick! Grab this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic