CounterMarch Systems

twitter ate my post


We used to blog more before twitter came along.

Mach-II is (still) awesome

Mach-II rocks. It is one of the more "mature" surviving ColdFusion application frameworks, and as such doesn't get nearly the amount of buzz that the new (interesting, different, creative, awesome-in-their-own-way) frameworks get. If you're looking at frameworks, I encourage you to take a look at the amazingly capable Mach-II - we've had fantastic success with it!

Things I really, really like about Mach-II:

Backwards compatibility

Take an old (Mach-II 1.1 app, circa 2006) and update the framework to 1.8 (released 2009). Replace the application.cfm file with application.cfc, comment out everything in index.cfm and *boom*...you're done. I can't really assess how challenging it is for the team to maintain backwards compatibility, but I sure do appreciate how simple it is to upgrade. Instant feature add with zero headaches.

Coldspring integration

<include file="./mach-ii_coldspringProperty.xml" />

and in your listeners:

<cfcomponent name="mpListener" extends="MachII.framework.Listener"

depends="howConfigManager,mpManager,reportManager,notificationManager">

I don't think it gets much easier than that. Instant Coldspring integration for dependency injection (and more), radically simplifying the configuration of all of my listener and model cfcs. Now we've got all the power of Coldspring cleanly available to our Mach-II application.

Faster Fixes

Knowing where to find things is one of the hallmarks of any good framework. Some do it by convention, some by configuration. Mach-II falls into the latter camp but that's perfectly fine by me. Getting back into the mental model of an application months (or years) after deployment is a challenge but by simply cracking open mach-ii.xml I can see what happens where within seconds and bend it to my will. I love this.

Modularity

This wasn't in the framework back in the 1.0 and 1.1 days (when we created some mammoth apps), but by 1.5 (which came out in 2008) the ability to break up large Mach-II applications into separate modules was baked in and oh-so-handy. It's two years later and we've been able to make the easy changes to break those older apps into a collection of modularized sub-apps for much easier maintenance. Perfect example is an extranet: lots of only slightly related apps put under one common umbrella sharing security or UI components. This is easy to implement and support in a well-designed Mach-II application. All of our more recent apps make use of this feature.

The Team

The people who created and have since improved and evolved Mach-II are some of the smartest folks who are or have been involved in the ColdFusion community. Look at this list. Not only have they created something awesome, but they're incredibly responsive on the wiki, development Google group, and framework users Google group. They use this framework at their day jobs so you know that each release has been painstakingly designed, implemented, tested, re-tested, piloted and then released. Plus, they're open to new ideas (even if you personally have no idea how to make them happen!). Code is great, but the people are the best.

The View Loader

This is where some of those "convention-based" concepts have crept in to Mach-II much to the benefit of the users. Back in the "bad old days" your mach-ii.xml file would contain a block that looked sorta like this, except far longer:

<page-views>
      <page-view name="showWelcome"       page="views/showWelcome.cfm" />
      <page-view name="showHome"       page="views/home.cfm" />
      <page-view name="baseTemplate"       page="views/baseTemplate2010.cfm" />
      <page-view name="blankTemplate"    page="views/blankTemplate.cfm" />
      <page-view name="welcomeLanding"    page="views/welcome_landing.cfm" />
      <page-view name="showSendPassword"    page="views/showSendPassword.cfm" />
      <page-view name="showAppHelp"       page="views/showAppHelp.cfm" />
   (and so on)

Each page would have a page-view defined. Someone called shenanigans on it and now we have the PatternViewLoader to replace ALL of it!

<page-views>
   <!-- This would load all views with the pattern of "/views/**/*.cfm" which is the most basic and common pattern -->
<view-loader type="MachII.framework.viewLoaders.PatternViewLoader" />
</page-views>

So, so simple. Love this line of the config file more than any other.

Better apps, faster.

Take Mach-II off the shelf and use it as your "glue." Add Coldspring to manage your model. Use ColdFusion 9's new Hibernate ORM capabilities to cut the lines of code in your model by a huge factor. Redirect some of the saved time into building a better UI using jQuery, improving your cross-browser capabilities with clean CSS and making your client happier by communicating more frequently. Result: a better app, designed to be maintainable and much more in line with your client's spoken and unspoken expectations. How could any craftsman not feel good about that? Mach-II is a key component to that successful formula for us.

Try Mach-II. Need help? Talk to the team on the list. Build great things.

Mach-II 1.5 session

I sat in on Peter Farrell's Mach-II 1.5 presentation yesterday and it was TOTALLY worth my time!

I'll save myself a ton of typing and use a link instead:

Dave Shuck's recap of the Mach-II 1.5 preso

We'll be looking at it this week for sure - our app architecture could be much cleaner if we use these new features when it's out for real!

Reunion Admin System

What good is talking about a system if you can't see all of it?

Figured I'd post some screenshots for your browsing enjoyment...

Questions? Comments? Want to see more? Say so!

New Farcry Site: Lehigh Reunion

We launched a new Farcry site this week!

Lehigh Reunion - Linked by Tradition

All of the front end content is managed by Farcry. Once again. we were able to train the content editors in about 15 minutes and they've been happily tweaking and changing stuff ever since. The "News" item is a big help to them - using the categorization features of Farcry. they are able to target specific news articles to an individual class page. the home page. or dump it in the general pool of news items. It's working great...now if only we had more content! One more shout out to the guys at Daemon for building a simple. powerful CMS with GREAT reporting tools!!

The registration system (go ahead..take a few steps in to it) is a separate Mach-ii application with a friendly dose of cfAjax baked in for user-friendliness. There are simply too many events involved in reunion weekend to present just one big list (even broken down by day). so we decided to apply tags to the individual events. The tags are created to classify the event's nature as well as the reunion class(es) it applies to. Naturally. we default the selection of events to correspond to the class year(s) of the registrant and any guests.

The back end management is done through our intranet infrastructure (also all Mach-ii) using another hefty dose of cfAJAX. I might have mentioned our event management system before. but this is the third generation of that codebase and it supports more options than ever before - discounts (apparently nobody pays face value anymore). more flexible activity options (so everybody gets the right size t-shirt). and multiple payment options. We also bulked up the reporting interface quite a bit.

We're happy with it - the client is now hosting ALL of their reunion and event websites in-house. Our traditional sample Farcry site (the Young Alumni Reunion one) will move into this new reunion framework in time for a July launch as well. Training cost drops just about as close to zero as it can be! Score one for the programmers.

Learning Mach-ii

We use Mach-ii (almost) exclusively as our app development framework of choice here. If you're thinking of learning Mach. you might want to tune in to the upcoming series on cfsilence.com. I don't even know who this is. but in any case it should be a very educational read - he's even looking at trying out a code generator to speed up the process somewhat.

Also a good pointer for anyone learning OOP techniques in a ColdFusion context - this post is a great overview of some of the more common terms used in OOP texts. Should save a lot of time when spinning up!

Athletics Recruitment System

Matt and I just spent all day working on the one piece of our latest project we were both dreading: the middleware to port the old database over to the new one.

The old DB was an evolutionary system. Four years of adjustments. new features. and changes really had left the thing in baaaaad shape. Naturally. we did a "clean sheet" approach to the new DB but while it was being designed kept an eye towards data porting.

It took 8 hours. but we figured out what we had to do. ran numbers on the current database so we knew what to expect. then built out a simple component-based system for doing the data transfer. Since we're not going live on Monday. we needed to make sure our work today would be repeatable in two weeks when we do it again. All i can say is "yaaaay inheritance and method overriding".

26 different sports. each bastardizing different fields in the source database. It's kinda icky in there! The new structure is much more accomodating and that makes them happy. In turn. we're happy that they are happy. The data porting step is now all coded up and tested. so that'll just take an hour at most to run when we cut over. Such a relief.

Anyway...technically. here's a system overview of the whole project if you're interested:

In two weeks we'll be going live with RecruitWeb. It's (obviously) web based. SQL Server on the back end with ColdFusion 7 doing the heavy lifting. Mach-ii architecture and a front end that uses a hefty dose of Ajax (all piped through Mach. which I'll be showing at CFUNITED). The Ajax stuff all uses cfAjax for the time being. but we could just as easily swap that out too. Front end is all XHTML/CSS so it should be easily skinnable for the next client who wants to buy it and implement at their college or university.

By late June (hopefully also in time for CFUNITED) we should also have a Palm interface for the system working too. Coaches currently travel with stacks of paper and that's just not cool. They've all been provided with Treos. so now we just have to figure out how to get data to/from them.

This is the cool part: For the Palm client we'll be using AppForge to build a UI in C# and deploy on their Palm runtime. storing data in a Palm database. We'll use their Crossfire conduit to get the recruit data back to a PDB file on the local machine at sync time. When the user syncs up the Palm. we're going to fire off a Windows C# app that calls a set of secured web services. These requests go to our ColdFusion back end (crazy simple web services!) to push/pull recruit data to/from out of the main database. Naturally. security and data protection are vital (HIPPA. FERPA to name two reasons).

Since the whole thing is web service based. the coaches will have access to the synchronization tool from anywhere they have a laptop and a connection to the web. Once wireless service becomes commonplace (and accessible in packed gymnasiums and the middle of corn fields in Nebraska). we'll have a PDA-sized browser interface talking to the system too.

Contrast that with the Access front end to a SQL Server DB that they use now. and it's quite a step forward. It's been a fun project and I can't wait to show it off!

CFUG Meeting

Have to do a full writeup later. but we did have a great discussion tonight. Thanks again to Brookwood Media Arts for hosting us well after their office was officially closed for the day!

I led off with some cool coder-oriented features in Dreamweaver 8. That morphed into a discussion on code environments. so I showed off CFEclipse and the Flex AlphaBits. The group seemed to appreciate seeing them all together and just about everyone contributed their thoughts and current config.

Matt then did a great presentation on CFAJAX. Did a nice walkthrough of what it takes to do a full request/response cycle without a page reload and explained some of the weirdness/limitations of CFAJAX.

This spawned an excellent discussion on security. when to use and when not to use Ajax techniques. and some minimal coverage of frameworks. That pretty much filled our 2 hours together!

Everybody seemed to enjoy the meeting so i'm looking forward to a presentation on Coldspring from Chris Scott. a Philly local and clearly a bright guy at an upcoming meeting.

I'll be putting together a better writeup soon. Matt's also going to package up all the CFAJAX work he's done along with good and useful documentation and drop it out on our site for all to reference.

g'night. all. 'specially you guys out at MAX!

ColdFusion and Flash to Flex

To anyone who's been reading this blog for a while. you won't be too surprised to hear my enthusiasm for Flex.

But look at this lineup:

Flex 2. Flex Builder (Zorn) built on Eclipse. Flash Player 8.5. ActionScript 3.0.

How hot is that?

I was fortunate enough to be in on the first Flex beta. Due to some changes in my company at the time. I was unable to continue working with it. But I did see the potential of the platform and kept my eyes open for an opportunity to use it.

Just about a month ago we realized one of our projects could really benefit from a rich dashboard for status and reporting capabilities. We mocked up an HTML version and immediately got clearance to start working on the "next generation" UI for the tool. Not too much later we learned about Flex 2...so guess which platform we'll be using?

We're so excited that we don't want to wait another day to get started on the project. The client is chomping at the bit to get the app up and running too. Alpha bits are on my laptop as of tonight :-)

Beyond that. i've done rich internet apps with Flash in both AS1 and AS2. The changes that i've noted so far regarding AS3 look like a really great movement towards "cleaning up" the language and making it somewhat more approachable (and comprehensible) by us server-side geeks.

We've got a LOT of learning to do!

I'm excited...REALLY excited...because i've seen what Ajax can do. i've seen what Flash can do and i've seen what Flex can do.

* Ajax: works well. gets a lot of press. Our biggest problems with this is the "dual controller" issue. We have our Mach-ii app framework for CF app flow and a completely different one tied to the client interaction in Javascript. It's "yuck" and we need to find a cleaner solution.

* Flash: I can't tell you how much I hate the timeline and movie clips and all that "design" stuff. I have seen some AWESOME RIAs done in Flash. but i'll be damned if I have a good way of getting started without making a mess of the .fla. I could go and do a cheesy CF application in much less time simply because I don't need to know a darn thing outside of my application. Doing Flash RIAs is a PITA because of the knowledge outside of AS (and about design/layout) that you have to have.

* Flex: Frameworks constantly evolving. in use right from the very beginning. A programming model aimed at clean separation of sexy and slick presentation from a SOA backend. Tag based - i get it! ActionScript 3 - an ECMAScript compliant langage - I can figure it out. Oh. and I can develop for it in Eclipse? Woo hoo!

So yeah. if you think i've had too much kool-aid. you may be right. We have spent a LOT of time as a company developing our proficiencies as software engineers. devouring as much as we can about software architecture and frameworks and design patterns. We have coding standards. We do peer review. And because of this effort. we can immediately see how Flex gives us the "pretty face" to put on our bulldog-tough back ends.

We're excited. I'm excited. You should be too!

MDCFUG Presentation

*realizes he hasn't blogged in a while*

Tonight I'll be speaking at the Maryland CFUG on Mach-ii. Looking forward to it!

OOP and Productivity

Spent all day working on the core functionality for a new application we're supposed to start testing in a couple weeks. You know. that grunt work that involves a lot of form creation. form layout. data validation. CFC creation. sql creation. manager->dao->manager->view stuff. Unit testing. Lots of unit testing. Fairly boring work all in all. Someday i'm going to crack and start writing some codegen plugins for Eclipse that generate at least a little bit of this stuff for me!

But then you get to write that "doEverything()" method that FINALLY calls on all those "lower level" methods in the CFCs you've created in a perfect little logical sequence. The data flows from one to the next without error. You realize that in 5 method calls you've managed to touch all of your work for the day. and it works.

And for a Friday afternoon. that ain't bad!

More Entries

About the blog

Celebrating our 5th year!

CounterMarch Systems is a professional consulting firm specializing in Adobe technologies with a special focus on higher education.

2771 Red Oak Circle
Bethlehem, Pennsylvania 18017
610.280.3455
Contact Us