Object Oriented Purity vs. Reality
Posted on October 21, 2008 in Object Oriented Development
One of the issues I have dealt with in the past and continue to deal with with our object management system is the difference between object oriented purity and reality. For example, suppose that I have an Order object, or better yet, an Order Id. Now, my display requires that I show the Manufacturer details for a given Product that is contained in this Order.
In an ideal object oriented world, servers would have unlimited memory and never need a reboot, thus all of our objects and their data would live in memory. Therefore, when I need to do something like getOrder().getProduct().getManufacturer().getName(), there is no problem as all of the data is in memory.
Dynamic Programming and Metadata
Posted on October 06, 2008 in Dynamic Programming
In my last posting, the question was indirectly raised as to what I was talking about when I said "dynamic programming". With our approach, dynamic programming means taking a very generic set of constructs and then applying metadata to them to make them useful. For example, in our generic object management system, there is the concept of a "object" service layer and business object as well as a generic object data tier. By itself, all of this code is fairly useless.
Dynamic Programming
Posted on October 02, 2008 in Dynamic Programming
In a couple of previous postings, I have mentioned the generic object management system that we have been working on for a project. The initial version of the system is complete and in use now and while it came out well and serves its purpose, I still feel there was a lot more potential for it. Researching and developing it however has given me an opportunity to start putting into practice some of the concepts in dynamic programming that I have been reading for quite some time.
What is a DSL?
Posted on September 22, 2008 in ColdFusion, Object Oriented Development
Peter Bell has been talking about domain specific languages for some time now, but I expect they are still a pretty foreign concept to many people, myself included not too long ago. However, if you have used any of the popular ColdFusion frameworks like Model-Glue, Mach-II, ColdSpring, etc., then you have actually used a DSL in their XML configuration files.
MSSQL Driver Issue with CF 8.0.1
Posted on September 18, 2008 in ColdFusion
This is one of those cases where being on the leading edge of technology causes issues. I just got a new workstation that is running the 64-bit version of Windows Vista. I installed the 64-bit version of ColdFusion 8.0.1 with the latest hotfixes etc. and everything was going well. That is, until I tried setting up an MSSQL datasource. Apparently there is something wrong with the drivers that ship with CF 8.0.1 as I was not able to connect to a local MSSQL server or a remote MSSQL server. Any time I tried creating a new data source, JRun would crash.
IBO: A ColdFusion Design Pattern
Posted on September 09, 2008 in ColdFusion, Object Oriented Development
A design pattern is a template solution for how to address a common issue in object oriented development. So here is a problem. In an ideal object oriented system, you are dealing with a server that never goes down and has unlimited memory. Therefore, when your application has five thousand user accounts, you just have five thousand little user business objects floating around in memory waiting to be used. In reality this is not really practical.
So here is the dilemma – you want to stay true to object oriented practices and benefit from the use of business objects, but trying to create a business object for every user record in the database just to display a list of users is not really practical. At the very least, the current request will be very slow and at worst, if it is a common request, you could bring the server down trying to do that kind of object initialization and garbage collection.
Better Development Practices with ANT
Posted on October 08, 2007 in ANT
We are in the business of not only writing code, but developing and deploying enterprise class applications. Doing this properly involves a lot more than just writing ColdFusion, Flex, etc. code. When developing an application, we have distributed development environments, a testing/staging area, and a production/release area. We use Subversion for source control and a variety of other testing tools.
One of the problems that comes up with a situation like this is how do you get code out of Subversion, to the development environment, then to testing and production while maintaining the integrity of the application and all of its configuration?The answer I have always given other developers when asked this is something called ANT. However, I have never really used ANT myself and have never really explored under the covers to see what is really possible. The point of this posting and several more to come is to take you along on my journey into all that is Apache’s ANT.
Unit Testing Anybody?
Posted on July 30, 2007 in Unit Testing
So, here I am being the good developer and attempting to put together a series of unit tests for a project (the generic data validation engine is actually very close!). I have always appreciated the concept of unit testing and I have no problem doing it for simple little test cases. Where it always tends to get left by the road side is when I run into one of those more complex scenarios that does not fit the mold.
There was just such an occasion last week and I still have not found a way around it – at least one that I like. So, here is the scenario. I have an object whose init method accepts an optional path to an XML configuration file and if received, parses that configuration file into an internal data structure which is a fairly complex series of nested structures and arrays. All is well and good until I went to write a couple of unit tests for this …. I know I should have written them first, but at least they are being written!
Variables.Instance
Posted on June 22, 2007 in ColdFusion, Object Oriented Development
This week I was walking through some code in a code review and the question came up, why do I use the "extra" instance structure within my components. For example, in my init() function for every component, I have a line of code that looks like this:
<cfset
variables.instance = structNew() />Then, when I setup a new attribute for the component, I would store it in a variable like this:
<cfset
variables.instance.foo = "bar" />So, beyond personal habit, why do I do this?
What's the Difference?
Posted on May 11, 2007 in Object Oriented Development
In my last article, I listed a few of the benefits of object oriented development. It was justifiably pointed out that many of those same benefits could be applied to procedural development as well. So, I would like to take a moment and outline the real difference between Object Oriented development and Procedural development.
As a brief disclaimer, my intent and purpose here is not to say that object oriented development is the best and only way to write applications. Many developers have spent their entire development career writing procedural applications without any issue and there is no problem with that. My intent here is to shed some light on some of the basic concepts of object oriented development now that ColdFusion is trying to enter the land of object oriented development languages.







