in reply to Re: perl OO - to use or not to use
in thread perl OO - to use or not to use
Now, I do tend to write a lot of scripts, like CGI scripts. The script itself is procedural, but it will use a lot of objects. Let's face it - a non-trivial web app is going to have a lot of similar functionality in each one of its scripts. The following is an incomplete list:
- database connectivity
- template usage
- parameter validation
- business rules
As such, those make sense to be put into objects. Some would say modules work just as well, but I always seem to run into the "Widgets are just like gizmos, except for ..." situation. Or, I do a lot of factoring, for which abstract base classes are eminently suited. So, I almost always start my designs with an OO flavor, tossing in functional and procedural as needed.
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: perl OO - to use or not to use
by leriksen (Curate) on Sep 16, 2003 at 00:53 UTC |