Tag Archives: OOP

Should Your Objects Validate Themselves?

It seems quite common in the ColdFusion community to see objects with a validate() function. This is used to handle when your object contains potentially invalid data, such as invalid data supplied from a form. This leads to a good question; should your objects be allowed to have an invalid state? Let’s consider an example [...]
Posted in OOP | Also tagged | Comments closed

Using Constants in ColdFusion Components

In code we often need to make use of constant values. It is good practice to use named constants rather than literal values, but what is a good technique for managing constants in an object oriented ColdFusion application? One technique is to break your constants down into separate files that relate to their particular area. [...]
Posted in OOP | Also tagged , | Comments closed

What is Abstraction?

You are a person, but clearly you are much more than that. You are good looking and very intelligent and you have a wide range of outstanding skills. You may be great at cooking, an outstanding pianist and perhaps one of the best parents in the world. However, if I were to interview you for [...]
Posted in OOP | Also tagged | Comments closed

Object Oriented Pagination in ColdFusion

There are various ways to perform pagination in ColdFusion, but I thought I would offer a few additional thoughts to the subject, including an object oriented approach to handling the results. Getting the data The first step is in getting the data. There seem to be many solutions to this, but the approach I will [...]
Posted in OOP | Also tagged | Comments closed

Object Oriented Form Handling

This entry discusses a strategy for handling web forms using object oriented techniques, in particular; how to handle the creation of new data, editing existing data, validating the fields and saving it to a database. An example form Let’s assume that we have a form that captures data that ultimately needs to be saved in [...]
Posted in OOP | Also tagged | Comments closed