Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Do you know where your variables are?
 
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
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 musing on the Monastery: (8)
As of 2014-04-19 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (483 votes), past polls