To Type or Not to Type - The Big Question

Newbie Cafe

I thought i'd follow up on the post about polymorphism with a more down to earth post about typing in ColdFusion, because 90% of that post turned out to be about typing anyway. And believe it or not, there's still more to say on the topic.

Once you get to know your way around a little, one of the most confusing things for a CF developer who is new to OO is whether or not to explicitly type your arguments and return types, and indeed, how to deal with problems that arise if you do. Because when problems arise, you start to think "Why am i explicitly typing these CFCs? What good is it?" - and the To Type or Not to Type question is revisited again.

[More]

The Mystery of Polymorphism

Newbie Cafe

I started my long, bumpy journey into OO land sometime back in 2003. I read a few really good introductory books back then about object orientation, recommended by various people on the lists.

Here's what i read at that time:

1) Discovering CFCs - Hal Helms, Ben Edwards
2) Design Patterns Explained - Alan Shalloway, James Trott
3) The Object Primer - Scott Ambler
4) Object Technology - David Taylor

Now you might want a quick review of those books, so here goes.

[More]

CFC's and Object Orientation

Newbie Cafe

I've always wanted to write something up about CFC's and Object Orientation from a newbie's perspective. I learned ColdFusion on my own using books and mailing lists and forums, coming into it from having learned HTML and CSS on my own. So i've never had any formal training in programming.

I suppose a lot of people have learned CF that way. I also work alone, so i don't get the opportunity to rub shoulders with people more experienced than i am too often.

When CFC's first came out in CFMX6, i resolved that i would learn OO, largely influenced by Hal Helms. I bought a bunch of introductory books, studied them carefully, read everything i could online, downloaded MachII once it became available and got utterly lost. While i understood the theory of OO fairly well from the get-go, i had no idea AT ALL how to implement it in practice. It was downright embarrassing - ok ... humiliating.

[More]

The Mystery of AutoWiring in Model-Glue Unity

I've been playing with Model-Glue Unity on and off over the past few months, and i thought i'd start a blog to help me learn. Maybe i can help a few others learn something too.

One of the things that seems to stump people trying to learn MG is the autowiring feature. Many people might not even know it exists, because it's not very clearly explained in the documentation as of yet. To use autowiring, you need to mess a little with ColdSpring. ColdSpring calls everything by a different name, so that makes it seem kind of foreign in the beginning. A CFC is called a bean, a struct is called a map, an array is called a list, and so on. But once you translate the terms used and get to know your way around a little, it suddenly can seem very easy to use.

Simply put, autowiring is a very handy way to inject instantiated CFC's into your controllers using ColdSpring.

[More]

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