This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes diff b/w threetier and mvc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "diff b/w threetier and mvc" Watch "diff b/w threetier and mvc" New topic
Author

diff b/w threetier and mvc

raghuram bikkani
Greenhorn

Joined: Jan 18, 2006
Posts: 16
what is the diff b/w threetier and mvc Architecture
sammaiah kyatham
Ranch Hand

Joined: Aug 03, 2003
Posts: 104
Hi,
MVC framework is used to provide loose binding between Server and client.
Sever side methods can be modifed with out affecting client side code.

we can use MVC irrespective of tiers.
3-Tier Architecture:
Ex: Client-->App/Web-Server--->DatabaseServer.
I think it is clear,

Thnx,
sam
Sheetal Kaul
Ranch Hand

Joined: Nov 29, 2004
Posts: 47
Hi,

As you mentioned in the above answer that in MVC we can modify the server side methods without affecting client side code. that means we Cant do this in 3 tier...???

other this is you said we can use MVC irrespective of tier? i was under impression that in 3-tier also we can use irrespective of tier..??

Please explain..


- Sheetal
sammaiah kyatham
Ranch Hand

Joined: Aug 03, 2003
Posts: 104
You can use MVC in 3-Tier/n-Tier.
More precisly MVC is used for best approach to integrate Server side and Client side code, where 3-Tier/n-Tier is used to reduce the load of the servers.
If your app server has high load, add some more servers to reduce the load.
For http related requests use webserver.
As the number of servers increases, tire will be increased.
Do not compare MVC and n-Tier, both are different.

is it clear for u?
Sheetal Kaul
Ranch Hand

Joined: Nov 29, 2004
Posts: 47
Hi,

Yeah i got that, 3tier/n tier is not for integration of server side and client side things, this is just to reduce the load on server ..right??? then what is the difference between MVC -1 and MVC-2 ???
as both (MVC -1 and MVC-2) are used for the same purpose... is MVC-2 related to 3 tier/ n tier??


Please reply
- Sheetal
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Here is my take on this. Let's say that a well-designed system has three layers: presentation, business logic and data storage. For an MVC architecture, the model is in the business logic layer, and the view and controller are in the presentation layer. MVC does not really address the data storage layer.

So, the layers may have the following (let's say that Struts is used as the MVC implementation).

Presentation
============
HTML
CSS
JSPs
Servlets
Struts files and classes

Business Logic
==============
Business objects
EJBs

Data Storage
============
DAOs
SQL


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
Another distinction to keep in mind when trolling through books or magazine articles, is that there is a difference between MVC as it is used for desktop GUI applications versus the web variant of MVC. Originally MVC came from the Smalltalk world and was really an extrapolation of the observer pattern. The idea was that changes to the model would cause propagation notifications to be delivered to the view, which was an observer of the model. You can't really do that on the web unless you are using something like Ajax or an Applet, so the view and controller interact a lot more on deciding when to pull data from the model to update the view.
[ January 20, 2006: Message edited by: Reid M. Pinchback ]

Reid - SCJP2 (April 2002)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diff b/w threetier and mvc
 
Similar Threads
Reg:JSPBean
Sessions and cookies
Cookies
diff b/w Throw and Throws
testing