Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: a Moose CGIP shall not receive merlyn's blessing

by merlyn (Sage)
on Oct 19, 2009 at 17:56 UTC ( [id://802057]=note: print w/replies, xml ) Need Help??


in reply to a Moose CGIP shall not receive merlyn's blessing
in thread CGI::Prototype leverages objects for web app control

Please don't misquote me.

I never said that a Moose-based CGIP was out of the question.

I said a non-prototype-Moose base class would not be acceptable.

All you have to do is use a prototype-Moose base class, which either exists already, or is just a small matter of programming.

Or, you can go off and do what you want. Just don't call it CGI::Prototype until it's prototype-based.

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

  • Comment on Re: a Moose CGIP shall not receive merlyn's blessing

Replies are listed 'Best First'.
Re^2: a Moose CGIP shall not receive merlyn's blessing
by metaperl (Curate) on Oct 20, 2009 at 15:37 UTC
    Please don't misquote me. I never said that a Moose-based CGIP was out of the question. I said a non-prototype-Moose base class would not be acceptable.
    Yes, that's right. I was typing in a hurry and made an overly general statement. My apology.
    All you have to do is use a prototype-Moose base class, which either exists already, or is just a small matter of programming.
    I would rather lean on standard Moose
    1. so I can leverage all the Moose extensions that exist
    2. so I dont have to worry about a splinter project and its potential bugs
    Or, you can go off and do what you want. Just don't call it CGI::Prototype until it's prototype-based.
    1. You should change your docs. You say that CGIP creates a CGI application by subclassing which implies class-based OOP
    2. You should improve your docs (similar to my fork). When people scan your docs or your Linux magazine articles, they see nothing that cant be done just as easily with class-based OOP or CGI::Application. You need to motivate the unique position of this module with some exemplary sample code SOMEWHERE
    3. Please embrace the multiple concepts of prototype. A CGI prototype could be something which prototypes the CGI request cycle. And CGIP does an excellent job of that, regardless of which object system it uses. There's no need for a separate distribution for something which has largely the same code.
      So I can leverage all the Moose extensions that exist
      is a false dichotomy. There should be nothing in a base class that's based on Moose plus prototype extensions that would interfere with any other Moose extension, except for perhaps a name collision in core methods.
      You say that CGIP creates a CGI application by subclassing which implies class-based OOP
      which again implies that you keep seeing "class-based" as the opposite of "prototype-based". I'm telling you that class-based is a subset of prototyped-based. And yes, the primary means of creating apps with CGIP is in fact subclassing the provided class, but as an additional feature, you can also use prototyped inheritance for some parts, which I have done, and would miss if not possible.
      You need to motivate the unique position of this module with some exemplary sample code SOMEWHERE
      No, I don't. This is not a popularity contest. I don't need to motivate anything. My code is happily powering websites all over the world for my clients. Any other use of it is pure gravy.

      As I said, go ahead and call yours "MooseX::CGIP" or whatever. It just won't replace CGI::Prototype (even as a new version number) until it does replace it, including having easy access to unnamed subclasses and attributes that auto-populate in derived classes (named or unnamed) on being set. Those are both pretty trivial to do with Moose. But it needs to be part of the core of the CGI::Prototype replacement.


      Update: See t/200_examples/006_example_Protomoose.t in the Moose distro.

      -- Randal L. Schwartz, Perl hacker

      The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Log In?
Username:
Password:

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

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

    No recent polls found