Inside Java, you run into the push-pull quandary all the time. All your classes are bristling with get/set methods, but whose job it is to call the get method of class A and relay the information to the corresponding set method of class B? E.g. where A is a data object and B is the corresponding GUI (Graphic User Interface) object. If A does it, you are pushing. If B does it you are pulling. If class C does it you are controlling.
GUI objects are usually tree structured, Panels within Frames. Frequently, data passed to a Frame gets then passed to a Panel and finally to some Component, with often many more layers than that. Should data be relayed down the hierarchy or passed directly?
You can see there many possible combinations of push/pull and indirect/direct, all of which would technically work. However, if you are not careful, you will create a rat’s nest and you will have no idea how to find the code you are looking for.
Here are some rules of thumb to help create order:
This page is posted |
http://mindprod.com/jgloss/pushpull.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\pushpull.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[18.227.209.101] |
| |
Feedback |
You are visitor number | |