Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: How do I go from procedural to object oriented programming?

by jeffa (Bishop)
on Apr 22, 2015 at 15:23 UTC ( [id://1124276]=note: print w/replies, xml ) Need Help??


in reply to Re^4: How do I go from PROCEDURAL to object oriented programming?
in thread How do I go from procedural to object oriented programming?

"Lady_Aleena is writing code to run under CGI ..."

I was wondering what you were on about there. My code is not meant to replace what the OP already has. This code is meant to demonstrate just one of the many ways you can translate the original code into objects. You don't have to use Moose. The OP doesn't have to use Moose. CGI was never mentioned and the only reason i chose to use Moose is because i am familiar and comfortable with it and i have no problem writing scalable applications with it. To borrow a quote: "In other words, I saw no good reason to expose novices to the core mechanism of object orientation."

Additionally, rather than merely dismissing a technology you should offer at least two replacements. You could have mentioned Moo or Mouse, or Class::Tiny or Role::Tiny ... but you offered no alternatives. You didn't even discuss using "the core mechanism," AKA:

package Object; sub new { bless {}, shift } 1;

One of the key components in great software design is loose coupling -- if you think about, you are practicing tight coupling by adhering to some artificial requirement that the OP has to use CGI. That is 20th century technology and we are indeed living in the 21st century. Care to join us?

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^6: How do I go from procedural to object oriented programming?
by Anonymous Monk on Apr 22, 2015 at 23:23 UTC

    and here I thought you were well aware of her hosting situation ...

      Why should anyone be well aware of any such thing?

      Anyone who is successful knows that they need to understand certain technical details (or hire professionals). Using hosted solutions is very much not ideal. You seem to be trying to hold Lady_Aleena back and keep her scared from using new technologies. Nothing you have said has been helpful. All you are doing is ranting and raving because you don't like Moose.

        Why should anyone be well aware of any such thing?

        Simple, jeffa isn't anyone, he is on perlmonks frequently, has talked with Lady_Aleena many times, helped her many times, as have many others ... this isn't the first time shes seeking help

        Anyone who is successful knows that they need to understand certain technical details (or hire professionals). Using hosted solutions is very much not ideal. You seem to be trying to hold Lady_Aleena back and keep her scared from using new technologies. Nothing you have said has been helpful. All you are doing is ranting and raving because you don't like Moose.

        Utter nonsense. Why should somebody asking for help continually have to justify her constraints -- either accept them and try to help, or move on

        You're under no obligation to help

Log In?
Username:
Password:

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

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

    No recent polls found