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
important to understand what a collection is and what it is useful for.
CFCs as Custom Collections
In most object-oriented languages a collection is simply an object that
groups multiple other objects within a single container. In the Web world,
collections are often useful for retrieving dat... (more)
For the past couple of issues we have been getting to know how other
languages use object-oriented design patterns and how those patterns can be
implemented in ColdFusion MX. We jumped right into the Template Method and
Iterator patterns and this month we will explore the Strategy pattern.
This month's pattern has some things in common with the Template Method
pattern we reviewed in March (CFDJ, Vol. 5, issue 3). The Strategy pattern
helps us encapsulate a series of related algorithms, or strategies, and gives
us a single interface, known as the context, with which to work with th... (more)
Hello to everyone in the ColdFusion community. In this column, I’d like to
spotlight User Group managers, Team Macromedia volunteers, community leaders,
and other enthusiasts who champion ColdFusion and related technologies. These
are people like many of you who spend hours – and even days – a week
giving back to the ColdFusion and Macromedia communities. Today I’m
speaking with Steve Rittler, manager of the Philadelphia area CFUG and
founder of the new Philadelphia area MMUG. Brendan O’Hara: Steve tell us
how you became involved with the Philadelphia Area CFUG, and eventually
... (more)
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 ou... (more)
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)