OO Principles: Composition

I don't "do OO" development in ColdFusion. I'm starting with that statement not to spark another debate about whether to use OO in ColdFusion, but rather to clarify that while this post is about a principle of object oriented development, you don't need to "Do OO" in order to learn, use, and benefit from composition.

In the last "OO Principles" entry, I talked about encapsulating CFCs. The example that I use was the need to have a datasource in a component. It should be clear from that entry that you could pass in more methods as well.

[More]

Client Visible Unit Tests

We recently started working on a project that, while relatively small now, has the stated potential to grow into a rather large and complex system in the near future. On a few big projects that I have now, I have regretted not having used TDD on them from the beginning (having learned TDD only well after those projects were already under way).

This seemed a perfect opportunity to do now what I wished I had done earlier on those projects.

[More]

OO Principles: Encapsulating CFCs

I don't "do OO" development in ColdFusion. I'm starting with that statement not to spark another debate about whether to use OO in ColdFusion, but rather to clarify that while this post is about a principle of object oriented development, you don't need to "Do OO" in order to learn, use, and benefit from encapsulating CFCs.

When I first started using CFCs, I knew that encapsulation and decoupling were important, but this brought up new challenges. For example, if I had a method that queried a database, how would it know what datasource to use?

[More]

Filtering Undeclared Arguments

One thing I have wanted to do in ColdFusion for some time is to limit the arguments scope in a function to arguments I have declared with cfargument. That feature doesn't exist, but I made the next best thing.

[More]

OO? OI? Oy Vay!

Clark Valberg recently convinced Hal Helms, Brian Kotek and Ben Nadel to do a recording together discussing OO programming in ColdFusion.

The discussion reminded me of an NPR debate I listened to several months ago on whether we should bomb Iran to prevent them from acquiring nuclear weapons (unfortunately, I don't remember the specific wording of the question). The debate had three experts on either side of the question. All six seemed to agree that we would almost certainly never need to bomb Iran because so many better options exist but that we should remove the option from the table (just in case). From there it quickly moved to a semantics debate about the wording of the question on the table.

[More]

OO Principles: Separation of Concerns

I don't "do OO" development in ColdFusion. I'm starting with that statement not to spark another debate about whether to use OO in ColdFusion, but rather to clarify that while this post is about a principle of object oriented development, you don't need to "Do OO" in order to learn, use, and benefit from separation of concerns.

In order for separation of concerns to work, your code really needs to be well encapsulated first.

What

Separation of concerns dictates that different modules of code overlap in functionality as little as possible. For me, this means that I have .cfm templates for output and .cfc components for logic and data retrieval.

[More]

OO Principles: Encapsulation and Decoupling

I don't "do OO" development in ColdFusion. I'm starting with that statement not to spark another debate about whether to use OO in ColdFusion, but rather to clarify that while this post is about a principle of object oriented development, you don't need to "Do OO" in order to learn, use, and benefit from encapsulation and decoupling.

This will be the first in a few entries about how to take advantage of OO principles even if you aren't using OO.

[More]

sebtags 1.0 RC4 (security issue)

Pete Freitag recently pointed out a security issue with file uploads. This affected file uploads in cf_sebForm so this update addresses this issue. The update also has other tweeks and features, but no point in covering those until I have some real documentation (soon, I hope). Anyway, if you are using the sebtags custom tags set, upgrade now.

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.