Uncategorized
OO Design of My Blog
Let’s start this by reminding the reason I am implementing the blog using OO Design, is much for the learning of the pitfalls and challenges in doing such.
For a much more indepth idea about learning OO in cf I recomend you read some of the articles written by Hal Helms.
Ok so lets just jump into this. In this blog there are 3 main types of objects we need to keep track of. These are entries, categories, and comments. Any one of these objects knows about itsself. It knows about its properties, and has some methods(functions) that allow us access to those to set and retrieve information.
Ok, well by them selves these objects dont do us alot of good. So we need to design an interface to access them. Ray’s existing blog does a really good job of setting up an interface. We already have methods to access all of the information that is relavent to our application. So we will use his blog.cfc as a API to our data model. This will allow me to re implement the cfc’s in the back end without having to make any more modifications to seans fusebox code.
So lets take a second to reflect on the other types of information we need to access. All our objects will need to be persisted. Mainly this well include storing our data in a database. We also need to be able to retrieve information from the database, both as single entities, and as groups of records.
So that will be the topic of my next post on building the OO model of this blog.
29 Nov 2004 Simeon

I’m not totally sure but I think Sean Corfield did some work on making Ray’s blog more OO. You might check his site for some info on this.
There’s two parts to Ray’s BlogCFC app - the back end which is "pure OO" and the front end which is… well… somewhat ad hoc CFML code. I replaced the front end with a Fusebox 4.1 skin but didn’t touch the back end.
Ray’s blog uses one cfc and has all the support for the application wrapped up in that one file.
I prefer to set up a model where objects have specific purposes, and implement versions of them specific to a particular database. That way I can work on any one db platform and not have to worry about bugering up another. No conditional logic in the queries and such.
But I plan to post more about that tonight.
Well there you go, my bad. I had thought Sean had modified the back end as well as the front. Since he didn’t, then code away! I was just trying to save you some work if possible.