Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Inside-Out Object Model

by Anonymous Monk
on Nov 06, 2006 at 08:47 UTC ( [id://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.

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://582398]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-24 04:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found