ColdFusion vs Flash (the conclusion)

I finally finished both the Flash version and the ColdFusion version of the Community Resource Directory, and both are running and in use internally. I learned a lot, especially about Flash MX 2004, and I had a lot of fun building both interfaces.

I thought I would come out of this feeling like one approach was better than the other, however I really don’t have a sense of one being superior in any way. Neither was faster or easier to build (well, maybe the ColdFusion version was a little faster because I had to update my knowledge of Flash and ActionScript, but that was one-time “cost”). And I also don’t feel like either one provides a hugely superior experience over the other. Both clearly have their advantages and disadvantages, which I try to summarize below:

  • I definitely like the immediacy and interactivity of the Flash interface. Different pieces of the application update themselves in realtime based on events fired from other parts of the application. For instance, the Flash interface consists of a data grid containing community resources. You can select one, then open up a details and/or an edit window which corresponds to the selected record. If you select a new row underneath the details and edit windows, both windows will immediately update themselves with data from the newly selected row. If you edit the record in the edit window, both the details window and the data grid will immediately update themselves. This makes the Flash version slightly more efficient to use since you’re constantly loading very small sets of data so that you always have exactly what you need when you need it as opposed to having to refresh large amounts of data at less frequent intervals.
  • I love not worrying about browser compatibility. When I was writing the CF/HTML version, I did some cool CSS effects which relied on the static positioning of elements. It worked fine on Safari and Mozilla, but fell apart on the Windows version of IE simple because the developers of IE chose to ignore the static attribute. We’ve all been dealing with these kinds of issue for many years now, and I don’t feel like it’s getting any better. The issues change over time as browsers evolve, but they never go away. Developing in Flash was great because all I had to worry about was whether people had the plugin or not.
  • Although Flex is amazing technology, there is something to be said for being able to design your interface by dragging and dropping UI elements, which is an advantage Flash has over the HTML world. Yes, you can use WYSIWYG HTML tools, but with Flash, what you see is really what you get in any browser on any platform. This is by no means a limitation of WYSIWYG tools like Dreamweaver — it’s just the nature of HTML web development.
  • Although Flash makes it very easy to display record sets in many different components — allowing you to map data as opposed to having to loop through record sets — I also really like how large amounts of data sets end up being rendered in HTML. It’s fast, and you can display thousands of records before size really becomes an issue (especially with internal applications), and your tables can easily span the width of the browser, giving your user plenty of room to work with. Using CSS for all your styles and layout, and tables for your actual tables (as opposed to using tables for your layout) allows your pages to be small, well organized and functional.
  • Although I like how well designed HTML tables are rendered in browsers, it’s a pain to implement sorting manually. One of the biggest advantages of using Flash and the data grid is that sorting (and column resizing — almost impossible in HTML) is built right in. Although if you are accustomed to building reporting type applications in CF, sorting usually doesn’t take much time to implement, you still can’t beat having it built right in.
  • I also really enjoyed having all the different UI widgets that come with Flash. I can’t believe that I’m still using the exact same form elements to build HTML applications now that I used five years ago. There hasn’t been a single form element added to the HTML specification since I started doing web development many years ago! All you have are text fields, text areas, password fields, check boxes, radio buttons, select lists, buttons and file fields. Although you can obviously do quite a lot with these, I love having things like numeric steppers, calendars, editable combo boxes, menus, etc.
  • Customizing a specific column in a Flash data grid is not overly easy. You have to use a custom cell renderer, which seemed like a lot of work just to get a movie clip to display in a cell rather than a piece of data. On the other hand, it just seems like a lot of work compared to the almost no work that goes into rendering just plain data. It seems easier to customize table cells in HTML/CF (for instance, to drop a little icon in a cell rather than just a number or a string), however that’s probably only because you are already going to all the trouble of iterating through your record set manually anyway. It all probably comes out even in the end.
  • As limited as HTML inputs are, they do provide a way to upload files which is conspicuously missing from Flash. It’s not something I need often, but when you do need it, it’s hard to get around.
  • I found the development process itself (the process of changing code and viewing the results) slightly more streamlined with ColdFusion since with CFMX 6.1, changes are compiled and visible almost immediately whereas with Flash, you have a somewhat lengthy compile process. On the other hand, there is generally less guesswork and experimentation with Flash in terms of layout, etc., so in the end, it probably all balances out.
  • Both make great use of web services, however I discovered that you cannot send an array as a property of a complex type from Flash which was a problem. I had to re-factor some code to use lists rather than arrays, which felt a bit like a hack, but wasn’t the end of the world. Anyway, I believe it’s a bug in Flash, but that is still being determined.
  • Since I’m not a designer, I found that it was easier to get the Flash interface to look decent than it was the HTML version. Although since I used all CSS for the HTML version, a designer could probably just make a few tweaks to my CSS file and make the whole app look much better, the Flash version looks great right from the start without having to do any design at all. Thank god for Halo.

So I guess what it comes down to is analyzing your requirements and making an informed decision from there. Both Flash and ColdFusion are great for building web applications, so let your requirements and resources determine which one you pick. In the meantime, I’m going to check out Central and see what advantages it offers!