Kola, I can't seem to grasp whether this is being critical of my gateway
discussion or not (it comes off as critical but I am not sure it was
intended too). Anyway, I was trying to understand where the ColdFusion
implementation of the gateway pattern cam from, and it isn't Fowler's book
(which was part of the point).
Brian links to the Longacre blog's coverage of data gateway patterns and I
think this quote is particular relevant here:
...and I should have mentioned that I completely agree with you about the
lack of understanding of the forces and trade offs involved in selection of
patterns. A given pattern is a solution to certain problems in certain
situations - not merely a template to be used to build your application.
Folks should read Joshua Kerievsky's "Refactoring to Patterns" book (as
well as the original "Gang of Four" book) for real world examples of when -
and how - to use various patterns.
I've had a number of blog postings and articles about other (much more
interesting) patterns than DAO and Gateway. These include the State pattern
and the Strategy pattern, among others. Have a look if you like:
I know what you mean, Kola. I've all but dropped out of CFC-Dev because I'm
sick of the patterns talk.
You have right in some point. Instead of understanding concepts, appliying
techniques without knowing what really means is a common situation
specially in our "lazy" CF community. Hal Helms did a great explanation on
this at CFUnited by explaining real object idea and pseudo OO stuff.
"I agree with Simon Horwith on some of these basic design pattern issues
that objects are supposed to be smart. That's what Object Think is all
about. Responsibility-Driven Design." - Sean Corfield 7/25/07
Hey Brian, I wasn't being critical of your blog post at all - in fact the
only reason I mentioned your blog post was because it prompted me to write
on something which I have been meaning to discuss for a while thats all.
Nor am I trying to be counter productive or put anyone off learning OO. I
am certainly no guru and can always learn more - but I do think the way
many people in CF are being introduced to OO can be a slippery slope.
Especially if they are using certain design patterns because thats the 'way
everyone else does it' and without spending time reading the actual
definition and intent of a design pattern. I agree that POEA isn't the
first book I would give to someone but that said its no more advanced than
the design patterns book in my opinion
Kola, No problem, like I said I didn't think that was the intent. I am glad
my gateway discussion has sparked a worthy discussion. In fact, it kind of
follows I guess since I was actually trying to look into the *intent* of
the gateway rather than its function (as in what problem is it actually
solving). I think Sean had a point when he said we need to get some CF
specific discussion and examples on the topic of alternative patterns to
the DAO and Gateway; so let's get the material out there to assist CF
developers to delve further into design patterns. To me, a big help was a
book called "The Object-Oriented Design Process" (I think that is what it
was called anyway) which got to the key of thinking about your domain model
in abstract terms and got away from the tendency to think about data and
code first.
@Brian, may be I pointed out different than what I targetted. Think that we
have ColdBox for a long time and it is a great solution but when I compare
the first phases of MG and ColdBox, I can definitely see "the Sean factor"
just to try anything new. :)
@Oguz, I'm not sure whether to be flattered that you think I have so much
influence or offended that you seem to be accusing me of trying to suppress
ColdBox because I haven't written much about it?
@Sean: First of all I very appreciate what you provide to the CF community.
I don't say anything about it and there is also no doubt about the
importance of your great community support.
@Oguz, I really don't think you've read that article properly. Please read
it again, especially the various comments. There are plenty of specifics in
there that explain why one framework might be better than another in
certain situations.
@Sean,
Guys, I see all of your points. Fact is, many developers without formal
training read our blogs to gain the experience and knowledge of those who
know more than they do. Discussions, such as this one, are great for
pointing out that there is "more out there" to learn and grow from.
@Sean: How can we come this point I really do not know. What I said is that
what you do is the great and beneficial for the CF community. What I am
complaining about is the community behavior and regardless of what you
provide they "believe in it" and give decisions without thinking about it
or trying it to decide about it.