The Gateway discussion
There has been many a strong discussion on the implementation and understanding of Gateways in ColdFusion applications over the years, and there still doesn't seem to be any definitive answer or rule of thumb for the architecture and use of them in a design pattern environment.
Most object-oriented design patterns incorporated into ColdFusion development resemble common design patterns used in J2EE/Java.
We have already discussed Bean objects and Data Access Object in previous chapters, both of which are commonly used in most object-oriented design patterns, across any development language.
The Gateway, however, isn't necessarily a direct copy of the Java OO equivalent. In fact, there seems to be a level of uncertainty over what it actually is.
No hard and fast rules
We have read earlier on in this chapter that a Gateway encapsulates access to an external system or resource, and generally deals with items that are not objects, such as database tables.
Furthermore, by separating...