I am in the process of doing maintenance on a Large Mach-II application written against the Mach-II 1.1.1 framework.
Since the Mach-II team has been so busy upgrading and adding new features, I decided the upgrade was compelling enough and I would work through any incompatibilities or backwards compatibility bugs. To my delight, I haven't found a single issue with the upgrade.
The application in question was written by developers who didn't have a lot of Mach-II experience so I am sure there are plenty of ways to optimize the application. Especially to take advantage of the Includes and Modules features. After all, the Mach-II.xml file is over 2600 lines. Peter Bell would roll over in his grave!
Also, while I do the necessary maintenance, I am going to roll ColdSpring into the application. The current Home Grown DI factory doesn't have quite the feature set of ColdSpring. I'll post any oddities relating to ColdSpringing the application as well
For more information regarding Mach-II 1.5 have a read at Dave Shuck's Blog about some of the new features.
While helping a user on IRC, (dalnet #ColdFusion) I was looking for the Var Scope Checker. In my hunt to find the darned thing, I saw in the comments of Matt Woodward's blog that Seth Petry-Johnson is planning on updating the Var Scope Checker.
If you aren't familiar with the var scope checker, it is a tool that scours your source code looking for unscoped variables. It is a reasonably intelligent tool in the current incarnation.
My only gripe with the tool is it isn't savvy in cfscript blocks. This is apparently set to change this weekend. Keep an eye on Seth's blog for the update.
If you are reading this and are a ColdFusion programmer and have no idea why you need this tool, please have a read at the following:
Seth, if you read this, please consider placing the tool on RIA forge. As it is now, I have to find your site, which throws an error, then walk down to the base directory.
Update: Mike Schierberl has another var scope checking tool found here. According to Mike, "I also developed a test case file that is useful for identifying cases that the tool should find. After installing varScopeChecker, I ran my testCaseCFC and it only found 16 of 24 unscoped variables.".
The test case is available here.
Please have a look at Mike's Var Scope tool.
The Transfer ORM list is well beyond 100 members. There are 117 members as of this posting. Since I was number 10, I feel especially proud!
If you use Transfer, or are interested in using Transfer ORM, join the group. It is definately a no-fluff list.
The most recent topic was a call for review on the new Compound Key Specification. So if you are on the list, you have the ability to help steer the project.
See you on the list
The LightWire presentation by Peter Bell has just finished. Great job by Peter explaining the inner workings of the frameworks, the benefits of his approach and some of his philosophies.
Also a great job to Nick for getting everything started on time, collating the questions, finishing on time and for being so quick with URLs during the show.
I find these presentations put on by Nick, Kola and the cfframeworks crew to be a boon for learning and for the community as a whole.
If you missed the presentation, good news! Watch the recorded version.
One of the proper jewels of ColdFusion is the dynamic nature of the language. There is nothing I love more than replacing tons of boilerplate code with a few lines of dynamic CF!
One language feature that could be improved is the ability to dynamically call a method on a component. I find CFInvoke a bit unwieldy, syntactically annoying, and in my humble opinion, unnecessary.
Take the following example:
<cfset WhichPreference = "Lunch" />
<cfset WhichStyle = "Heavy">
<cfinvoke component="UserPreferences" method="get#WhichPreference#" returnvariable="LunchForToday">
<cfinvokeargument name="Style" value="#WhichStyle#">
In the above example, we have a UserPreferences object, a variable for the specific class of preferences and an argument. The intent of the code is to run a method called 'getLunch' on the 'UserPreferences' component and pass 'Heavy' as an argument. (We don't want a simple salad today, boyos!)
We got the job done. Now let us look at a different approach:
<cfset WhichPreference = "Lunch" />
<cfset WhichStyle = "Heavy">
<cfset LunchForToday = UserPreferences['get' & WhichPreference](WhichStyle) />
This code does the exact same thing. The final statement sets LunchForToday equal to UserPreferences.getLunch("Heavy"). To me, this is a lot more intuitive than the cfinvoke method shown above. This code relies on the runtime evaluation of the method and the arguments. Since the 'getLunch' method exists and the call is made at runtime, this is a very logical and valid way to get the job done.
The only problem is it doesn't seem to work. Based on my testing and conversations with Important Folks, this is simply an error in the ColdFusion language parser. I've it on good authority that it has been filed as a bug with the ColdFusion team. I've added it to the Wishlist Wiki for Scorpio and now put it here on this blog.
Does this make sense? Would others find this useful?
Recently on the Dalnet #Mach-II IRC channel, a user asked about including resources in a mach-II.xml file. As you probably know, the MVC Framework, Mach-II, recently added an include feature. This is an excellent feature to help break up large XML file, which has been one of my previous annoyances with Mach-II. The way the new include feature works is inside an 'includes' tag define a resource to include.
< include file="/some/path/to/an.xml"/>
Note, the extra space I added in the xml tags. This is for BlogCFC formatting and your XML file should NOT look like that..
According to the documentation, the included resource MUST be a valid Mach-II.xml document. Which means a root <mach-ii version="1.5.0"> tag, an <event-handlers> tag around your event-handlers and all other details for a syntactically valid mach-II.xml file. Specifically, the user left out the <event-handlers> tag around the event-handler tags inside the include and received a terse error:
EventHandler for event 'do.something' in module '' is not defined.
Wrapping the event-handler tags with <event-handlers> sorted him right out.
P.S. I am impressed with the new functionality in Mach-II 1.5. Go Team Mach-II
The aggregators are filled with hundreds of posts extolling the virtues of CF.Objective. I wanted to live blog some of the sessions but I decided against it. Why? You may ask?
Initially, I didn't have wifi service and while Paul and Baz sorted that out, I just didn't want to divide my attention between the awesome content and correcting my terribly typed notes. There was too much to learn!
Even being a little sleep deprived, I didn't miss a single time slot. The content at this conference goes well beyond what can be found at such conferences as CFUnited and MAX and I highly recommend this conference for above average programmers.
Apart from the content, I met a lot of really cool people. Some I knew from their blog, some not, though we all had a really nice time. I hope to keep up the friendships from cf.objective. I wasn't so good at handing out my card so if we met at the conference and you would like my email address, just leave a comment and I'll send it right over.
A big THANK YOU to Jared, Steven and the crew for putting on a very well run conference. I wouldn't have changed a single detail.
Sometimes I read too fast. I remember reading a post on Scorpio by Sean Corfield. I just don't remember the part about the ColdFusion Ajax Wizards for Eclipse.
Here is the section of the post that caught my eye on the second reading:
Next up was what is proving to be my favorite: AJAX integration. Ben said that Scorpio's AJAX features fall broadly into three categories: making CFC invocation easy, controls & widgets, application wizards. The latter is an AJAX version of the Flex "super wizard" for Eclipse that can create a full AJAX data admin application directly from your RDS data source. Very impressive but, as with the Flex wizard, Windows only because it relies on the same visual query builder (that folks know and love from HomeSite).
I've used the Flex Wizards before. The wizards are very easy to use and will create non-trivial applications, from the server-side. Since they are the same wizards, I imagine throwing together an Ajax enabled application is going to be a piece of cake.
Apart from the mention on Sean Corfield's blog, I haven't seen or read any other news about this feature. If anyone has a link or some information, please post a comment.
I have everything ready for my trip to Minneapolis. I am looking forward to seeing everyone again. You can find me on the twitter channel and once I hit the ground in MN, I'll have the tweets directed to my phone.
Should be a great conference, if you happen to be there, stop over and say hi!
I read through the comments on Ben Forta's blog about CF and Exchange Integration. I spit coffee on my keyboard when I read this little series:
I have seen people with PHP make it work? Couldn't we just apply whatever concepts they use and translate it to coldfusion?
# Posted By Scott | 4/2/07 9:18 AM
you mean do it the hard way? Nah, wait until you see what we've been cooking up! ;-)
# Posted By Ben Forta | 4/2/07 2:26 PM