Saturday, June 14, 2008

Polyglot Programming and CFML Developers

For those that do not know what Polyglot Programming is allow me to introduce you to the term! It really sounds fancy but when it comes right down to it Polyglot Programming is the utilization of multiple languages to complete a task. We all are more or less polyglot programmers; using CFML, ECMAScript (Javascript or Actionscript), CSS, HTML, and (some of us) Flex/Flash. So for this discussion we'll refine Polyglot Programming down to using multiple server side languages to accomplish a task (as this is the really discussion going on most of the time these days). I think ever since CFML was available on the Java platform many of us began to be partial polyglots (I know this literally would mean we are each programs written in multiple languages but I'm going to use it to describe ourselves instead). As a point of reference one of my first projects I worked on with ColdFusion MX I used Java to zip content. The reason I say partial polyglots is I didn't really write Java I just used CFML to execute a couple of Java objects. Looking beyond a CFML developer barely learning enough Java to dip down into the Java layer, what is the typical growth path of a CFML developer?

CFML is such a high level language the only level above CFML right now would be frameworks, or a custom DSL. I get the feeling that frameworks is where the average CFML developer interested in growing spends his/her time, learning frameworks. This is a good practice as one can learn a great deal from frameworks, not to mention the benefit of using frameworks in many instances. The problem I see here is the average CFML developer is not learning CFML's foundational language, Java*, and not really wandering that far from their comfort zone. Sure frameworks might force you to learn a new technique or push you into a new paradigm but you are still working in CFML. ColdFusion has done a spectacular job hiding the java underpinning behind a curtain. While that lowers the barrier to entry, which is a good thing to grow a community, I think it is a shame too. A CFML developer can blissfully develop code without ever understanding how it is their application works. On one side that's exactly what one would want to look for in a platform. From another perspective, when it comes to developer growth and incentive to grow, this may not be the best thing. Where is the incentive to learn how a war is deployed to a app server? How many CFML developers know what a context root is or how it might affect their application if the context root is not /. I am going to guess the average CFML developer may not even be familiar with what a many of the terms I just talked about are, and even the terms that sound familiar many may not truly understand how they fit together. Without dipping a little further into Java the typical CFML developer can not realize the true power of polyglot programming that can be leveraged on the Java platform. A superb example of someone that has found, for him, a great balance of polyglot programming is Andy Powell. His presentation at cf.O outlined how his projects leveraged Java (with Hibernate and Spring) and CFML. At Kroger we use Spring Security in all of our [new] CFML application as well as an ever growing library of Java classes that allow us to share IP with the Java side of the house. Another good example of polyglot programming, with an added bonus of a lower barrier to entry, would be cf_groovy, Barney Boisvert's project. I've not had the time to look into much yet but the few blog entries Barney has posted have been fascinating. If you are interested in learning more about Java and the JEE environment that most CFML engines run in but don't know where to start leave a comment/question. Let me know if you will be at cfUnited. If there is enough interest I will setup a late night pow-wow in the Lafayette room to introduce folks to Java/JEE.

* maybe .Net for those on BD.Net

1 comment:

Andy Powell said...

Thanks for the mention. This is probably the first time I've been called a name that isn't offensive by someone in the CFML Community.