|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
This may just be my take on the world, but I haven't yet found a non-trivial application that would be better written in procedural vs. OO. (OO vs. functional is an interesting debate, but I'm still trying to figure out where pure procedural is indicated.)
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:
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. ------ 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. In reply to Re: Re: perl OO - to use or not to use
by dragonchild
|
|