*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Push & Pull models of MVC" Watch "Push & Pull models of MVC" New topic
Author

Push & Pull models of MVC

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Hi,

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
Regards
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.


Merrill
Consultant, Sima Solutions
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Thanks Merrill!!!
 
 
subject: Push & Pull models of MVC
 
Similar Threads
How to solve refresh problem in JSP
Is this MVC ?
JSpinner and arrows
Essential JavaFX: Why No Real RIA?
Client pull and Server Push