An Architect's View

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

An Architect's View

Entries for month: March 2004

DevX Article on Mach II

March 31, 2004 ·

Eric Jansson (of ACS Technology Center) has written a great introductory article about Mach II on DevX. Really good to see coverage like this, especially with comments like "The Mach-II framework has only been around a short time, but it is shaping up to be the most important Web architecture around that supports ColdFusion".
My only (very minor) criticism would be recommending the use of the CFCInvoker_EventArgs style listener invocation (passing all the event arguments as separate ColdFusion arguments) instead of the CFCInvoker_Event style (passing a single event object argument) which has become the de facto preferred way because it provides more control, more flexibility and better maintainability.

Tags: machii · coldfusion

Flex & Me

March 31, 2004 ·

Rey Muradaz asked about experiences with Flex on the San Diego CFUG mailing list and I responded - but then figured my response might have a broader audience so I'm posting it here:
Rey asked:
Seriosuly, if anyone out there has any experience with Flex (especially now that the NDA is over), I'm sure we'd all love to hear about it--how does it compare to developing a UI natively in Flash?
I've built a few applications with it - I actually rewrote a couple of CF apps that processed and manipulated XML as Flex apps to provide a better user experience.
First off, a little background (for those who don't know me):
My background is "enterprise programming" - COBOL, FORTRAN, C, C++, Java using (mostly) simple text editors rather than any visual development tools (except CASE tools which I've used in various forms for over a decade now). I've built system software products (compilers, code analyzers), bespoke desktop applications for insurance and actuarial companies and embedded systems for telecoms. In '97 I started developing bespoke web applications (using BroadVision initially and, hence, C++). I've been doing OO design and development for just over twelve years in structured teams that use version control, various degrees of formal QA and so on. In other words, I'm squarely in the target audience for Flex according to the information on the website.
Second, having never used visual development tools (actually I tried them but just couldn't deal with the generated code and the visual idiom - I'm too code-centric), I've never really managed to get the Flash authoring environment to do anything useful for me. I tried (and failed) to get Flash 5 to do *anything*. I managed a feeble interactive animation with Flash MX. I've built a couple of butt ugly and somewhat pathetic little forms-based applications with Flash MX 2004 Pro (where I didn't have to deal with the timeline).
So, how did I find Flex? Well, I love it. It totally fits the way I work - the underlying Model-View-Controller architecture feels very natural to me and the declarative style of programming the views with XML is clean and simple (especially if you have any background with AWT or Swing or similar OO GUI frameworks - I used to build X11 and Motif applications a decade ago and I've dabbled with Swing more recently). ActionScript 2.0 is "just another OO language" so that's been fairly easy for me to pick up. Being able to write view components directly in MXML is very elegant - just like custom tags in ColdFusion - although the way you declare 'parameters' for those components seems a bit funky to me.
Rey also asked:
Seems like learning one's way around the API might be a bit of effort, but the programmer interface appears much more familiar than what one gets from Flash. Or am I way off?
You're definitely in the ball park - the API is extremely well documented and pretty consistent. Flex uses a lot of HTML idioms in its markup so it's fairly approachable. The approach to building apps is going to be very familiar to Java and C++ programmers.
Finally, I'll note that the CASE tool my team use today for OO design (for Flash and CFMX) and full OO lifecycle (Java) has a sticker price of $6k for a node-locked developer license and $12k for a floating single-user server license (we have $90k in deployed licenses). That isn't unusual for enterprise development tools...

Tags: flex

CFMX / JRun Connector Notes

March 31, 2004 ·

There are often questions about how to configure the CFMX / JRun web server connector that focus on the ignoreSuffixMap option and the AddHandler directive (Apache) / extension mappings (IIS). Tom Link (of Macromedia) posted the following information from the product team to the CFGURU mailing list and gave me permission to post it here on this blog as well.
Here's [...] some detailed explanations from engineering of the JRun connector, ignoreSuffixMap, and addHandler (Apache) / extension mappings (IIS).
Short answers:
If you want IIS to do NT authentication ignoreSuffixMap must be "true". Otherwise, it doesn't really make much difference, as long as the web server has extension mappings (IIS) or AddHandler (Apache) set. These settings guarantees that .cfm or .jsp files always get to JRun.
"true" is always OK for CFMX - but if you don't use IIS authentication, "false" shouldn't be considered a catastrophic malconfiguration requiring immediate correction.
DETAILS: Normally - the JRun connector is called by a web server at two points during request processing:
1. The connector is called early in the process as a filter.
This looks up the request URL in the JRun mappings. If a match is found, the URL may be changed. In IIS (but not in IIS6), the URL is changed to include the connector shareable library. For example, in IIS the URL is changed from /test.cfm to /scripts/jrun.dll/test.cfm. This insures that the request is to sent to step 2. The (potentially changed) URL is shown in the verbose log as JRun Filter mapped url to: '{new_URL}'."
2. The connector is called a second time as an Extension in IIS, as a Handler in Apache. This call passes the request to JRun to be processed.
When ignoreSuffixMap is set to "true" - step 1 ignores any mapping which starts with "*."
For files which are recognized by extension (like /test.cfm) rather than by a regular mapping (like /flashgateway) - this means that the URL is not changed by step 1, but is from the original request. The extension mappings in IIS or the AddHandler directives in Apache are relied on to get these requests to step 2.
With CFMX - ignoreSuffixMap should always be 'true" and extension mappings should be set for in IIS or AddHandler should be set in Apache. It is necessary for ignoreSuffixMap to be "true" if IIS is set to [Check File Exists]. If not, IIS will always check that jrun.dll exists - not the requested file.
The only apparent use for ignoreSuffixMap="false" is when JRun has a mapping for a certain file extension (e.g. *.txt) - but if JRun is down, you want the web server to process .txt files as normal. To do this, you would not create an extension mapping for *.txt in IIS, or an AddHandler for *.txt in Apache.
This is never the case for .cfm ( or for .jsp either!). If JRun is down, you never want the web server to send .cfm files or .jsp files directly to the browser. If you do set up extension mappings or AddHandlers, these will protect against sending the files directly to the user.

Tags: coldfusion

Mach II for PHP

March 29, 2004 ·

I keep getting asked about this so I figured I'd spell it out: you cannot download Mach II for PHP yet! It is still in development and will be available for public beta shortly. Keep an eye on the Mach II website for an announcement.

Tags: machii

Can a Clock be Cool?

March 29, 2004 ·

I've been using my cell phone as an alarm clock for quite some time and it has the annoying habit of going off at random times in the middle of the night! So I finally caved and bought a proper alarm clock. Not just any clock tho'... I wanted an "atomic" clock (sets itself using a radio signal from the atomic clock) and I wanted something a bit unusual. After a bit of Google research I settled on this purple Glo-worm (it's actually a lovely shade of dark purple!). The tail is actually a night-light :) A bit of a bargain too at only $20 instead of the usual $40!

Tags: personal

Useful Design Pattern Summary

March 29, 2004 ·

Anticlue has posted a useful one-page summary of some design patterns giving an indication of what each is / might be used for. This sort of high-level information makes design patterns more digestible and helps developers remember them - there's always so much to learn in this area!

Tags: programming

MS Office vs OpenOffice

March 29, 2004 ·

As an OpenOffice.org user, I find it interesting and somewhat gratifying that Microsoft considers OpenOffice.org enough of a threat that it is expending time and effort explaining why you should use MS Office instead (PDF - created not with Microsoft products but with QuarkXPress and Acrobat Distiller on a Mac!). For a very reasonable and balanced rebuttal, read Taran Rampersad's article on NewsForge.

Tags: microsoft · oss

Flex 1.0 Available

March 29, 2004 ·

"Old" news by now of course - the joys of living on the West Coast! - Flex is available and that press release has links to all of the juicy details which were posted to the site overnight.

Tags: flex

Back to UML

March 27, 2004 ·

After quite a long break, I'm now back in the land of UML pretty much full-time. My initial role at Macromedia was that of Senior Architect for the IT group and, after two and a half years on the Web Technology Group, I'm back in that role so I'm mostly working with the back office enterprise application teams. A key tool in my role as an architect is UML because it provides a consistent notation for describing all aspects of the IT systems, from the smallest interaction within the applications to the overall data flows and system interactions of the enterprise as a whole. UML can even describe the people processes and interactions.
For a long time, my UML tool of choice has been TogetherSoft's Control Center CASE tool. I started using it back in '97 (or early '98) when it was called Together/J. I've introduced it into every company I've worked at since then and for Java developers, it really is an impressive productivity tool - combining full visual (UML) software design with full EJB development and deployment, as well as software metrics and code auditing functionality. I introduced it to Macromedia back when I was part of the original Architecture Team and then the Web Technology Group picked it up to design and develop their applications. In fact, both Flash and ColdFusion developers use it, every day, to help them visualize their OO design.
And now I'm using it again. On a Mac. Even tho' we're still using version 5.5 (we weren't doing enough Java development to make it worthwhile upgrading) which was Windows-only. But it's a Java application and so, likely many pure Java apps, it can be persuaded to run on pretty much anything. I installed it on Windows 2000 using Virtual PC and simply copied the installation back to my Mac file system and tweaked the startup script to match the OS X Java install (the Windows install comes with both .bat and .sh startup scripts).
I'd forgotten how much I enjoyed using UML! I love how consistent the notation is and how you can describe systems at so many different levels, no matter how complex they are. And I love Together Control Center - I've tried a lot of different UML design tools but I keep coming back to this one as the most intuitive and most useful. I particularly like the integration of design patterns and refactoring tools and, when I'm using Java, the code audits and metrics.
TogetherSoft was bought by Borland a while back. You can find out more about the product on Borland's Together Control Center website.

Tags: architecture

Customer Service: The Good & The Bad

March 26, 2004 ·

After Ben Forta's recent rant about AT&T Wireless, Ted Neward also has a tale to tell where, this time, Archos are the villains (and ThinkGeek come out on top). I've resisted telling the story of my battles with various totally incompetent mortgage companies - I bought a house three years ago and refinanced twice since so I've had the misfortune to deal with several lenders in the intervening time. Customer "disservice" and financial institutions seem to go somewhat hand-in-hand over here :(

Tags: personal