Viewing By Month : December 2003 / Main
December 31, 2003
This site is now powered by Mach II!
I just spent the last four hours converting from Fusebox 3 for PHP to Mach II for PHP. It was a little tedious but it wasn't very hard. Essentially, all of the display fuses from the PHP version have become views in the Mach II version and all of the action fuses have become methods in listeners. The other main piece of work was changing the layouts into views - which required some rewriting since my Fusebox layouts relied on $Fusebox['layout'] etc whereas the Mach II views need $GLOBALS['content'] (the PHP equivalent of #request.content#).
I'll write up the conversion in more detail shortly but I thought it would be nice to start the new year running on Mach II!
I just spent the last four hours converting from Fusebox 3 for PHP to Mach II for PHP. It was a little tedious but it wasn't very hard. Essentially, all of the display fuses from the PHP version have become views in the Mach II version and all of the action fuses have become methods in listeners. The other main piece of work was changing the layouts into views - which required some rewriting since my Fusebox layouts relied on $Fusebox['layout'] etc whereas the Mach II views need $GLOBALS['content'] (the PHP equivalent of #request.content#).
I'll write up the conversion in more detail shortly but I thought it would be nice to start the new year running on Mach II!
As 2003 comes to an end, I thought I'd take a look back over my blog for the year and pick one or two highlights from each month...
- January - Lots of CFMX for J2EE and CFMX for Mac OS X goodness but the highlight for me was probably a Microsoft-free laptop.
- February - Safari was in beta, I didn't get to go to MXDU (due to work commitments on macromedia.com), I switched my blog to Movable Type and I started reading blogs and other news using RSS, thanx to NetNewsWire (I currently read 71 RSS feeds that way).
- March - Fusebox 4 and Fusebox MX were both in early testing, CFMX Updater 3 was released but the highlight was definitely seeing the launch of the all-new macromedia.com that we'd been working so hard on for many months!
- April - We released several updates to macromedia.com, I started evangelizing about design patterns in CF, I got into a long, drawn-out discussion about .NET and Flash with Jesse Ezell and I spoke at BACFUG about the architecture behind macromedia.com.
- May - Macromedia started talking about "Royale" (Macromedia Flex) and "Red Sky" (CFMX6.1) and I rediscovered my love of functional programming!
- June - Mach II was born from the ashes of Fusebox MX, I attended JavaOne and then took a much-needed two week vacation! Oh, and BART finally opened the section out to SFO!
- July - Macromedia released Contribute 2, Flash Player 7 entered beta as did Mach II - which sparked my Mach II website - and I turned 41.
- August - Lots of cool releases: ColdFusion MX 6.1, Mach II 1.0 and a new LiveDocs system!
- September - I enjoyed the Fusebox Conference immensely, particularly the Mach II session and the Fusebox 4 Layouts session. I also, finally, started chiropractic treatment which has been incredibly helpful so far!
- October - I published my team's ColdFusion MX Coding Guidelines and the Mach II Development Guide and Nathan Dintenfass gave a great talk at BACFUG.
- November - I upgraded to Panther (and I'm loving it!), I started work on a big new project that lets me write more code than I've had a chance to do for ages and my blog became so popular I had to upgrade my ISP account!
- December - My blog was cited in a 9th Circuit Court of Appeals ruling and I spoke at BACFUG about Mach II. I've been at Macromedia now for three and a half years and I'm still enjoying myself! And I celebrated my fourth wedding anniversary :)
The Seattle Times reports that Israel has suspended purchases of Microsoft software and is looking at Open Source alternatives. In fact, Israel's Finance Ministry has already gone as far as working with Sun and IBM to create a Hebrew version of the OpenOffice suite! This is the latest in a number of governments around the world that are turning away from Microsoft, in favor of free alternatives from the Open Source community. England's "The Register" has a slightly more colorful account of this story.
Nice to see Tim Berners-Lee getting a KBE - Knight Commander, Order of the British Empire for his "services to the global development of the Internet". Well-deserved!
December 29, 2003
As someone who used to work on IBM mainframes back in the day, this blog entry by Ben Forta caught my eye - ColdFusion for the IBM zSeries mainframe! I remember building mainframe applications in REXX and 370 assembler *shudder* Having something like ColdFusion available back then would have been an unimaginable luxury. You can read more about this on the ColdFusion for IBM zSeries product page.
Not really ColdFusion-specific but if you need to connect to a database for which the drivers are not included in the product, Brandon Purcell provides a great link to Sun's website containing 197 database drivers.
December 27, 2003
After speaking at BACFUG about Mach II a few weeks back (12/18), the following talks are now scheduled (mostly confirmed):
- 2/11 - Southern California ColdFusion User Group Conference
- 2/24 & 2/25 - MXDU - MX Down Under in Sydney, Australia
- 4/13 - Sacramento ColdFusion User Group
- 5/4 - San Diego ColdFusion User Group
- 6/26 & 6/27 - CFUN-04 in Rockville, MD
December 23, 2003
My Banned IP list keeps getting longer and longer to deal with those annoying blog spammers... And that's an after-the-fact approach since they've already commented by then and I just add their IP addresses to prevent them doing it again (and I'm beginning to suspect they spoof their IP addresses anyway).
So I'm taking a slightly different approach. In addition to IP banning, I'm banning certain words in URLs and comment text to make their attempts at advertising through this blog harder.
After Jester's comment here, I decided to install MT Blacklist. Thanx Jester and thanx Jay Allen!
So I'm taking a slightly different approach. In addition to IP banning, I'm banning certain words in URLs and comment text to make their attempts at advertising through this blog harder.
After Jester's comment here, I decided to install MT Blacklist. Thanx Jester and thanx Jay Allen!
December 21, 2003
Along with several other volunteers, I've spent the last day or so running a test build of what will become OpenOffice.org 1.1.1 for Mac OS X. It's the first time I've taken on a full build - I've been lurking on the dev-porting list for many, many months. It was an interesting process, starting with a full check out from CVS of the source tree and then discovering I didn't have the latest GNU C++ compiler installed (the IT Ops folks at work upgraded my laptop to Panther but didn't install the developer tools). So I ended up downloading Xcode 1.1 from Apple's website to obtain gcc 3.3 - about a 600Mb download! The build took all night and some of this morning but, once it was done, it installed cleanly and seems to work well. Seeing how much code is present and how long it takes to build really makes you appreciate the hard work the volunteers in the Open Source community put into their projects - OOo 1.1.1 is a very impressive project!
Ben Edwards has set up a Mach II for ColdFusion mailing list at topica.com for those who find mailing lists more convenient than the Mach II web forum at fusebox.org.
Additionally, I've set up a Mach II for PHP mailing list since that version is in development (many thanks to Alan Richmond for that!).
You can see the MachWiki application running on an early code-drop!
Additionally, I've set up a Mach II for PHP mailing list since that version is in development (many thanks to Alan Richmond for that!).
You can see the MachWiki application running on an early code-drop!
December 20, 2003
Ike has published the fourth article in a trilogy comparing these frameworks. This new article includes timing comparisons with debugging disabled, giving a much better idea of how these frameworks might compare "in the wild".
Eric Herman et al have released a package that lets you write user defined functions in Java for use in MySQL. You can then execute those functions from SQL code. Sounds pretty useful!
December 19, 2003
Yamaha Motors Japan have a fabulous set of self-assembly papermodels of various motorbikes and wild animals. Hours of fun for the holiday season! I've downloaded the Drag Star Classic Eleven and hope to spend some relaxing hours building that over the next week or so since I'm going to be on vacation!
Yes, Macromedia's US offices close for the holiday week so the blog will be a bit quiet for a while. Hope y'all have a happy holiday, however you celebrate!
Yes, Macromedia's US offices close for the holiday week so the blog will be a bit quiet for a while. Hope y'all have a happy holiday, however you celebrate!
Sandy Clark has blogged a couple of browser toolbars lately including one from the Australian National Information and Library Services which provides accessibility tools for Internet Explorer. I don't have Win/IE so I can't try it out but it sounds like a very useful tool for anyone attempting to build websites that can be accessed by the visually impaired. Sandy's a staunch advocate of accessibility in websites and her blog often has interesting hints and tips on this subject - recommended!
The holiday season meant it was a somewhat lower turnout than I hoped and even the promise of ColdFusion MX 6.1 Standard Edition being raffled off didn't draw folks. At most meetings, the speaker asks who is using which version of ColdFusion and normally it's a few on 6.1, a few on 6.0 and most folks on 5.0 or earlier. I asked the same question and found more than half the audience are using 6.1 - that might be because of the topic (Mach II requires CFMX 6.1) but it was encouraging nonetheless.
I'll be making the talk available on the BACFUG site - it's a little Mach II application, that takes an XML file containing the information and renders it into a slideshow (a rewrite of my earlier custom tag based slideshow) - but I thought I'd give a little outline here anyway.
I started out with a brief introduction to the Mach II framework and explained why you might want to use an application framework. Folks seemed surprised that Macromedia hadn't been using a framework previously even though only one person in the audience seemed to be using one (Fusebox). Only about 5-10% of developers use any sort of framework (based on usage statistics for Fusebox in the CF community and Struts in the Java community - the most popular frameworks for those languages respectively). Why is that? Well, frameworks make you do things "their way" and not everyone likes that - and every framework has a learning curve and an overhead that you have to deal with.
I talked about why my team at Macromedia uses Mach II - we already did a lot of OO-style devlopment in CF and tried to structure apps in a loose Model-View-Controller pattern. Mach II was a good fit for us. I showed a couple of the applications on macromedia.com that use Mach II: the new showcase and the HTML version of the European online stores (here's the UK store). We've had Flash versions of the European stores for quite some time (here's the UK store in Flash - if you have the latest Flash Player installed) and they used to fall back to the previous HTML store built in BroadVision. The previous version of the showcase was also built in BroadVision - these were the last two applications rewritten to get us off BroadVision. Hurrah!
Then I talked about the pros and cons of Mach II, based on feedback from the developers on my team, and I also showed some code (including the near-1,000 line mach-ii.xml file behind the showcase and the myriad CFCs behind the online store - demonstrating that you can build serious applications with the framework).
For more details, you'll have to download the talk from the BACFUG website - or come and hear me give (a variant of) this talk: SCCFUG (February), MXDU 2004 (February), SacCFUG (April), SDCFUG (May).
The preso / app is available from the BACFUG code page.
I'll be making the talk available on the BACFUG site - it's a little Mach II application, that takes an XML file containing the information and renders it into a slideshow (a rewrite of my earlier custom tag based slideshow) - but I thought I'd give a little outline here anyway.
I started out with a brief introduction to the Mach II framework and explained why you might want to use an application framework. Folks seemed surprised that Macromedia hadn't been using a framework previously even though only one person in the audience seemed to be using one (Fusebox). Only about 5-10% of developers use any sort of framework (based on usage statistics for Fusebox in the CF community and Struts in the Java community - the most popular frameworks for those languages respectively). Why is that? Well, frameworks make you do things "their way" and not everyone likes that - and every framework has a learning curve and an overhead that you have to deal with.
I talked about why my team at Macromedia uses Mach II - we already did a lot of OO-style devlopment in CF and tried to structure apps in a loose Model-View-Controller pattern. Mach II was a good fit for us. I showed a couple of the applications on macromedia.com that use Mach II: the new showcase and the HTML version of the European online stores (here's the UK store). We've had Flash versions of the European stores for quite some time (here's the UK store in Flash - if you have the latest Flash Player installed) and they used to fall back to the previous HTML store built in BroadVision. The previous version of the showcase was also built in BroadVision - these were the last two applications rewritten to get us off BroadVision. Hurrah!
Then I talked about the pros and cons of Mach II, based on feedback from the developers on my team, and I also showed some code (including the near-1,000 line mach-ii.xml file behind the showcase and the myriad CFCs behind the online store - demonstrating that you can build serious applications with the framework).
For more details, you'll have to download the talk from the BACFUG website - or come and hear me give (a variant of) this talk: SCCFUG (February), MXDU 2004 (February), SacCFUG (April), SDCFUG (May).
The preso / app is available from the BACFUG code page.
December 18, 2003
I got the "three year anniversary email" today from HR and my fancy Macromedia pen. Everyone gets a mug after one year and a pen after three years (and a sabbatical after four years). My three year anniversary was actually back in July - the 17th, to be exact - and the time has just flown past!
I spent the first six months here documenting the existing IT systems (and produced a 100+ page report full of UML showing all the different interactions between systems). I spent the next three months working up proposals to simplify the architecture and looking ahead to web services and XML messaging as components of an enterprise integration solution. Then we bought Allaire and so I had to redo quite a bit of all that work to incorporate Allaire's systems and the new direction - focusing on ColdFusion for our web tier. In mid-2001, I helped form the Web Technology Group which was chartered with rebuilding our web infrastructure using leading edge Macromedia technology. We did a lot of experimental R&D and we worked closely with the Flash and ColdFusion teams to help them improve the products by pushing both technologies to the limit. Earlier this year, we launched the all-new, ColdFusion-powered macromedia.com with some RIAs - aka Dylan65. Since then, WTG and the Web Team have worked hard to incorporate user feedback and improve the usability of the website as well as launching several new applications and replacing what remained of our legacy web infrastructure. The result was the highest rating ever by Forrester Research!
Lately I've been working on a back end enterprise project, rolling out more XML messaging, and I'm using ColdFusion - the fastest development tool for the sort of tasks I'm doing - and I'm still enjoying myself. There seem to be plenty of interesting projects coming up to keep me busy for quite some time and at the same time Macromedia itself is constantly innovating, producing cool new products and technology - for example Central and Flex - and opening up new opportunities for driving the web and the user experience further.
I like working at Macromedia and I'm looking forward to the next three (and a bit) years... and more!
I spent the first six months here documenting the existing IT systems (and produced a 100+ page report full of UML showing all the different interactions between systems). I spent the next three months working up proposals to simplify the architecture and looking ahead to web services and XML messaging as components of an enterprise integration solution. Then we bought Allaire and so I had to redo quite a bit of all that work to incorporate Allaire's systems and the new direction - focusing on ColdFusion for our web tier. In mid-2001, I helped form the Web Technology Group which was chartered with rebuilding our web infrastructure using leading edge Macromedia technology. We did a lot of experimental R&D and we worked closely with the Flash and ColdFusion teams to help them improve the products by pushing both technologies to the limit. Earlier this year, we launched the all-new, ColdFusion-powered macromedia.com with some RIAs - aka Dylan65. Since then, WTG and the Web Team have worked hard to incorporate user feedback and improve the usability of the website as well as launching several new applications and replacing what remained of our legacy web infrastructure. The result was the highest rating ever by Forrester Research!
Lately I've been working on a back end enterprise project, rolling out more XML messaging, and I'm using ColdFusion - the fastest development tool for the sort of tasks I'm doing - and I'm still enjoying myself. There seem to be plenty of interesting projects coming up to keep me busy for quite some time and at the same time Macromedia itself is constantly innovating, producing cool new products and technology - for example Central and Flex - and opening up new opportunities for driving the web and the user experience further.
I like working at Macromedia and I'm looking forward to the next three (and a bit) years... and more!
I just read Christophe'sblog entry about embedding MXML in JSP (his old blog has gone - see the comments below for possible links) to create hybrid HTML / Flash apps... fascinating! I didn't realize that could be done - being able to embed dynamic JSP code in the MXML is very powerful. Christophe also confirms that this same technique, using the FlexTagLib, can be used in ColdFusion pages if you <cfimport> the tag library. Nice!
As I mentioned last week, I'm speaking at BACFUG tonight about Macromedia's use of Mach II. RSVP if you plan to attend (so Jennifer can guage beer/food requirements). See you there?
Brandon has published an updated step-by-step guide to clustering ColdFusion on his website, pending getting a final version published on macromedia.com.
I like documents to have a table of contents at the front so you can find things easily. This can be a bit of a pain with web pages. What I've tended to do is use this Table of Contents Dreamweaver Extension to insert a ToC. The problem is, when you change the structure of the document, the ToC is out-of-date and it's hard to update it (you need to remove all of the anchors and the ToC and regenerate it).
Michael Matti suggests an alternative approach in a Developer Center article that explains how to set up an automatic table of contents, aimed at making life easier for Contribute users who work with Dreamweaver templates you create. I haven't tried the code but it seems applicable to web pages in general. The downsides would be: the ToC wouldn't be generated in all browsers and the ToC would not be accessible (i.e., would not be rendered in assistive technology browsers and therefore would not be ideal for Section 508 compliant sites).
Michael Matti suggests an alternative approach in a Developer Center article that explains how to set up an automatic table of contents, aimed at making life easier for Contribute users who work with Dreamweaver templates you create. I haven't tried the code but it seems applicable to web pages in general. The downsides would be: the ToC wouldn't be generated in all browsers and the ToC would not be accessible (i.e., would not be rendered in assistive technology browsers and therefore would not be ideal for Section 508 compliant sites).
December 17, 2003
When I blogged the 1.0.8 release I said it fixed the thread safety issues in 1.0.7. The framework initialization code was still not thread safe so I've published a fix for mach-ii.cfm. I've also made Macromedia's simple trace plugin, written by Laurent Rouquette, available for download.
December 16, 2003
After my cautionary post about MVC yesterday, I'm going to point you at something more upbeat about MVC today: Christophe Coenraets shows how to use Flex to build a Flash front end to a Java Struts application. Christophe shows several approaches to this: reusing the Struts code (almost) as-is, leveraging struts-config.xml to support HTML and Flash in parallel and finally using SOAP-level integration (and providing a Service class).
Video in Flash is heavily featured on macromedia.com at the moment: read the article by Forest Key (Senior Flash Product Manager) on creating a video showcase for your website and watch Forest talk about the video features in Flash Pro. There's also a cool video gallery showing how twenty five companies have taken advantage of the video functionality in Flash!
The Flash Player Product Manager, Waleed Anbar, talks about the new update to Flash Player 7 (7.0.r19). This update adds some new features (including auto-update notification for Netscape and Mozilla-based browsers on Windows) as well as several bug fixes and enhancements. Update your Flash Player now!
Kay Smoljak has written an Introduction to the Fusebox Framework which has just been published on the Macromedia Developer Center. I hope we'll see more articles about Fusebox submitted to the Developer Center (a challenge I issued at the Fusebox Conference - let's see more of you Fuseboxers rise to it!). Big thanx to Kay for stepping up to the plate!
It's already been mentioned a few times but this thread on the Mach II forum makes it very explicit: if you turn on debugging in the ColdFusion Admin and you have Report Execution Times enabled, Mach II applications will run very slowly. The thread has some hints and tips on dealing with this.
December 15, 2003
N Alex Rupp has written an interesting and critical look at MVC and Servlets that is receiving some lively coverage on TheServerSide.com. His basic point seems to be that we've repeatedly tried to shoehorn the MVC design pattern onto Servlet-based frameworks but the 'fit' isn't really that good. Responses to the article are mixed but coherent. I've seen a similar point raised in the ColdFusion community: namely that MVC isn't always a good fit for web applications because of the nature of the stateless request-response architecture on which they are built. Given the popularity of Mach II and Fusebox (FB4 has an optional MVC skeleton), I think that CFers should read Alex's article (the first of three parts I believe) and the chatter on TheServerSide to temper and inform their adoption of MVC-based frameworks. Yes, there are some issues inherent in applying MVC to web applications but they are not, in my opinion, reason enough for complexity and inflexibility in some application frameworks (criticisms leveled at Struts quite regularly, for example).
December 12, 2003
The Java Boutique website has a very positive review of Macromedia Flex. The review covers the basics of Flex from a Java developer's point of view and concludes that the "only downside is that this product is currently only in Beta" and provides a link to the beta program application form.
Note: the beta program is starting out with a limited number of beta testers (already selected) but will be broadening its reach over time so don't be disappointed if you are not accepted straight away - you may well get into a later phase of the beta program.
Note: the beta program is starting out with a limited number of beta testers (already selected) but will be broadening its reach over time so don't be disappointed if you are not accepted straight away - you may well get into a later phase of the beta program.
Brian Kotek has an article on builder.com that gives a high-level introduction to the concepts behind Mach II and why you might want to use it. It doesn't go into much detail but it provides an overview of the architecture, a summary of the XML configuration file structure and some reasons why Mach II might (or might not) be good for you and your organization.
As you may have seen on Ben Forta's blog, Macromedia is looking to form advisory groups to better understand the needs of developers and inform future product development (not only CF). Those participating will have direct contact with Macromedia and other advisory board members and be provided with free Macromedia software. If you are interested in participating, please complete an online application. Macromedia is looking for developers from a wide variety of backgrounds and disciplines.
I'm speaking at BACFUG next week on Thursday. Here's the details from the BACFUG Manager, Jennifer Larkin:
Our December meeting features Sean Corfield talking about Mach II: "Mach II is an Object-Oriented, MVC-based application framework that implements the Event-Based Implicit Invocation Architecture. Buzzword overload! This talk will briefly introduce the audience to Mach II and then talk in more depth about Macromedia's real-world experience with the framework."
December 18, 7pm
600 Townsend (at the corner of 7th St)
San Francisco
Food and beer!
Free stuff!
As I've announced repeatedly, this meeting we will give away at least one fully licensed copy of CFMX 6.1. Even if you submitted a business card in a previous meeting, you must be present to win!
I sure haven't had much to say this week... I've been up to my neck in the ColdFusion / XML coding work that I mentioned a few weeks back as the unit-testing deadline approaches but it's mostly code-complete thanks to ColdFusion's "RAD" functionality! I've also been learning more about Macromedia Flex - so I now understand more of what Christophe is talking about and, yes, it is very impressive technology!
I hope to be back to my usual level of blogging soon. I've hit a couple of strange things in my CF code that I can't quite make my mind up about. Maybe they're bugs. Maybe I'm just doing something wrong. As soon as I get time, I'll write them up.
I hope to be back to my usual level of blogging soon. I've hit a couple of strange things in my CF code that I can't quite make my mind up about. Maybe they're bugs. Maybe I'm just doing something wrong. As soon as I get time, I'll write them up.
December 9, 2003
Back in August, I wrote about modeling web applications using UML and there were a few interesting comments posted. Recently, the topic has come up again in the context of modeling applications for Mach II. The OO nature of Mach II has helped turned developers' focus toward more formal modeling of their application systems and so they have, in turn, looked toward UML for help. Whilst UML is very suitable for representing the business model in your application, it's not always clear how (or even if) you can use UML to model the web pages themselves (views in Mach II). I figured it was a good time to post another link to Jim Conallen's Web Extensions to UML. Enjoy!
December 6, 2003
Matt Liotta posted an excellent summary of his approach to Rich Internet Application design on the CFCDev mailing list today. He points out that traditional three-tier applications (presentation / business / data) don't really adapt well to Rich Internet Applications because you really need the logic from the business tier spread between your Flash front end and your ColdFusion (or other) back end. He uses a four-tier approach: presentation / business (both in Flash) / services / data (both on the server). His services tier is a generic but high-level set of APIs providing access to data and other, integration-level, services. He says that the service and data tier can be reused between Flash and HTML applications so that you only have to rewrite the presentation and business tiers.
You can refine this architecture somewhat further by splitting the business tier into three more tiers, which I would call: business-presentation, business-facade and business-model. The business-model tier contains the generic business logic for your application (that does not depend in any way on the presentation technology). The business-facade tier provides a Web Services or Flash Remoting interface that exposes key business methods from the business-model tier. The business-presentation tier is in Flash and provides a controller / manager layer for the UI (presentation tier) to use, wrapping the calls to the business-facade tier.
If you need both a Flash version and an HTML version of your application, you can write two presentation tiers (one Flash, one .cfm ColdFusion pages) and two business-presentation tiers (one ActionScript, one Mach II / CFCs) and then reuse the business-facade (CFCs), business-model (CFCs) and lower tiers. If you don't need the RIA, you can collapse the business-presentation tier (Mach II / CFCs) and the business-facade tier (CFCs). It's still worth keeping the business-model tier separate tho' (as discussed in the Mach II Development Guide).
For more information on n-tier architectures, you can read these articles:
You can refine this architecture somewhat further by splitting the business tier into three more tiers, which I would call: business-presentation, business-facade and business-model. The business-model tier contains the generic business logic for your application (that does not depend in any way on the presentation technology). The business-facade tier provides a Web Services or Flash Remoting interface that exposes key business methods from the business-model tier. The business-presentation tier is in Flash and provides a controller / manager layer for the UI (presentation tier) to use, wrapping the calls to the business-facade tier.
If you need both a Flash version and an HTML version of your application, you can write two presentation tiers (one Flash, one .cfm ColdFusion pages) and two business-presentation tiers (one ActionScript, one Mach II / CFCs) and then reuse the business-facade (CFCs), business-model (CFCs) and lower tiers. If you don't need the RIA, you can collapse the business-presentation tier (Mach II / CFCs) and the business-facade tier (CFCs). It's still worth keeping the business-model tier separate tho' (as discussed in the Mach II Development Guide).
For more information on n-tier architectures, you can read these articles:
- Application Architecture: An N-Tier Approach - Part 1
- Benefits of Using the N-tiered Approach for Web Applications (about ColdFusion)
- Extending Design Patterns into RIA (about Macromedia Flex)
- Macromedia Flash Communication Server MX Application Model
December 4, 2003
A thread on the Mach II forums raised the topic of design patterns, in particular the Composite View pattern. One of the strategies recommended in the Mach II Development Guide for managing views is to break your view down into a 'grid' of sub-views and define each of those as a <page-view> in Mach II, then use a 'layout view' to assemble the final page. In Mach II, this leads to your event handlers having a series of <view-page> tags that render HTML to contentKeys followed by a final <view-page> that invokes a layout view to assemble the page.
Reading through the Composite View pattern, it's interesting to compare the JSP / J2EE approach with the Mach II approach. In my opinion, the JSP / J2EE approach is harder to read and substantially more complex - in nearly all of its myriad forms - than the equivalent in CF / Mach II. Most of the suggested JSP / J2EE implementations are also less flexible - Mach II, by definition, uses late-binding of the sub-views in a totally dynamic way. That's not only more flexible but, in the context of CF, pretty darned efficient too. Most of the JSP / J2EE implementations end up hardcoding the sub-view filenames into the layout (composite) view.
By contrast, CF / Mach II lets you define a composite view that refers only to request variables which are populated by the controller. This lets you reuse composite views with different sub-views. You can also rename view files without changing any CF code in any other views - you simply change the one line that defines the view. The other big difference is that in all of the JSP / J2EE composite views, there is some JSP logic - code required to manage inclusion of the sub-views. Mach II's approach keeps that logic out of the views, placing it in the controller.
The bottom line is that it's useful to be aware of the J2EE patterns but beware of slavishly applying them to ColdFusion - some of them were designed to solve problems that are specific to the Java technology and you can often find a more elegant form of the solution in ColdFusion.
Reading through the Composite View pattern, it's interesting to compare the JSP / J2EE approach with the Mach II approach. In my opinion, the JSP / J2EE approach is harder to read and substantially more complex - in nearly all of its myriad forms - than the equivalent in CF / Mach II. Most of the suggested JSP / J2EE implementations are also less flexible - Mach II, by definition, uses late-binding of the sub-views in a totally dynamic way. That's not only more flexible but, in the context of CF, pretty darned efficient too. Most of the JSP / J2EE implementations end up hardcoding the sub-view filenames into the layout (composite) view.
By contrast, CF / Mach II lets you define a composite view that refers only to request variables which are populated by the controller. This lets you reuse composite views with different sub-views. You can also rename view files without changing any CF code in any other views - you simply change the one line that defines the view. The other big difference is that in all of the JSP / J2EE composite views, there is some JSP logic - code required to manage inclusion of the sub-views. Mach II's approach keeps that logic out of the views, placing it in the controller.
The bottom line is that it's useful to be aware of the J2EE patterns but beware of slavishly applying them to ColdFusion - some of them were designed to solve problems that are specific to the Java technology and you can often find a more elegant form of the solution in ColdFusion.
December 3, 2003
Given the number of ColdFusion developers who ask for debugging in ColdFusion, it's worth pointing out these two interesting pieces about using the debugger in Java: Debuggers are a wasteful Timesink by Daniel H. Steinberg and Debuggers: a modern 'Dr. Jekyll and Mr. Hyde' by Andreas Schaefer.
I used debuggers quite a bit when I first started programming but I abandoned them as the projects I worked on became more complicated - I find debuggers can be really unwieldy when dealing with large bodies of code and it becomes easier to use manual instrumentation to track down problems. Andreas's article in particular touches on these same concerns - and alternatives to a debugger.
I used debuggers quite a bit when I first started programming but I abandoned them as the projects I worked on became more complicated - I find debuggers can be really unwieldy when dealing with large bodies of code and it becomes easier to use manual instrumentation to track down problems. Andreas's article in particular touches on these same concerns - and alternatives to a debugger.
Steve Bronstein just made me aware that my blog was cited in a ruling from the 9th Circuit Court of Appeals (page 4, footnote 3).
The ruling is all about whether or not you have immunity from prosecution for defamation when you publish prior defamatory material. The ruling talks about the difference between simple publishing (e.g., an automatic blog aggregator) vs selective publishing (e.g., a blog author chooses to edit / publish defamatory material from another source). Circuit Judge Gould's dissent from the majority vote makes interesting and coherent reading and I agree with him - I think the 9th Circuit Court got it wrong; I think someone choosing to edit and publish prior defamatory material should not be granted immunity from prosecution (for defamation).
The ruling is all about whether or not you have immunity from prosecution for defamation when you publish prior defamatory material. The ruling talks about the difference between simple publishing (e.g., an automatic blog aggregator) vs selective publishing (e.g., a blog author chooses to edit / publish defamatory material from another source). Circuit Judge Gould's dissent from the majority vote makes interesting and coherent reading and I agree with him - I think the 9th Circuit Court got it wrong; I think someone choosing to edit and publish prior defamatory material should not be granted immunity from prosecution (for defamation).
December 2, 2003
I think Christophe has done a great job in showing the power of Macromedia Flex by building a simple blog reader in just a page of MXML!
The latest release of Mach II is now available. Release 1.0.8 is a stability release, including all of the bug fixes reported by my team during load testing of some new applications. The fixes were also verified by folks in the Mach II community (thanx Robby, for your exhaustive analysis of var declarations!). The release also includes some minor changes to the internal error handling.
December 1, 2003
I was interested (and pleased) to see a discussion startup about recursion on CFCDev. Recursion is an incredibly powerful - but often much misunderstood - tool for solving certain types of complex problems, especially those involving complex data structures representing real-world relationships. I posted a couple of good references to the list that I wanted to share on my blog as well: Programming with Recursion (tutorial and examples by Erwin D'Souza) and Recursion - Wikipedia (definition and resources).
Currently doing the rounds: a virus attached to a very official-looking email purporting to be from Microsoft that informs you it's a security patch and you should apply it immediately. This prays on gullible folks who are already paranoid because of the constant stream of real security updates required by Microsoft software. I bet it will catch a lot of people.
So far I've received three copies, originating from different networks (inter.net, jaring.my and skanova.net) and having slightly different to/from headers. But they certainly look good - all the embedded links go to real places on Microsoft's website and they use Microsoft icons, colors and layout. Very sneaky.
Back in the day before HTML email, it was much harder to fool people because email was plain text. Now, you can recreate a company's branding in an instantly recognizable way and draw in a much larger crowd of victims.
I'm not sure whether this counts as another strike against HTML email or against Microsoft's security record or against the overall usefulness of email itself as we drown in a sea of spam and virus attacks...
So far I've received three copies, originating from different networks (inter.net, jaring.my and skanova.net) and having slightly different to/from headers. But they certainly look good - all the embedded links go to real places on Microsoft's website and they use Microsoft icons, colors and layout. Very sneaky.
Back in the day before HTML email, it was much harder to fool people because email was plain text. Now, you can recreate a company's branding in an instantly recognizable way and draw in a much larger crowd of victims.
I'm not sure whether this counts as another strike against HTML email or against Microsoft's security record or against the overall usefulness of email itself as we drown in a sea of spam and virus attacks...


