File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Push & Pull models of MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Push & Pull models of MVC" Watch "Push & Pull models of MVC" New topic

Push & Pull models of MVC

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980

Whats the difference between the push & pull models of MVC...

And which is the better of the two...

Is struts push /pull based...???

Tx in advance
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The concept of push and pull refers to what the server does in relation to the client. In a "push" application, a server is pushing or sending data to clients at it's own initiation. In a "pull" application, the server is pulling or waiting for and receiving messages initiated by clients. The classic example is that of two different stock quote programs. In a pull application, the server will respond to client requests to get the current price of the stock. In a push application, the server sends a message to the client whenever the price of the stock changes.

In this sense, Struts and all traditional web applications use the "pull" model, because a J2EE web container sits and waits to receive requests from browser clients. In a traditional web application, about the only way for the server to "push" data to the client was to use an Applet.

Now that AJAX is more commonly used, there are ways to use AJAX type interactions with the browser to create applications that use the "push" model.

Consultant, Sima Solutions
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980
Thanks Merrill!!!
I agree. Here's the link:
subject: Push & Pull models of MVC
It's not a secret anymore!