Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

Re: OO design and persistence

by dimar (Curate)
on Dec 23, 2005 at 00:50 UTC ( #518673=note: print w/replies, xml ) Need Help??

in reply to OO design and persistence

from a DB perspective, if a chuck of info is someting that you would logically normalize ... should (it) be its own object?

My favorite node on 'big picture' questions in OOP: The world is not object oriented.
(see also OO concepts and relational databases mentioned elsewhere in this thread)

Often the 'academic' approach to OOP and Data Architecture differs dramatically from the 'nuts and bolts' approach. This contrast in approaches is made more thorny by the fact that "Object Orientation" means different things to different people; even if they come from the same "school of thought"! From an academic perspective, this is a good thing, because it means more opportunities to publish articles, debate, and apply for grants.

From a nuts and bolts perspective, most end-users and I.T. clients do not care how sophisticated your object heirarchy is, or how clever you were in implementing it. What matters to them is whether they get what they expect: a performant application that does not make them have to think too hard.

With all the fire and noise generated behind the alluring mystique of OOP, very few people acknowledge that OO programming and Functional programming really have a lot in common, and consequently do not require such dramatic shifts in perspective when it comes to uniting the codebase with the persistence layer.

Sometimes, the only tangible difference (to the programmer) is just a difference in syntax. Consider:

### style1 $str = 'lrep'; $str = uc($str); $str = reverse($str); print $str; ### style2 $str = 'lrep'; $str = reverse(uc($str)); print $str; ### style3 $str = 'lrep'; $str.toUpperCase().reverse().toConsole();
This is of course a simplification, but the point is do not let yourself get too mystified by the terminology and buzzwords; if your programming methodology is driving your choices for persistance ... you *might* have a candidate for over-engineered design.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://518673]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2023-10-04 06:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found