Progressing to OOP & modules for web apps

Discussion in 'Perl Misc' started by RA Jones, Mar 25, 2005.

  1. RA Jones

    RA Jones Guest

    Advice & opinions sought. I 'do' web applications - web-browser
    interface to MySQL db via Perl applications. These have traditionally
    been a (sometimes long) list of if-elsif-else statements with functions
    factored out to sub-routines and the final html generated using CGI.pm,
    which also handles form processing, etc. All this works well, but is a
    little clunky.

    Having been impressed with Kake Pugh's article about avoiding writing
    code, which promotes the modular approach to developing applications, I
    feel it's time to move on a bit and explore the modular/OOP approach,
    and have looked at various combinations of HTML::Toolkit,
    Template::Toolkit, CGI::Formbuilder, Class::DBI, CGI::Application &
    Maypole, though I think the latter may a step too far at present.

    I have done extensive reading of the documentation on these modules, and
    some related tutorials, but have very little practical experience of any
    of them. Speed is also an issue as I understand OOP can be slower than
    traditional methods, and for various reasons I don't/can't use CGI
    accelerators like mod_perl or FastCGI.

    Any advice about the relative merits of these modules from folks who
    have used them, or any others I should consider using would be most
    welcome before I embark on the next (probably steep) phase of the
    learning curve.
    --
    To reply by e-mail, change 'invalid' to 'uk':
    ra(dot)jones(at)dpw(dot)clara(dot)co(dot)uk
     
    RA Jones, Mar 25, 2005
    #1
    1. Advertising

  2. RA Jones <> wrote:

    > Advice & opinions sought.



    OK, but my comments have no relationship to the questions
    you are asking. :)


    > I 'do' web applications - web-browser
    > interface to MySQL db via Perl applications. These have traditionally
    > been a (sometimes long) list of if-elsif-else statements with functions
    > factored out to sub-routines



    A "dispatch table" is often a good alternative to if-elsif chains.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Mar 25, 2005
    #2
    1. Advertising

  3. RA Jones

    RA Jones Guest

    On Fri, 25 Mar 2005, Tad McClellan <> wrote:
    >> Advice & opinions sought.

    >OK, but my comments have no relationship to the questions
    >you are asking. :)


    That's OK, I value all constructive comments.

    >> I 'do' web applications - web-browser
    >> interface to MySQL db via Perl applications. These have traditionally
    >> been a (sometimes long) list of if-elsif-else statements with functions
    >> factored out to sub-routines

    >
    >
    >A "dispatch table" is often a good alternative to if-elsif chains.
    >

    So I gather, but is this not akin to the advice not to roll-your-own
    form parsing when there are better alternatives (CGI.pm). I understand
    CGI::Application is of merit here.
    --
    To reply by e-mail, change 'invalid' to 'uk':
    ra(dot)jones(at)dpw(dot)clara(dot)co(dot)uk
     
    RA Jones, Mar 25, 2005
    #3
  4. RA Jones

    Bart Lateur Guest

    RA Jones wrote:

    >Advice & opinions sought. I 'do' web applications - web-browser
    >interface to MySQL db via Perl applications. These have traditionally
    >been a (sometimes long) list of if-elsif-else statements with functions
    >factored out to sub-routines and the final html generated using CGI.pm,
    >which also handles form processing, etc. All this works well, but is a
    >little clunky.


    Randal Schwartz, you know the one, created CGI::prototype for this same
    purpose and is currently in the process of writing better docs and
    examples. I think it's worth checking out.

    --
    Bart.
     
    Bart Lateur, Mar 28, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Koncept
    Replies:
    1
    Views:
    291
    Peter Hansen
    Jul 1, 2005
  2. David Lozzi

    Stop Wizard from progressing to next step.

    David Lozzi, Oct 9, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,626
    holsher
    Jan 20, 2011
  3. anonymous

    Call windows apps from web apps

    anonymous, Feb 22, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    227
    anonymous
    Feb 28, 2005
  4. Richard Choate

    Web enabled apps/Thin client apps

    Richard Choate, Jul 23, 2003, in forum: ASP General
    Replies:
    2
    Views:
    302
    Chris Barber
    Jul 23, 2003
  5. Hennie de Nooijer
    Replies:
    0
    Views:
    176
    Hennie de Nooijer
    Feb 23, 2004
Loading...

Share This Page