Brendan O'Hara

Subscribe to Brendan O'Hara: eMailAlertsEmail Alerts
Get Brendan O'Hara: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Top Stories by Brendan O'Hara

As ColdFusion developers, we tend to build applications based on pages that display information and queries to retrieve information and save information. We tend to think solely of how we are going to implement the code required to perform a certain function. Many times we are not able to consider the commonality of a certain problem and whether an already established design exists somewhere. Often we are not able to set aside time to do this research. Knowing and utilizing design patterns allows us to think in a common language, with an ever-expanding library of well thought out solutions to consider when architecting an application. Recognition of these patterns in our everyday jobs can make us significantly more productive and seem even smarter than we are. In the past three issues of CFDJ, I have been showing you how other languages use object-oriented design ... (more)

Design Patterns in ColdFusion: Template Method Pattern

ColdFusion has always been an interesting Rapid Application Development tool but never a language taken completely seriously by object-oriented programmers because of its purely structural nature. C++ and Java CFX tags, and the somewhat unreliable nature of , kept many advanced programming concepts unreachable by the average CF5 developer. With the release of ColdFusion MX, Macromedia simplified the use of Java from within ColdFusion. Additionally, the language itself has been extended to include a Java class-like construct known as ColdFusion Components (CFCs). With th... (more)

Design Patterns in ColdFusion: Iterator Pattern PART 2

Last month I introduced design patterns, including the Template Method pattern and how it encourages polymorphism and helps remove the common switch-case constructs we normally utilize in custom tags for purposes of code reuse. This month our topic is the Iterator pattern, a simple yet powerful design pattern you can use to generically traverse through a custom collection CFC. You'll need to know what a collection is and exactly where the Iterator pattern comes into the picture. I'll go over Java Iterator syntax and demonstrate a ColdFusion implementation using CFCs. First, it's ... (more)

Design Patterns in ColdFusion: Creational Patterns

With the recent introduction of ColdFusion MX 6.1, developers continue to explore the new features and improvements ColdFusion has to offer. What you may discover, as I have, is that we have hardly scratched the surface of what is possible with ColdFusion Components (CFCs). Introduced last year with the release of ColdFusion MX, CFCs were a radical leap forward for the language. Getting used to this new paradigm, and getting the most out of it, will take a while even for the most seasoned CF developer. ColdFusion MX is built on top of the Java/J2EE platform; in fact MX 6.1 now i... (more)

Design Patterns in ColdFusion: Singleton Pattern

With the introduction of ColdFusion Components, or CFCs, in ColdFusion MX, we as ColdFusion developers have a way to leverage object-oriented programming, or OOP, within CFML. Sometimes it is necessary in object-oriented programming to ensure that there is always one, but never more than one, of a certain object. There is also the need to access that single object from within any application. This idea of a single, globally accessible object has numerous programmatic advantages for us as developers. It also makes the underlying J2EE memory management and garbage collection on w... (more)