Wow!! Gunther you've done it again. I ask for some nuggets and you've
given me the gold mine :)
Gunther Birznieks wrote:
>
> If you look at the latter half of the on-line book at
> http://www.extropia.com/ExtropiaObjects/ and read the module chapters after
> and including the "Architecture" chapter you will see a sidebar in each
> chapter devoted to identifying design patterns that were used in that set
> of related modules.
I just quickly browsed through Chapter 10 (104 pages !!) and it shines
light on EXACTLY the sort of things I was thinking about. It is like the
'Design Patterns' & 'Conway book' fused into one. I also downloaded the
webware apps so I can disect and learn from them. I'll be busy for the
next few months:)
> eg we use CoR in filters that are specific to handling content in our apps.
> We use (depending on how you view it) CoR or flyweight for dealing with
> stuff like data handlers (which are essentially filters for *incoming*
> content)
In addition, Webware will give me some real world apps to look at to get
a sense of how CoR, flyweight etc are implemented, especially in Perl.
This is right on the money as far as what I am trying to learn.
> >3. Are there any new patterns useful for mod_perl apps?
>
> Lots. But I think you mean Web apps not mod_perl apps. Web Apps abound with
> idioms and design patterns. There are many which have been identified since
> the GoF book such as Session which I think nearly all large web apps use. :)
You were correct in paraphrasing my question to mean web apps. At the
moment I happened to be thinking in terms of mod_perl handlers.
> >4. Am I wasting my time with OO and design patterns if the goal was
> >writing a mod_perl app?
>
> I guess it depends on what you mean by a mod_perl app. If you mean a web
> app that runs on top of mod_perl, then you should use good OO because I
> suspect you'll want to expand that app and do things later with it which
> means the cost of maintenance is an issue not just the speed.
>
> If, however, you are writing some custom auth handler or something like
> that, then the efficacy of sticking to OO is less because (A) Yes, you
> could lose some performance in some cases, and (B) Because the auth handler
> is likely to be so tiny that OO would not make sense. OO is better for
> larger programs so that they can be broken down more easily.
I can see the distinction now. seems obvious now that I hear you say it
:)
> PS Caveat: Don't go overboard on design patterns. GoF book was written with
> typical apps in mind. Web apps were not in their view scope at the time.
>
> Web apps do operate differently to regular apps and the design patterns or
> idioms you might wish to use may be different. Since as the GoF book puts
> it, all patterns have their advantages and also their consequences. Those
> consequences may be OK for a regular app but not for a web app.
>
> There have been tons of articles and books on Design Patterns since GoF
Any specific web design patterns book you would recommend?
> book was out. It's good to absorb GoF, but don't use it to hammer
> everything because you've read something new and cool. Asking your
> questions certainly shows you seem to understand that anyway, so I am
> probably preaching to the choir. :)
Again, thank you for some terrific and valuable insights. I feel I got a
lot more than I bargained for and that's why I love this LIST !
bakki
--
_ _
.-. |M|S| Bakki Kudva
|D|_|a|y| Navaco
|o|m|n|s|<\ 420 Pasadena Drive
|c|e|a|t| \\ Erie, PA 16505-1037
|u|n|g|e| \\ http://www.navaco.com/
| |T|e|m| \> ph: 814-833-2592
"""""""""""""""""" fax:603-947-5747
e-Docs