An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Entries for month: November 2008

Unit Testing Improves Your Love Life

November 25, 2008 ·

Oh, sorry, that was the title of the BACFUG presentation by Bill Shelton and Marc Esher (of MXUnit fame)! Unit testing has defined my working day. I've been working on the licensing subsystem of the next build of the Broadchoice Workspace today and because we practice Test-Driven Development (thanx Brian!), that means writing unit tests "first" or at least alongside the production code. I started by writing the License bean and an accompanying LicenseTest. The bean has a handful of properties and two methods. The unit test has nine test methods. Fairly confident that the bean was correct, I moved on to the data layer. Apart from encryption, this mostly follows our well-tested generic Hibernate DAO. That meant only a couple of unit tests. Once those tests passed, I moved on to the service layer. Six unit tests for four service methods. At this point I'm ready to write the remote service facade (which implements user-level security) but I'm fairly confident our licensing subsystem will work as expected. 623 lines of code, just over half of which is unit tests (327 lines to 296 production code). I'll probably add some more data layer unit tests since I have a couple of "untested" methods (they're used in the service layer tests). Unit tests may seem dull and tedious but they really can make your life easier.

Tags: broadchoice · tdd

Web Application Technology Preference

November 25, 2008 ·

I'm part of a LinkedIn network for IT Architects and one of them recently posed this question to the group:
What is your preference - .Net, PHP or Java ? I am coming across very open requirements when it comes to preferred web platforms. I welcome your input to see what are your preferences.
Some of the respondents had specific preferences, some talked about the pros and cons of each. Several pointed out that the requirements should drive technology choices, not preferences, and that considerations of the client's existing technology stack were important. A few mentioned Ruby or Ruby on Rails, and even Grails got one mention. Spot anything missing? Here's the response I posted to the IT Architects group:
A few people mentioned Ruby / Ruby on Rails as a potential technology for web applications. Groovy is also a strong contender for shops that lean toward Java. For the last seven years I've been involved with a lot of web projects that use Adobe's ColdFusion markup / scripting language. It compiles to Java bytecode and runs in any Servlet container - and therefore has very strong integration with Java. It also has a large library of built-in functionality tailored for the enterprise, such as PDF manipulation, JMS support, automatic SOAP web services support for components, integration with SMS and so on. It's also worth considering that these days the requirements placed on web applications are increasingly sophisticated and user interfaces need to support more than just simply data entry and table-based display. AJAX gets you part of the way there but it takes a lot of development time and it's hard to maintain cross-browser compatibility. Adobe has done a lot of work on the Flash Player over the years and their Flex tooling is quite remarkable with the XML-based "MXML" UI layout language and the ECMAScript-based "ActionScript" programming language. Whilst some may rail against a proprietary technology stack (although it doesn't appear to be an issue for people who prefer .NET / Microsoft), Adobe has also worked hard in the Open Source arena, donating the core of the Flash Player engine to the Mozilla project (as Tamarin) and providing the Flex 3 SDK as open source, as well as the server-side messaging engine BlazeDS which provides Flex's bridge to Java (or Groovy). The Adobe Integrated Runtime (AIR) allows you to take web applications to the desktop as well to provide occasionally connected online/offline capability. As others have noted, requirements are the key driver, along with any client considerations of existing technology or preference. I was just surprised that no one had mentioned the web tooling of one of the other largest software companies out there... Disclaimer: I was the senior architect for Macromedia's IT division for several years and remained with Adobe for a year after their acquisition of Macromedia so I am somewhat of an evangelist for their technologies (and just came back from their annual MAX conference in San Francisco where they showcased their current and future technology offerings).

Tags: coldfusion · flex

Scotch on the Road 2009

November 24, 2008 ·

Big Mad Kev has made it official: Scotch on the Rocks will hit the road in early June 2009! The plan is a day in London on June 1st focusing on CFML, a day in Edinburgh on June 3rd focusing on CFML and Flex and a day in Dublin on June 5th focusing on Flex and AIR. The tentative schedule allows for seven sessions, starting at a leisurely 10am (registration starts at 9:30am). The intent is to reduce your costs by having the conference come to a city near you instead of you having to travel and stay somewhere.

Tags: coldfusion · scotch09 · flex

Event-Driven Programming MAX Presentation

November 19, 2008 ·

The MAX 2008 version of my Event-Driven Programming in ColdFusion is now available for download (and I'll add it to the right column of my blog soon. This is a substantially different version of the talk seen at Scotch on the Rocks and CFUNITED...

Tags: adobemax08 · coldfusion · flex

Adobe Alchemy

November 18, 2008 ·

There's a lot of C / C++ code out there that does a lot of useful stuff - masses of tried and true, well-tested and often well-supported open source software. Now you can take any of that code and automatically convert it to compiled ActionScript code that will run on Flash Player 10. Check out Adobe Alchemy on Labs. This was demoed in the general session today at MAX. They initially showed a few libraries (such as OpenSSL) compiled to run on the Flash Player, then they showed image manipulation and audio playback (Ogg Vorbis) running in the Flash Player. Finally they showed Quake(!) and a 6502 console emulator running Super Mario... Whilst it elicited a bit of a "huh?" from many attendees, I think this is a very important piece of technology because it brings a large amount of pre-existing software to the Flash Platform. Oh, and the compiled code runs asynchronously** so that long-running C / C++ cross-compiled processes can run while the Flash Player contains to update the UI etc. ** OK, it runs across Flash frames so it doesn't block execution of other code (at least, that's my understanding).

Tags: adobe · adobemax08

BACFUG on Adobe Groups

November 18, 2008 ·

Now that Adobe Groups has been announced - in today's general session at MAX - I can encourage everyone to visit BACFUG on Adobe Groups and join the group - and any other groups you might want to be part of (e.g., San Flashcisco, Fire On The Bay, Silvafug...). At present, Adobe Groups does not support RSVP so we'll continue to use the old BACFUG website for that but we will transition fully onto Adobe Groups once RSVP capability has been added.

Tags: adobe · adobemax08 · bacfug · coldfusion

ColdFusion IDE - Bolt

November 18, 2008 ·

Some information is posted on Adobe Labs and it was demoed in the general session at MAX today, along with some cool CS4 stuff, Flash Catalyst (formerly known as Thermo) and Flex Builder 4 (aka Gumbo). The demo didn't go into much depth but it's Eclipse-based (no surprise) and has some "intellisense" (but it's unclear how it will handle more dynamic code) with RDS-style file system and database browsing. In some ways, it's really not news - most people expected Adobe to announce this based on the somewhat coy comments Adobe CF staff have been making over the last year at conferences - but at last it's real. The Labs page has an FAQ and an outline of features. You can sign up for the Bolt pre-release program on Labs too.

Tags: coldfusion · adobemax08 · adobe

Cocomo on Labs

November 17, 2008 ·

As I've mentioned a couple of times, we're using Cocomo for some aspects of the Broadchoice Workspace. Now you can try Adobe's collaboration component model (and service) for yourself. All the information about Cocomo is on Adobe Labs for download!

Tags: connect · adobe · flex

MAX and BACFUG November 19th

November 16, 2008 ·

Important: you must RSVP via the BACFUG website. We have a hard limit of 47 attendees - if you do not RSVP, you may well be turned away. If we get close to 47 RSVPs, I will post again on my blog! MAX 2008 will be upon us soon and this year it coincides with our regular 3rd Wednesday for BACFUG. Accordingly, we have a special meeting with two presentations by speakers who are in town for MAX! Bill Shelton and Marc Esher - creators of the awesome MXUnit testing framework - will be presenting "Unit Testing with MXUnit". Unit testing talks have proved very popular at BACFUG in the past and MXUnit has really raised the bar in terms of features and tools so it will be great to have the framework's creators speaking at MAX. Our second presentation will be related to Model-Glue 3 "Gesture" and will again be the framework's creator, the amazing Joe Rinehart. Joe has hinted that he will be tailoring the talk toward integration with powerful Java technologies, along the lines of what we have achieved at Broadchoice. BACFUG is free and open to everyone - both regular locals (who may or may not be attending MAX) and all those CFers who are in town for MAX! However, we need you to RSVP on the BACFUG website so that we can figure out numbers and book a large enough room!

Tags: adobemax08 · bacfug · coldfusion · modelglue · tdd


November 15, 2008 ·

Fusion Authority Quarterly Update 7 (Volume 3, Issue 1) is now available! You can order a print or PDF subscription and there are options to order a year's subscription with all back issues as well, in case you haven't gotten around to subscribing yet. It's a very high quality journal and makes a great reference work for your bookshelf within reach of your computer. FAQU 7 focuses on data with articles on (getting and exposing data via) web services, type validation, stored procedures and views, system tables, data mapping, data manipulation for Excel and Blaze Data Services. In addition, Doug Hughes provides an introduction to Model-Glue 3: Gesture and Mike Henke explains how to get the best performance out of Eclipse.

Tags: faqu · coldfusion