OOP state of mind In the land of CFML
A little background on me before I get into which may turn out to be a heated discussion but that's how we learn. I started out doing basic html web sites like most of you. I then found myself in a 2 year technical college learning a variety of languages such as Basic,C,C++ & Java. Now I truly never became skilled in all languages it prepared me for the future. I then started programming using ColdFusion and even to this day people say that does not classify me as a "real" programmer. I would of course disagree with you and say that language aside the very ideas of programming can be used across every language out there.
Now that we got that out of the way we can talk a little about Object Oriented Programming. I started picking up Action Script 3 about a year ago and absolutely love the language. While I am a ColdFusion addict (cfaddict) I am really loving the full OO structure of AS3. ColdFusion 8 is not a full OO language but it clearly exceeds it predecessors in giving you more ways to think OO.
Thinking in Object Oriented terms is really what I want to embed in your mind. When people hear the term OO they start thinking of all these complex design patterns and in the ColdFusion world developers start thinking of Beans,DAOs and Gateways. I am here to tell you that I am by no means an expert on the subject but I have learned a lot on the subject over the last year or so. There are some great minds in the community that really know what they are talking about and I encourage you to listen to what they have to offer. Here is a short but not complete list of blogger's that I believe you should be following. EDIT (There are many people you should be following not on this list, this is just a few off the top of my head who talk a lot about OO in CFML.)
So back to the discussion at hand, I know this may shock some people or even confuse others but here goes. Object Oriented Programming does not mean you have to use a design pattern. There, I said it and feel glad I got that out. Design patterns have become very popular because very smart people found solutions to complex problem. Am I saying you don't need them, of course not. They exist and continue to live on for a reason, they work! I just want to drill the idea that if you here a ColdFusion developer say he is an top notch OO programmer just because he knows how to write a DAO or Value Object that he is not exactly correct.
Ok, your with me so far and now your asking yourself well what exactly is OO. Hal Helms who is not only a brilliant person he also happens to be one of my favorite speakers. Hal stresses the point that you need to stop thinking about databases when we think about Object Oriented Programming. This is the first thing we need to do when coming up with a model.
Object-oriented programming (OOP) is a programming paradigm that uses "objects" and their interactions to design applications and computer programs. This very line is where OOP starts and backed up by a number of fundamental concepts. These concepts are all things we have heard before such as Inheritance, Objects, Classes, Abstraction, Polymorphism, Encapsulation, Decoupling, methods and properties. You will notice that no where in that statement is the word database. Before we can even begin to cross the train tracks to the other side we really need to start pounding that issue into our heads.t
I hope to start posting a lot more on this subject in the near future. I know you probably did not learn anything from this article but I just wanted to vent for a second and also post this a forum for others to chime in. Please remember I claim to be a programmer in a cubicle and nothing more. I learn just the way you do and listen closely (but think on my own) to what the smart people above preach!
