in reply to Object insanity and data hiding
A quick primer on OO ... the idea is that you have these things and each thing can accomplish a certain set of tasks. These task are very abstract, like walk(), dispense_money(), and the like. Then, there is what asks that thing to do whatever. The asker doesn't know nor does he care to know how the thing gets its stuff done. All that matters is results. (In that sense, OO programming could be called "results-driven programming" ...)
A human example would be a manager and an employee. Imperative programming would be like having a manager stand over your shoulder and say "Now, press 'N'. Now press 'o'. Now press 'o'. Now press '!'. ...". This is opposed to Object-Oriented programming where the manager says "Get this task done. You have a week. Tell me when you're done." The second manager doesn't know and doesn't care how you get the job done. He just wants to know that the job is done and done well.
What does this have to do with your case? Well, I haven't read the code. Frankly, it sounds like you're doing imperative programming in OO-clothing. It feels clunky, doesn't it? Sorta like you're trying to get a square peg in a round hole. Well, rethink what you're doing. Identify the things in your design (you do have a design, right?) and identify what each thing can do. Then, let them go and do their jobs without your meddling interference! :-)
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: A quick OO primer...
by synapse0 (Pilgrim) on Sep 11, 2001 at 03:08 UTC | |
by dragonchild (Archbishop) on Sep 11, 2001 at 17:21 UTC |