Chapter 5. Data Access Objects
Our application structure is starting to take shape, and the addition of Beans and the benefit of using these blueprints has already started to become apparent.
In this chapter, we will follow on our journey into ColdFusion OOP design patterns, and investigate the use of Data Access Objects with our application.
We will also look into the following:
Understanding what a Data Access Object is
Creating database interactions
Storing objects in memory
What is a Data Access Object?
A Data Access Object, also known as a DAO, is a form of an object-oriented design pattern that allows you to separate data access from standard business logic within your application. Primarily, the DAO gives you the ability to perform updates and interactions with your database from a single file, your DAO file itself.
As we have seen in Chapter 3, the Bean objects hold values for a single record of data. The Data Access Objects work in harmony with the Bean objects and update a single record...