Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Multilevel flexibillity

by gjb (Vicar)
on Jun 23, 2003 at 12:15 UTC ( [id://268127]=note: print w/replies, xml ) Need Help??


in reply to Multilevel flexibillity

In general, I find that when using an OO approach with a granularity that is not too large I seldomly run into problems when I want to change the code later.

Classes should map as closely as possible to the "objects" involved in the problem you're trying to solve (that's what I mean by the "right" level of granularity).

Altering functionality can be done by using the typical OO techniques like inheritance or composition.

For me, the threshold to introduce classes is very low, but opinions on this topic differ widely.

Just my 2 cents, -gjb-

Replies are listed 'Best First'.
Re: Re: Multilevel flexibillity
by zby (Vicar) on Jun 23, 2003 at 12:28 UTC
    The OO techniques do have their's place, but I would argue that that is not all about the flexibillity. It is for me in the lowest layer - source code, and is much more usable for the author of the code than for the 'general public', it's just too tightly coupled. Templating for webpages is a perfect example of a really powerfull technique well separated from the source code.

      I agree that OO is not only about flexibility. The main point for me is that the OO approach can match the "problem space/world" very closely. So it's mostly about modelling, the flexibility can come for free if the former was done "right" (for your favorite definition of right, i.e. there more than one way to do it ;-)

      Just my 2 cents, -gjb-

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-26 05:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found