July 07, 2003

Why DHTML Sux!

Hakman Peachey have demos of their JSX Objects - DHTML code - for various applications. None of the demos work in any browser I have access to. Maybe they work in MSIE for Windows? I tried Netscape, Firebird, Camino, Safari, Opera (all Mac) and the demos failed to render in every single one of those browsers. Why would anyone go to all that trouble to create a DHTML application that doesn't work in so many browsers?
Posted by seancorfield at 10:39 AM | Comments (11) | TrackBack | programming

June 17, 2003

Patterns != Best Practice

I was entertained and heartened by Jesse Ezell's post about MVC code examples, proving that using patterns is not sufficient to ensure you end up with good code. Patterns are just another tool in your programming toolkit, they are no silver bullet. Best practice is about a combination of things.
Posted by seancorfield at 01:04 PM | Comments (7) | TrackBack | programming

June 09, 2003

Font Tags - Just Say No! (Zeldman on Web Standards)

Meet The Makers continues its great "conversation" series with Jeffrey Zeldman on Web Standards, talking about why it's more than just being hip to be compliant - it can make you a faster web developer and it can also be easier.
Posted by seancorfield at 11:28 AM | Comments (0) | TrackBack | programming

May 17, 2003

Haskell

About twenty years ago, I was doing my PhD in "Functional Programming Languages : Techniques and Implementation". My interest in functional programming persists today, even though those languages never really made it to the mainstream. My experience with functional languages informs my design and implementation today, just as my decade of OO experience does. One of my colleagues has recently discovered references to functional programming on the web and has been asking me about subject. I pointed him at a few references but it really reawakened my interest in the subject too. Back in the day, I designed and implemented my own functional language (SURE) so I searched the web for free downloads of functional language systems. Miranda was my first choice but seems to be only available as an educational tool (and perhaps a commercial product?). The next choice was Haskell. Named for Haskell B Curry, this was pretty much a de facto standard. More to the point, it's still alive and kicking today. There are several compilers and interpreters available and a lot of freely available documentation, including this wonderful tutorial. I downloaded the source of the NHC98 compiler and, after a few false starts due to 'make' version compatibility, I compiled the compiler using the C sources. Then I compiled the compiler using itself (the NHC98 Haskell compiler has both a C bootstrap and a primary Haskell source). That's about where I am right now. I'll be writing more about this once I've got everything compiled and installed.
Why is this of any interest to ColdFusion developers? For the same reason that Java and OO is of interest - it broadens the mind and teaches new ways to tackle problems.
Posted by seancorfield at 12:09 AM | Comments (0) | TrackBack | programming

May 16, 2003

Remoting? Web Services?

John Dowdell's blog mentions this interesting article on builder.com that compares Remoting and Web Services... not Flash Remoting, .NET Remoting. JD wonders what the point of the article is and why you'd choose Web Services for Internet applications but Remoting for intranet applications. Having read the article, I'm inclined to agree with him. Why not use standards-compliant communication internally? We are starting to expose our internal systems as Web Services - it makes it much easier to integrate disparate systems. Of course, we don't have a homogeneous Windows network so we're interested in interoperability - we want to be able to expose services on back end systems and consume them from our ColdFusion servers; we want to be able to expose services to specific third parties. That requires that we use open standards compliant methods where possible. I can't imagine why anyone would be comfortable locking down their internal systems in a way that prevented possible integration with third parties in the future - you never know when you might want to outsource part of your operation!
Posted by seancorfield at 11:28 PM | Comments (2) | TrackBack | programming

May 05, 2003

Patterns Central

Check out the new patterns portal. It'll be interesting to see how broad a reach a site like this has given the use of patterns in many different languages these days, including ColdFusion MX.
Posted by seancorfield at 05:07 PM | Comments (0) | TrackBack | programming

April 30, 2003

Hal Helms on XP

I was just browsing around Hal's site and going over old newsletters I'd missed (I only recently signed up for his occasional series). Another Look: Extreme Programming caught my eye and I was very relieved to see that Hal shares some of my concerns about the claims (and goals) of the XP community. Like him, I worry that XP is so focused on agile development that it has forgotten about "process" - unless you have enough documented process that you can repeat your successes, you're doomed to repeat your failures.
Posted by seancorfield at 12:22 AM | Comments (3) | TrackBack | programming

April 29, 2003

Boxing the Fuse

Big Damn Heroes (Tech) comments on my Fusebox for PHP write-up and thinks I'm missing the point. He agrees that Fusebox provides a lot of machinery and that small sites like mine probably don't get enough benefit from it to warrant the extra complication. He thinks you needs to use Fusebox on a large project to really understand it and notes that the big issue is how to persuade folks to risk a new methodology / framework on a large project.
I've just completed a very large project (that didn't use Fusebox) and we tried some new approaches in the early days to see what worked for us. We tried the methodology that our product development teams use. Some aspects worked well, some did not. We tried variations of XP. Again, some aspects worked well, some did not. We actually used Fusebox on a couple of early prototypes and decided not to use it extensively (for many of the reasons that I've mentioned). In the end, we used a synthesis of various approaches for the overall management of the project and a broad MVC architecture for the software, some of which we've documented in outline on macromedia.com. The development team were mostly seasoned software engineers with a background in OOA/D and OOP.
So, I'll stand by my earlier comments on Fusebox and FLiP (see my review of Jeff and Nat's book) that I don't think they don't scale to really large projects - FLiP is simply too linear and too focused on how a very small team operates and Fusebox as a whole does not really provide the necessary framework to deal with very complex business models. Is my site 'too small' to gain the benefits of Fusebox? Perhaps, but I don't believe it is so small that it can't provide a reasonable evaluation of Fusebox. The pros and cons I see in Fusebox would hold true for small to medium projects but there is a ceiling of complexity beyond which Fusebox does not provide enough assistance - and even some leading lights in the Fusebox community admit this. For those very complex projects, you need software engineering and Fusebox is no substitute for that. For smaller projects, you can get by with framework instead and Fusebox is clearly very good for that.
Posted by seancorfield at 07:30 AM | Comments (3) | TrackBack | architecture | programming

April 27, 2003

Software Reliability Questioned (Again!)

CNN is currently running a story about how software reliability is causing us all problems. It's nothing new. Oakwood Computing has been preaching that gospel for a decade. Dr Les Hatton, founder of Oakwood Computing, used to work with me at Programming Research back in the early 90's where we analyzed software error rates around the world and tried - mostly in vain - to persuade software companies to take quality seriously. I don't know whether legislated liability is the right way to go but it does seem that we need to do something as software finds its way into pretty much every single electrical device in our lives. People joke about having to 'reboot' a car every fifty miles if Ford / GM / whoever built cars the way Microsoft builds software but that might become reality all too soon if we don't start taking quality seriously...
Posted by seancorfield at 05:29 PM | Comments (0) | TrackBack | programming

April 16, 2003

Beyond Object-Oriented Programming?

There's an interesting article called The Post-OOP Paradigm by Brian Hayes in the current issue of American Scientist. It's a concise history of our drive to solve the software crisis but with a healthy dose of cynicism.
Posted by seancorfield at 11:35 AM | Comments (0) | TrackBack | programming

April 14, 2003

Design Patterns

Check out the data & object factory's design patterns section for diagrams, descriptions and information about patterns. The code is C# but it should be easy enough to understand for anyone with a little Java knowledge. Now, who's going to rise to the challenge of creating an equivalent site for ColdFusion?
Posted by seancorfield at 09:57 AM | Comments (1) | TrackBack | architecture | programming

March 30, 2003

Is XML Too Hard?

Someone recently asked me, via cf-talk, what I thought about Tim Bray's article that XML is too hard for programmers. I was sitting on the reply, in my drafts folder, thinking about what to say because, well, I think XML is pretty good really and I'd been a bit puzzled by Tim's original article. I no longer need to sit on my reply because Tim's published a great follow-up article saying that XML doesn't suck. I'll just refer folks to that I think since it confirms what I think about XML.
Posted by seancorfield at 04:06 PM | Comments (0) | TrackBack | programming

March 21, 2003

C++ Templates: The Complete Guide

SlashDot has a great review of the new book by David Vandevoorde and Nicolai Josuttis about templates in C++. This always my favorite language feature when I was on the C++ Standards Committee and I can claim responsibility for some small pieces of template semantics. I haven't seen the book myself but David and Nicolai really know their stuff so I'd highly recommend this book sight unseen if you do any C++ programming.
Posted by seancorfield at 12:15 PM | Comments (2) | TrackBack | programming

March 18, 2003

Beyond the ARM

Many years ago, when I was involved with the ISO C++ Standards Committee, I created a set of web pages called C++ - Beyond the ARM. They've always gotten quite a bit of traffic and, although I haven't had cause to update them for several years - I dropped out of the C++ committee at the end of '99 - I still get emails from people asking me C++ questions. This is a good thing... It reminds me that not everyone in IT is working on the Internet and it helps keep my memory refreshed about C++.
The latest question was from a developer in Israel, working on an embedded system, who wanted to verify a compiler bug regarding virtual inheritance and templates (somewhat similar to a bug I encountered and wrote about in my compiler-writing articles, in the C++ section of this site, some years back). In a way it's good to know that C++ compilers are still finding it hard to correctly compile certain constructs!
Posted by seancorfield at 04:58 PM | Comments (0) | TrackBack | personal | programming

January 28, 2003

A bit off?

One of the most common programming errors in the world is the notorious "off by one" error. It manifests in several ways but the essence is that code runs one past some boundary condition. I've seen a couple of examples of this on cf-talk lately, usually in the context of people trying to add elements to arrays. I've looked at the code fragments people post but I can't quite put my finger on why this causes many ColdFusion programmers such trouble. I wish I could, because then I could offer some simple advice on how to avoid the problem. The best I can say is: do a walk through of your code for a couple of different cases, usually 'no elements' (initial run), 'one element' (second run) and for some arbitrary number (e.g., 10). Use a pen and paper. Down the left side of the page, write each variable name. As you step through the code manually, cross out each variable's prior value and write in the new one. This might seem primitive in this modern, high-tech world but it really does help you focus on exactly what the code is doing.

Of course, my personal preference would be to run a code analyzer over the code that can deduce code invariants and prove transformations on the data. Except we don't have such a thing for ColdFusion. I've worked on tools like that for other languages in the past but such tools are extremely hard to create and often require a language subset in order to be effective. Meanwhile, it's pen and paper...

Posted by seancorfield at 07:24 PM | Comments (1) | TrackBack | programming

January 10, 2003

Whither Fusebox?

Someone reminded me today that I promised to write up my experiences with converting my website from "plain" PHP to Fusebox. Yes, yes, yes. I will get to it. I'm kind of snowed right now, trying to finish the new macromedia.com (along with many other folks) so cut me some slack. I will just say that it wasn't as unpleasant as I'd initially expected... No faint praise from me!

Posted by seancorfield at 12:15 AM | Comments (0) | TrackBack | architecture | cf | php | programming

November 13, 2002

OOver your head?

Do you find all this Object Orientation stuff a bit mystifying? Want to learn more about design patterns or object oriented design? Here's a great resource: Ootips - Object Orientation Tips. This site is packed with interesting articles and book recommendations. Highly recommended!


My only minor complaint is that they don't recommend Andrew Koenig's "Accelerated C++" as the best introductory book for C++.

Posted by seancorfield at 10:53 AM | Comments (1) | programming

Design Patterns in ActionScript

This is one of many fascinating threads on the Digital Illusion Forums. Digital Illusion, based in India, has done some impressive Flash work and was a Macromedia Showcase site a while back. Definitely worth a read!

Posted by seancorfield at 10:30 AM | Comments (0) | programming

October 29, 2002

Rugby & Fusebox

Kevin's talk was about his company's "ActivityForum" application which provides community services for about 2,200 Rugby Football Union clubs in England, with about 60,000 members. The application offers event management, membership management, forums and content management for each club to have their own content. The previous version of the application was built using Fusebox 2 and the new version is built using FB3. Kevin said most of the migration work was deleting code that added functionality to FB2 that is provided out of the box in FB3, especially in the area of nested circuits. Kevin talked about the structure of the application, with menus and breadcrumbs constructed by each circuit and each page on the fly, and administrative features overlaid that allow clubs to manage their content and events and so on. Since FB3 does not let you use <cfflush>, Kevin talked about how they modified the core files to dynamically split layout files into two pieces the first time they are encountered, one pushed to the browser as usual, the other queued for output later, with <cfflush> executed in between. He said this was about three or four hours work to implement. This restriction is going to be lifted in the next version of Fusebox (which Hal Helms will be talking about in the Community Suite later today).

Posted by seancorfield at 09:20 AM | Comments (0) | programming

October 25, 2002

XML & CSS

My curiosity about formatting XML for display purely through the use of CSS led me to this XML and CSS article on the W3Schools website. They don't think it's the way of the future but it's an interesting, if frighteningly ugly, example.
Posted by seancorfield at 06:45 PM | Comments (0) | TrackBack | programming

Meet the Makers

A few days ago, I attended the San Francisco Meet the Makers event. This was a fascinating day out of the office, hearing from the people behind the Google Search Appliance, the MapBlast website, the standards-compliant browsers from both Microsoft and Netscape, and Hotwired's standards-compliant website redesign. In addition, Jeff Veen and Paul Whitmore talked about user experience in web design - from a general point of view and from E*Trade's point of view respectively. A number of vendors, including Macromedia, also showed off their wares in-between interviews.

The part that I found most interesting was the session with Tantek Celik (Microsoft), Arun Ranganthan (Netscape) and Doug Bowman (Hotwired) where they talked about standards-compliance on the web. Doug related how part of Hotwired's redesign was to replace all the tables used solely for layout with CSS markup and how this dramatically improved the accessibility of the website for people using assistive technologies. Tantek showed the power of CSS as well as some interesting JavaScript extensions to the browser, via "favelets". All three engineers were very enthusiastic about standards - after all the pain of the "browser wars", it was good to see just how much can be done in a totally standard, cross-platform manner! One, almost throw away, comment was made about authoring websites purely in XML and rendering them purely using CSS support in the browser. I'll be tracking down more details of that and reporting back here in due course.

Both Jeff Veen and Paul Whitmore were entertaining as well as informative, with their focus on usability. Paul mentioned a very interesting website: Chris McEvoy's "Usability Must Die".

Kudos to Brian Alvey for organizing this event!

Posted by seancorfield at 05:28 PM | Comments (0) | TrackBack | programming

October 17, 2002

MVC? P? CF?

Lest you drown in a sea of MVAs (Model-View-Acronyms), here's a very interesting whitepaper that explains the difference between MVC (Model-View-Controller) and MVP: Model-View-Presenter The Taligent Programming Model for C++ and Java. Wondering about MVCF? That was the named coined by Benoit Hediard for his "Model-View-controller in ColdFusion" architecture - another interesting read.

Posted by seancorfield at 02:17 PM | Comments (0) | TrackBack | architecture | cf | programming

October 13, 2002

The Good Book?

I'm always being asked for recommendations of books. I used to review books for the Association of C & C++ Users and they publish all their reviews on the web. Whilst their reviews mostly cover C, C++ and more recently Java, there are a lot of books covered outside that range so you may well find ACCU - Reviews Index Page very useful. Now that ColdFusion MX supports OO features, I'm seeing more requests for recommendations around UML and OO Analysis and Design. Check out the Modeling Languages section for suitable books.
Posted by seancorfield at 04:26 PM | Comments (0) | TrackBack | programming

October 07, 2002

SQL/XML

Oracle 9i release 9.2 provides an implementation of XML DB. I just installed the developers' release on my Mac laptop and have been experimenting with it. I started with the SQL/XML code examples and very quickly was producing XML documents from my existing relational tables - very easy and very powerful! XML DB allows you to mix pure relational data with arbitrarily structured XML and to perform queries across both (using standard SQL and XPath style queries together), returning the results as a standard record set, an XML document or a combination of both.
p.s. You'll need to register with Oracle Tech Net to access those links: it's free and it's definitely worth it to get access to a wealth of Oracle information including searchable online documentation!
Posted by seancorfield at 11:01 PM | Comments (0) | TrackBack | programming

October 02, 2002

Inheritance & Composition - Hal Halms

Hal has an interesting article on Macromedia - Designer & Developer : Using Inheritance and Composition in ColdFusion Components. I have a couple of stylistic comments about his code examples but it's a good article that explains the new OO features very well, showing inheritance and composition, how to refactor code for reuse (although I don't really like to hear 'reuse' and 'inheritance' in the same sentence - more on that in another post!).


My biggest issue with his code is that he uses public data members (e.g., this.address1) but then says you have to write methods for retrieving and setting them. Well, no, not if they're public you don't. You need getter / setter methods if the data members are private, using the unnamed scope, and that approach is much better practice: instead of <cfset this.x = value/> write <cfset x = value/> and provide functions to 'getX' and 'setX'.


My other comment is fairly minor: he chooses new() as a method name where most existing practice would use init(). This isn't a big deal really but might be confusing to people who are struggling to understand what new does in Java as they integrate that into their ColdFusion world.


As I say, a good introductory article that focuses on the modeling aspects of OO and CFCs. Thanx Hal!

Posted by seancorfield at 09:33 AM | Comments (0) | programming

August 23, 2002

Paradigm Shift

Benoit Hediard (MVCF) recently posted the following link on cf-talk: First Impressions of ColdFusion MX: Fusebox is Toast?. The article dates back to May 20, 2002 but it's very interesting to see how much of a revelation ColdFusion Components were to the article's author, Ben Rogers. For someone like myself, with a heavy OO background and coming to CF first through the MX release, it can be difficult to get a sense of how CFMX looks to the 'old hands' so I enjoy articles like this one.

And is Fusebox toast? No, but Ben explains why Fusebox could be less compelling now that ColdFusion Components exist.

Posted by seancorfield at 09:15 PM | Comments (0) | TrackBack | architecture | cf | programming

August 21, 2002

MVCF

As proof that ColdFusion MX allows much more expressive approaches to building web sites, Benoit Hediard has put together a methodology based on applying the Model-View-Controller paradigm to ColdFusion. You can read about it on his Benorama :: ColdFusion MX web site. I'll blog my thoughts about it here once I've had time to read through more thoroughly.

Posted by seancorfield at 08:22 AM | Comments (0) | TrackBack | architecture | cf | programming

July 23, 2002

Refactoring

Following on from a discussion about process and 'good' code on BACFUG, Matt Liotta posted a link to an article he wrote for DevX about refactoring an application to make it more maintainable and more adaptable. His story makes good reading as it explains both the why and the how behind his architectural process.

Posted by seancorfield at 09:56 PM | Comments (0) | TrackBack | architecture | cf | programming

July 19, 2002

More on Fusebox

My comments about Jeff & Nat's book have a page of their own. If you don't agree with me, let me know!
Posted by seancorfield at 04:10 PM | Comments (0) | TrackBack | architecture | cf | programming

July 15, 2002

Read!

The long weekend away allowed me to read Jeff & Nat's new book on Fusebox from cover to cover. It's a good book: it's very well-written and I now have a much better understanding of why Fusebox works for people. I might even try rewriting my personal site using PHP Fusebox, just for the experience. I have a lot of notes about the book that I'll be writing up over the next few days, where I will go into more detail about what I really think of Fusebox, FLiP - the Fusebox Lifecycle Process - and Fusedocs. For now, I'd say that whether or not you're already a Fusebox fan, this book should be on your reading list.
Posted by seancorfield at 04:15 PM | Comments (0) | TrackBack | architecture | cf | programming

What's in a name?

Another caveat about names... A while back I commented on naming web service components and highlighted some restrictions brought about by the move to Java. Another change between CF5 and CFMX concerns the built-in scopes. They now behave as structures and they are effectively reserved words. That means that if you had an unqualified variable whose name matched one of the built-in scopes (e.g., url, file, request), then your code will not work correctly in CFMX.


<cfset url = "...">  <!--- url is reserved in CFMX --->

Even if it worked in earlier versions of ColdFusion, it is still bad practice since it creates clashes between names - a very bad practice, banned by most coding guidelines!

Posted by seancorfield at 03:58 PM | Comments (0) | programming

June 28, 2002

Coding Standards / tidy

I added some links to the ColdFusion MX Coding Guidelines so that people could find the tool tidy referred to there.

Posted by seancorfield at 12:16 PM | Comments (0) | TrackBack | cf | programming

What's in a name?

There are some restrictions on how you can name ColdFusion Components that are intended to be used as web services. Let's consider what happens when ColdFusion MX compiles your code (to Java) to use with Axis (as a web service): if you have component.cfc in {CFMX}/wwwroot/path/name/ then it will be compiled to a Java class called 'component' which lives in a Java package called 'path.name'. That means that both your component name and your directory structure should be valid names in Java. In particular, that means that you cannot create a .cfc that is named after any Java keyword (e.g., default, package) and you cannot put components in directories who names begin digits or contain non-alphanumeric characters.

Posted by seancorfield at 10:43 AM | Comments (0) | programming

June 25, 2002

Open Source (continued)

Tom Harwood has released JBurg - a compiler back-end tool: a code generator generator. I can't possibly describe it in a few paragraphs so you'll have to go and visit the site!
Posted by seancorfield at 01:46 PM | Comments (0) | TrackBack | programming

Coding Standards (continued)

Last night I got permission to publish a (slightly modified) version of the Macromedia Web Technology Group ColdFusion MX Coding Guidelines. It refers to our Accessibility Guidelines which I've also published. These documents are provided as-is for the community - feel free to use them, change them, provide feedback...
Posted by seancorfield at 12:05 PM | Comments (0) | TrackBack | cf | programming

June 24, 2002

Coding Standards (continued)

A few days ago I bemoaned the lack of public domain ColdFusion Coding Standards. Michael Smith of the Maryland CFUG pointed me at this collection of links to ColdFusion coding guidelines. I haven't checked the links out yet - I'll save that for bedtime reading in my copious free time and follow up with some thoughts on the material linked to.

Posted by seancorfield at 02:12 PM | Comments (0) | TrackBack | cf | programming

June 22, 2002

Coding Standards

These are a Good Thing(tm) so why doesn't the ColdFusion community have anything published on this? Take a look at the what the comp.lang.c++ FAQ says about coding standards - and, in particular, the list of links to the public domain (and extremely good) Ellemtel Rules & Recommendations. Unfortunately, quite a few of the links given lead to the dreaded 404... a hazard of history on the web: 'link decay'.

I'd love to see the ColdFusion community develop and publish some basic coding guidelines. My team at Macromedia has some pretty extensive coding guidelines but in their current form they contain quite a bit of Macromedia-specific information...

Posted by seancorfield at 08:39 AM | Comments (0) | TrackBack | cf | programming

June 19, 2002

Design Patterns

I'm a big fan of software design patterns: they really can help improve the structure of your application. With the MX release, ColdFusion now supports the expressive features necessary to take advantage of patterns that could previously only be applied to OO languages like Java, C++ and Smalltalk. To see how you can apply some of these software design patterns to your Rich Internet Application, read my article on the Macromedia - DevNet.
Posted by seancorfield at 09:07 AM | Comments (0) | TrackBack | programming