• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

versions of MVC

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone tell me the various versions of MVC w.r.t to Java , What is the current version??
 
Sheriff
Posts: 17712
302
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you refer to the Model-View-Controller design pattern, it is not a product so there are really no "versions" of it.
Struts, discussed heavily in the Java Frameworks forum, is a framework that is based on the MVC pattern. Struts is now at 1.1 beta 3. The last stable production release was 1.0.2. Swing is also based on MVC. These are just two examples of how the pattern can be implemented in different ways.
[ February 06, 2003: Message edited by: Junilu Lacar ]
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a way, patterns can be like a religious text that can be interpreted in different ways by different people.
I could be wrong, but this is how I understand MVC:
MVC began as an three-tier architectural pattern...
Model - Database
View - GUI with access to Controller tier
Controller - business logic to link client with dynamic data from the database
With regards to Java, as in your question, depends on if you include J2EE. If this is so, the trend in J2EE is to have a five-tier architecture...
Client (Web Browser)
Presentation (*will talk about soon)
Business (Processes info between Pres. & Int.)
Integration (Accesses Database)
Resource (Database)
*The presentation tier includes things like Servlets, JSP, and Javabeans (not EJB). The MVC is used as a design pattern within the presentation tier. The main purpose of using MVC is to make code in the tier more reusable. The best illustration I've seen of MVC in relation to J2EE comes from the SCWCD Exam Study Kit book - the chapter on Design Patterns. This book is really as essential to have as the saloon.
Since MVC isn't necessarily a "product" there is some vagueness to it, so don't read just one interpretation of it and agree with what you hear. Just like religion or philosophy, listen to points from many sources and arrive at what seems to be truth. I hope the people that don't agree with my definition of MVC can present their view with an open mind - I hate being told that I'm the Anti-Pattern!
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my understanding of MVC:
Model: Classes representing the business rules of the system
View: Classes representing presentation logic - how the model will be viewed to the user
Controller: Classes handling user interaction - getting key presses and mouse clicks from the user and deciding how model and view should react to them.
The idea behind MVC is that if you want to change the way the user interacts with the system, you don't have to change the Model at all.
A google search should give you *much* more information...
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic