Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Inside-Out Object Model

by Anonymous Monk
on Nov 06, 2006 at 08:47 UTC ( #582398=note: print w/ replies, xml ) Need Help??


in reply to Inside-Out Object Model

What are the pros and cons of an Inside-Out Object Model?

Pros:

  • Encapsulation of attributes: only the scope that defines the attributes can get at them.
  • Inheritance always works: the implementation isn't dependent on how a super class is implemented.
  • Multiple inheritance is potentially easier.
Cons:
  • It's more complex, you need for instance a DESTROY function.
  • By default, they don't work after splitting of threads, unless you set up a special CLONE method. (They should work fine if you only create objects after you've split up your threads).
  • Due to the encapsulation, you will need to do extra work when serializing.
  • There's far less documentation. "Everyone" still gets to learn hash based objects when learning OOP in Perl.


Comment on Re: Inside-Out Object Model
Replies are listed 'Best First'.
Re^2: Inside-Out Object Model
by jdhedden (Deacon) on Nov 09, 2006 at 01:38 UTC
    Object::InsideOut is a full-featured insideout object suport module that handles all the cons mentioned above. It is extensively tested, well-documented and actively supported.

    Remember: There's always one more bug.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (17)
As of 2015-07-30 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls