Why should you go to conferences?

With all of the CFUnited buzz going on this week, I figured it made a nice segway to something I have been giving some thought to lately. That is the question of “why attend these ColdFusion [or insert your own technology here] conferences at all?”

For those of us that stay somewhat active in the community the answer is fairly obvious. It is a great opportunity to sit and chat with some of the people you may have worked with on projects, helped out sometime, or been helped by over the years. It is also a chance to see first hand some cutting edge products, projects, and methodolgies you may have read about but haven’t gotten the opportunity to work with. It is also a chance to get some face time with potential clients and such. These things are a given.

However, this blog post is more targeted to those that just come to the office, punch the clock, slop out some code, punch out and drive home to turn on the TV. For developers that blog or read this blog regularly, it is easy to forget that outside of our little myopic view of the ColdFusion world where everyone seems to be pushing limits and working on bleeding edge technology, there are tens of thousands of developers that are just like I described above. I have worked with some that simply view their programming as a “job” that is nothing more than a means to an end, with just a general apathy about their career. Not only have I worked with some, I used to be that guy! That said – and I know that what I am about to say will sound overdramatic – but I honestly mean it when I say to those developers:

Attending conferences can be life changing!

If you are a developer that fits the description above, I urge you to attend one of the big conferences such as CFUnited. Why? I will share my personal experience.

I am unfortunately not attending CFUnited this year, but have done so the previous 2 years. Before the conference in 2005, I was in a complete and utter programming slump and had been for a few years. I was just banging out sub-par code and punching the clock as I described above with no passion at all about what I was doing. I didn’t follow any blogs, email lists, etc., and was fairly oblivious as to what was going on in the ColdFusion world. In fact, I had been hanging around a .Net developer that almost had me convinced that ColdFusion was dead and I needed to get out while I could. I went to CFUnited that year because I thought it would be pretty fun to go to DC, and heck… my employer was paying for it, so why not?  What I returned home with was priceless.

In the Monday and Tuesday prior to the official conference kick off, I had the opportunity to take pre-conference classes. Day one was Hal Helms‘ “Domain Model” class followed by Joe Rinehart‘s “Forms and Beans” – I think that was the name anyway – on day 2. I had never seen OOP concepts before and was truly blown away. It was like a light switch turned on that Monday in Hal’s class as I saw what a big world there really was out there that I had been totally unaware of! In some respects, I almost felt like Neo when he began to see the Matrix, for lack of a better analogy. Suddenly I was exposed to all the exciting stuff happening in the ColdFusion community that had been hidden due to my self-imposed blinders. The second day Joe walked through converting a legacy application strewn with inline cfquery calls to one that used Bean/DAO/Gateway objects and I was so aware at how far the world had moved forward while I had been sitting still. With my head spinning from the pre-conference classes I eagerly went into the conference and was exposed to concept after concept that I had never seen before, many of which are now routine components/skills that I carry in my tool box.

When I got home I just wanted to spread the gospel about how bad ass ColdFusion is, and couldn’t wait to start my next project. This was about the time that Matt Woodward and Peter Farrell had taken over the Mach-II project and I began using Mach-II 1.10. It was an amazing contrast how much fun my career had just become. I was soaking up every blog and every podcast that I could and learning at a dramatic pace after sitting stagnant for so long. It was in these next few months that I teamed up with Aaron Lynch and we incorporated World Wild Web Systems Inc under which we built InstantSpot , where this and now about 550 other blogs reside! I am still as fired up about what I do for a living as I was when I returned home on July 3, 2005, and we are still steaming along with InstantSpot. Last year I took over as manager of the Dallas/Ft. Worth ColdFusion User Group, and I am now part of Team Mach-II. Looking back a few short years ago, that would have seemed like a laughable secnario.

I can truly say that attending CFUnited that year was a true turning point in my life. If you are one of those developers in the shadows that basically just gets by year after year with no joy in it, *you* are the ideal person to go to a conference. Hopefully I will see you there next time!

Mach-II 1.5 Beta 1 is released and new website!

Well… all of the blood, sweat, and tears from the developers of Team Mach-II has paid off, with  Peter, Kurt, and Matt going non-stop.  Tonight, Mach-II 1.5 Beta is officially released and available for download from the brand spanking new website!  Kyle Hays has done an absolutely spectacular job redesigning the project’s home and there is now a blog incorporated as well so that the team well be able better communicate news about the project to the ColdFusion community at large.

So, why all the hype about Mach-II 1.5?   Here is a list of the new features that are now available from the framework.

  • XML includes
    The Mach-II application is built around a common XML configuration file in which you can define Events, Filters, Plugins, Listeners and other components and specify how they work together to manage the flow of your application.  In larger Mach-II applications, it is common for config files grow to several thousand lines, making them more difficult to maintain.  With Mach-II 1.5, you can now break apart pieces of your main XML file into smaller XML documents and include them from the main configuration file using the new <include> tag.
  • Modules (sub / peer applications)
    Mach-II 1.5 ushers in a powerful new feature with the addition of Modules.  Modules are stand-alone reusable sub-applications that you can plug into parent Mach-II applications, which then share the application scope of the parent.  For example, if you have a common login application that you use throughout your application development, you can add that as a Module to an existing Mach-II application.  With this feature, developers can easily create and share Modules for other developers to add to their own applications.
  • Subroutines
    Subroutines can be though of as a resusable block of configuration XML that you can define and then execute at various points in your Mach-II configuration file.   If you have a series of listeners that are announced in multiple events, you may wish to create that series as a subroutine and include them where you need to with the new <execute/> tag in the configuration file.
  • <redirect/> command enhancements
    Until the release of Mach-II 1.5, the <redirect/> command has offered a way to perform a clientside redirect to a new URL by performing a <cflocation/> call under the covers.  Due to the redirect being a clientside request, one challenge that has existed was the inability to copy complex arguments to the new event.  With the new <redirect/> tag, you can add the attribute persist=”true” which copies the current event arguments to the target event.

    Additionally you can now define the status type of your redirect.  By default, ColdFusion’s <cflocation/> command does a 302 redirect (“moved temporary”).  With the new redirect functionality you can specify the status type that you wish to return to the browser.  For example you can set the statusType attribute to “Permanent”, “Temporary” and “PRG” for post-redirect-get.

  • Complex property datatypes
    The release of Mach-II 1.5 also brings with it the ability to define complex data types as properties in your Mach-II configuration file.  Until this release this was often managed through use of Plugins that existed only to set these properties.  With 1.5, you can now define Properties in your XML of types Array, Structure, and even ColdFusion Components (CFCs) with the use of the new Property.cfc.
  • URL management features
    New to Mach-II with the 1.5 release is the ability to bind and manage URL formatting within the framework.  With the new BuildUrl() and BuildUrlToModule() functions in the framework, the developer has the ability to format URLs in countless ways.  This means no more having to use custom code outside the framework to apply SES URLs to your application.

  • Bindable placeholder support
    Another feature that is part of the Mach-II 1.5 release is the ability to have bindable placeholders.  While Mach-II has long afforded the ability to define parameters to Plugins, Listeners, and Filters, the value had to be hardcoded in the XML which offered limited benefits.  With 1.5, you can now define bindable parameters that can be assigned at runtime.  For example a DSN parameter could be set like this:   <parameter name=”Dsn” value=”${MyDsn}” /> where “MyDsn” is a Mach-II property.
  • Other enhancements
    Numerous other enhancements have also been added such as a more detailed Trace Plugin, optional “reinit” attribute for event-beans, enhancements to how defaultEvents and exceptionEvents are handled.  Major performance enhancements have also been added in the initial loading of Mach-II applications, and several small bugs have been addressed.

With all these features it is important to note that none of these features came at the cost of backwards compatibility.  As of the time of this blog posting, there has not been a single report of 1.5 breaking older Mach-II applications, and several large applications have been running on the 1.5 for the past few months.

What are you still doing here?  Go download it now!

Have I told you how much I love Illudium PU-36 Code Generator?

In case you haven’t given a look at Brian Rinaldi’s Illudium PU-36, do yourself a favor and do so. Out of the box, using a nice Flex front end, it introspects your database and can build concrete CFCs for your data model. Where Illudium goes so much further than some other CFC generators I have used is that it not only builds nice Bean, DAO, and Gateway objects (Foo.cfc, FooDAO.cfc, FooGateway.cfc), but it also builds in a service layer by adding in a nice FooService.cfc with some very useful built-in functions for getting a handle on your data.

but wait… there’s more!

Even just the way that it builds the above so easily would be compelling enough to use this project, but it does much more. It creates configuration XML for ColdSpring, so that in about 30 seconds you can have a ready-to-go set of object CFCs that are already wired together using ColdSpring. Pretty awesome! That right there would make a great tool on its own beyond a shadow of a doubt.

this is getting ridiculous… even more!

Using Transfer ORM? illudium will generate your config XML for you, and even generate a decorator object to wrap around the bean. It is pretty amazing how fast you can put a Transfer data model together with it.

And the feature list just keeps on going. If you are working with Flex, it can create a Flex VO for you. It will also create a transfer object (TO).

One thing that Illudium does not do is manage data relationships, so there is no option for setting up hasMany/hasOne type relationships. After using ORMs heavily the past year and a half or so, I have gotten very spoiled by how easy it they make having child arrays/queries/iterators accessible through a bean… which brings us to the point that lead to this blog post tonight.

Illudium is so customizable!

I wanted to have a pattern throughout my data model where any object that has children objects has the following methods available (where “Bar” is the child object): Foo.getBarQuery(), Foo.getBarArray(), and Foo.getBarIterator() and a Foo.resetBar() to reload the child, and these children will be lazy loaded. When I started adding these to the generated CFCs I had to make some alterations to the generated Bean, Service and DAO objects. As we began using this pattern among our team we wanted to keep a consistent approach to these modifications to the generated CFCs. Not surprisingly, Illudium makes this super easy.

Within the Illudium code is a series of XSL files that serve as templates for how the code will be generated. Today, I modified it so that included with every Bean, Service, and DAO is commented code for creating “Foo” child object relationship.

Now I can generate a set of parent objects and generate a set of child objects. Then I do a replace on “Foo” in the code with the name of my child object and uncomment the example. Lastly I add a node for a ref bean of the child service in the parent service in my generated ColdSpring XML and that’s it.

Quite literally in about 2 minutes you can have objects related in this manor.

Big giant props to Brian for all his hard work on this project!

Back from paradise

Wow…. like splashing icy water on my face, my alarm clock went off at 5:00am this morning solidifying the fact that I was back from one of the most awesome and surreal weeks of my life. After being pampered and catered to as we hopped around the Caribbean, I am back at my desk. I will probably have to make at least one more blog entry about the trip after I post my pics and video so please bear with me, but I wanted to at least post that I was back.