Building ColdFusion services with ColdSpring and Reactor, part 1

Submitted by Falken on

We'd best start the real meat of this series of articles by explaining what we want to achieve, and defining a few key terms.
Later articles will discuss key parts in more detail.

The approach I outline builds a tiered service orientated ColdFusion architecture, A 'tiered' approach means we construct things by layering one set of CFCs atop another, with limited interfaces between layers. Layers may only call upon things at or beneath them.
Each layer should perform one task, and deeper layers should have less abstraction.

Why would we do this ?

Firstly we limit the complexity of any one part by limiting what it does and how it can do it. Less complex things have fewer bugs, are easier to write and easier to maintain.
Secondly we stop the business rules and workflows we are managing (clue to later articles there !) being tangled up in details of how they are being run or how to talk to the underlying database. This allows you to maintain a nice high level overview of what you are doing in what maybe some fairly complex business actions. For instance adding a user might been adding them to LDAP, several databases, and emailing various people.
Finally we split our code into layers of responsibility to provide localisation of control. This means that security is managed by the same CFC everywhere, so there is only one place to audit this code.

The next part of this series will discuss the top tier - the Service layer.

Previous part | Next part 

Sections