Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Object oriented Perl: What's popular?

by Erez (Priest)
on Feb 01, 2008 at 19:16 UTC ( [id://665626]=note: print w/replies, xml ) Need Help??


in reply to Object oriented Perl: What's popular?

I may sound insane, but I like Perl 5's object model as it allows me to choose the right way for the design I'm interested in, while keeping everything Perlish enough. (Seeing that "Pure OO" languages tend to force their OO way-of-thinking on you).
On the other hand, I also like JavaScript's prototype system as well, so I might not be the best person to refer to.

Since you wrote that your web-application is a "great candidate for an OO style", I would suggest that you should pursue this idea before writing any code. Find out what style you wish to utilise and the object model that you'll seek, and then find the tools that satisfy your needs. Another way of doing this is actually finding the right tools (which components your web-application will use) and the API that goes with them. Most of CPAN's modules are already displaying a heavy OO API, which may suggest a way for you to work.

While Java (et al.)'s "Everything's an object (usually called Object)" state of mind isn't the only option out there, it seems that most people prefer their OO this way, making Moose a good choice, with its "Everything's a Moose::Object" style.

UPDATE: Just checked and found that in JavaScript Everything is, in fact, an Object.

Software speaks in tongues of man; I debug, therefore I code.
Stop saying 'script'. Stop saying 'line-noise'.

  • Comment on Re: Object oriented Perl: What's popular?

Replies are listed 'Best First'.
Re^2: Object oriented Perl: What's popular?
by stvn (Monsignor) on Feb 01, 2008 at 19:26 UTC
    While Java (et al.)'s "Everything's an object (usually called Object)" state of mind isn't the only option out there, it seems that most people prefer their OO this way, making Moose a good choice, with its "Everything's a Moose::Object" style.

    Moose is more than just "Everything's a Moose::Object". We can also do prototype style OO, and if you are so inclined inside-out objects with MooseX::InsideOut. And honestly plain Moose is not nearly as "everything is an object" as when you use Moose::Autobox.

    -stvn

      Moose is more than just "Everything's a Moose::Object".

      I was over-symplifying, of course, in the process of trying to cater for the OP's Java-based background.

      We can also do prototype style OO

      Now *that* would be interesting, although the URL you link to seems to be broken.

      Software speaks in tongues of man; I debug, therefore I code.
      Stop saying 'script'. Stop saying 'line-noise'.

        We can also do prototype style OO

        Now *that* would be interesting, although the URL you link to seems to be broken.

        Sorry, link fixed. It is actually to a test script from the Moose distro. I had been talking to merlyn (who is apparently a big fan of prototype based OO) and he was asking of Moose could be made to do it. Of course, its not *really* a pure prototype based OO, but a thin prototype-ish layer over the class based system Moose uses, and implemented using metaclasses. It's fairly complete, so it probably could be made for real-world use, but I don't have the need or desire to do so, it was just fun to write :)

        -stvn
      Moose is gamey

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found