Ah so you're more having problems with establishing relationships between the 
objects rather than understanding OOP in general.

Exactly, except I have not managed to make much progress toward an "aha" moment.

My current task: Create an interface to enter and administer Trima machine 
data.  The data for a trima machine is very simple: ID, Serial Number, Version, 
In-Service and Out-of-Service dates as well as a history of locations.  The 
history of locations is collection of dates showing when and where an 
individual machine was/is located.

We have our database tables; one for the basic Trima data and a sub-table for 
the location history.  Procedurally, I could do this in my sleep.  Create a 
master page listing all the current Trima machines with links to a detail form 
page for editing and/or adding a new machine.  This form would call an action 
page that would validate the submitted data.  Then if valid, write the data to 
the database otherwise return to the form with some kind of error feedback.

But I can not convert this to an object orientated design.  I can create a 
simple object that would represent a trima machine which I believe is often 
called a bean.  I think I understand how one would separate the database logic 
into a DAO.  But I don't know how one relates these two objects.  

I start really getting lost trying to figure out where validation goes and how 
it is used.  Is it part of the bean, the DAO, or some other piece?  Is it good 
or bad to put bad and/or partial data into the bean because some of the form 
data was good and some was bad?  How does one use a form first to show the 
current bean data and then to show the form submitted data with error feedback? 
 And how does one create the master list of all current trima machine beans?

I feel like I'm standing the top of a high procedural mountain peak.  Looking 
down into an inviting lake of OOP goodness.  But I can not, for the life of me, 
find a path down the slope of the mountain and through the forest to the lake.  
I keep getting lost and having to trek back to the top of the mountain.  

Sorry for the sudden attack of the metaphors — long meetings today.

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

---------
| 1 |   |
---------  Binary Soduko
|   |   |
---------
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240702
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to