0

Applying Design Patterns to ColdFusion - Intoduction

Coldfusion, Design Patterns

I recently had the Head First Design Patterns book handed to me.  This is a fascinating book, however, I imagine that a number of ColdFusion developers would take one look, see all the Java and move on to the next book, or worse, abandon the concept of design patterns in CF.  I think if I had picked up this book a year ago I would have been in the latter camp and stuck with what I know and enjoyed my comfortable rut.  My goal, over the course of reading this book, is to share with community the patterns I learn and how to apply them in CF with some close to real world examples.

If you are interested in how to use design patterns with CF and would like to follow along with my journey I encourage you to buy, borrow or steal (ok, don’t steal it) a copy of the book.  I’ll do my best to relate my posts to the chapters they are inspired by.  I hadn’t planned on covering chapter 1, but if anyone feels that it should be looked at please let me know and I’ll take a look at it again.  I’ll be starting my series with chapter 2, The Observer Pattern, later today.

Eric said:
 
I'm glad you posted this. I've been planning on getting this book as well as Head First OOP. Although, since I'm still new to both of these concepts, I'm not sure which one I should read first. Any suggestions?
 
posted 184 days ago
View Replies (1) || Add Comment Reply to: this comment OR this thread
 
.: HIDE REPLIES :.
Steve said:
 
The Design Patterns book makes the assumption that you have a loose understanding of OO concepts though the authors give sufficient footnotes that you could read it prior to the OOP book and still make some progress. I think I might recommend reading both at the same time. Read some of the OOP book, then some of the DP book. Doing it that way should give you some perspective on how the concepts are applied in patterns and real code. It may seem overwhelming at first, but as you progress through the books in tandem I think they will both begin to make sense in a more practical way rather than only theoretical concepts. At least that's my opinion.
 
posted 184 days ago
Add Comment Reply to: this comment OR this thread
 
Shawn said:
 
It's a fantastic book. I recently implemented Decorator in the rebuild of a CF-based spidering engine, and Decorator itself is very much the basis of AOP, which in turn, is implemented in ColdSpring (which I also use).

Highly recommended book.
 
posted 183 days ago
View Replies (1) || Add Comment Reply to: this comment OR this thread
 
.: HIDE REPLIES :.
Steve said:
 
The decorator pattern is one of those patterns that I heard about and had no clue how it was supposed to work, in any language. I still think it's a fascinating pattern, and extremely useful. Glad to read a use case where it has been applied!
 
posted 183 days ago
Add Comment Reply to: this comment OR this thread
 
Steve Weyrick said:
 
Its funny that your post is on the topics in the DP book, because I just picked up this book over the weekend and planned to do the exact same thing. I think it could be difficult to apply the same patterns without understanding some of the syntax in ColdFusion vs. Java. What is your opinion?
 
posted 183 days ago
View Replies (2) || Add Comment Reply to: this comment OR this thread
 
.: HIDE REPLIES :.
Steve said:
 
I agree that it can be difficult to read sample code from an unfamiliar language and then try to apply it to CF. That's partially why I'm doing my series, the other half is to get CF developers out of the mind set that they _need_ all these "helpers", ie frameworks, code generators etc.
 
posted 183 days ago
Add Comment Reply to: this comment OR this thread
 
Stephen Weyrick said:
 
Great!!! Well I'm glad that your posting on this stuff. I hope that I will be able to understand the patterns in ColdFusion. I read chapter 2 last night on the observer pattern. It was pretty good, and I am looking forward to what you have to say about it.
 
posted 183 days ago
Add Comment Reply to: this comment OR this thread
 

Search