Progressing to OOP & modules for web apps

R

RA Jones

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.
 
T

Tad McClellan

RA Jones said:
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.
 
R

RA Jones

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

That's OK, I value all constructive comments.
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.
 
B

Bart Lateur

RA said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top