Take control of your code with these programming best practices from Kevlin Henney. At JAOO Aarhus 2008 Kevlin used a trash can, vampires, a train wreck, whiskey and much more to make you understand and remember his 13 constructive points (a programmer’s dozen) about programming and code smells.

The 13 points made by Kevlin were:

  • 0. Prefer code to comments.
  • 1. Follow a consistent form.
  • 2. Employ the contract metaphor.
  • 3. Express independent ideas independently.
  • 4. Encapsulate.
  • 5. Parameterize from above.
  • 6. Restrict mutability of state.
  • 7. Favor symmetry over asymmetry.
  • 8. Sharpen fuzzy logic.
  • 9. Go with the flow.
  • 10. Let code decide.
  • 11. Omit needless code.
  • 12. Unify duplicate code.

You can see a video of Kevlin’s presentation on the JAOO website.

ColdFusion is 13 years old. That make makes it the daddy of the web world! It does not make it any less hip or useful than the relatively new kids on the block.

Take this scenario. A company I once worked for had what can be described as a business directory built upon a licensed, yet bastardised, version of a popular ColdFusion-based CMS. It didn’t work that well! The decision was made to redevelop the application in Java. It took two years to reach the same level of functionality! What happened next? Ruby-on-Rails is what! The rest is history and beyond the topic of this post.

So, in effect, the application almost went full-circle in its development paradigm — both ColdFusion and Ruby-on-Rails can be considered Rapid Application Development environments, Java, certainly not. Why did the decision makers not stick with ColdFusion and put time aside to actually build it properly in the first place? To put it simply, they lost faith in ColdFusion; it was largely mis-understood.

The weakness of every programming language does not lie with the language itself per se — albeit it can have an important influencing factor — but rather with the ability, or indeed inability, of the developer to leverage the language in the most efficient and optimal way.

ColdFusion, like every other programming language has had and I’m sure still does have its fair share of poor developers; those people simply working with it as a means-to-an-end, rather than those passionate about the language, those people programming without understanding the fundamentals of programming or the implications of their poorly written code. This is apparent from .NET to Java, ColdFusion to Ruby, JavaScript to ActionScript.

Let’s not dilly-dally, bicker or insult one another about which is best, which one is dying and which one is not worth the computer it is compiled on. What is important is to understand the merits of each language and decide which one best suits the application, not only in technical terms, but also in terms of time-to-market, cost of development, availability of a skilled workforce etc.

ColdFusion, whether rightly or wrongly in some people’s opinion, can sit proudly amongst its peers and provide a truly compelling alternative.

Here’s how (in no particular order):

  1. Low Total Cost of Ownership – frequently, ColdFusion is described as expensive, it simply isn’t especially if you consider the natively supported functions. But to put it bluntly, if your company cannot afford the cost of ColdFusion standard, or indeed ColdFusion hosting, you have bigger things to worry about regarding the profitability of the company; you won’t be able to afford much of anything! The problem becomes not the product. ColdFusion applications are quicker to develop and developers are vastly cheaper to employ than their peers in Java or Ruby, just look at ITJobsWatch for examples.
  2. Rapid Application Development – ColdFusion vastly simplifies tasks. What would take other languages numerous lines of code to produce is efficiently encapsulated either in a tag or function or as a setting in the administrator. This is a simplistic yet indicative example: where else can you connected to a database simply with one line of code or indeed simply by name? ColdFusion changed the idea of specifying development time in terms of months and years to weeks and months or small features a matter of hours and days. Simplicity is not the mother or all evil. To be pragmatic, simplification reduces costs.
  3. Rich Internet Applications – ColdFusion may or may not have pioneered the RIA paradigm, but it has played a significant supporting role to Flash and now Flex. ColdFusion natively supports Flash remoting, providing the all important data access tier.
  4. Platform Maturity – ColdFusion 8 is built upon the latest version of Java (1.6). Along with internal improvements to the ColdFusion application, this has afforded ColdFusion unprecedented speed improvements and stability.
  5. Language Maturity – with each major release of ColdFusion comes many language enhancements added to the core. This means that previous addons, for example image manipulation, which came at a premium are now standard. Adobe and other companies that produce CFML engines are now participating in a CFML advisory committee, which aims to set standards for the core language. This is not only a sign of maturity but a letter of intent by the industry that will mean your application will work on any engine, assuming no proprietary functionality is used.
  6. The Ultimate Middleware – ColdFusion sits comfortably between any backend and front end system. Be it interfacing with a host of databases, Java, .NET, COM, Corba or connecting to classic HTML or rich Flash, Flex and AJAX frontends with little or no configuration.
  7. Feature Rich – what other web technology natively supports PDF generation, charting, enterprise-level search, AJAX, image manipulation, Atom and RSS creation, Zip and JAR file manipulation, a server monitor, Flex integration, encryption libraries, all important database connectors, webservice creation, XML manipulation, inbuilt reporting application (similar to Crystal Reports), email, FTP to name but a few? I hazard a guess at none, unless you’re happy to pay a premium.
  8. Platform Independent – since ColdFusion 6, when Macromedia redeveloped the entire application in Java, ColdFusion has been platform independent. You can install it on practically any machine.
  9. OpenSource Alternatives – BlueDragon and Railo are both significant alternatives to Adobe ColdFusion and both have opensource alternatives, the latter of the two having recently joined the JBoss community. Adobe are also considering providing a free edition to academic institutions.
  10. The Future – many commentators have mentioned Hibernate as a significant addition to the next release of ColdFusion, version 9. But having seen the prerelease notes, that is not all that will be added. Alas I’m under NDA, but rest assured, there is going to be a significant intake of breath when developers get hold of the next release. ColdFusion 8 was firmly geared towards middle management with fuzzy additions, ColdFusion 9 is set to re-address the balance with compelling language and functionality enhancements.

ColdFusion evangelism needs to step up a gear! Adobe certainly doesn’t afford much marketing budget to the product, prefering The Community do the hard work. It is not always easy convincing the decision makers that ColdFusion is a good product of choice, without Adobe’s unnerving support, but we have to work hard, break down those barriers, encroach on events outside the comfortable sphere of the ColdFusion world and demonstrate ColdFusion’s match-winning ability.

ColdFusion isn’t dying, it’s simply niche. Every niche has its place.

UPDATE: If you would like to view the ensuing debate regarding ColdFusion prompted by Aral Balkan, feel free to do so. This post should serve as a positive reminder of ColdFusion’s virtues, alongside the need for a balanced and polite debate.

For the seasoned Flex developer, we’ve been accustomed to using the Flex Component Explorer as a reference. However, this is set to change with a great new application called Tour de Flex.

Tour de Flex is a desktop application, built using AIR, with the goal of providing a way to explore Flex’s capabilities and resources, including the core Flex components, Adobe AIR and data integration.

Created by James Ward, Greg Wilson and Christophe Coenraets, Tour de Flex has three main purposes: provide non-Flex developers with an overview of what is possible; provide seasoned Flex developers with a visual reference tool; and finally, provide commercial and non-commercial Flex developers a platform to showcase their skills.

Probably the greatest feature of this application is the integration of a variety of third-party components, effects and skins. The application contains examples from the following and we are told that this list will be regularly updated when new content becomes available:

  • Acrobat.com Share
  • Amazon
  • AOL Instant Messenger
  • Cocomo
  • Ebay
  • Flickr
  • Google Language
  • Intuit Quickbase
  • Last.fm
  • Photoshop.com
  • Salesforce.com
  • Scribd
  • Smugmug
  • Twitter
  • Yahoo Weather

Below is a selection of screenshots from the application:

(Click on the images to see a larger view)

Included with the Tour de Flex project is an Eclipse plugin, built by Holly Schinsky, that provides a search interface to the 200+ examples available in the main Tour de Flex application. The plugin allows you to search by component name, tag or author and double-click any item in the results to immediately see the component in Tour de Flex.

To install the plugin, add the following URL to your Eclipse software update sites:

http://tourdeflex.adobe.com/eclipse.

Once installed, a new Tour de Flex view is available to add. The plugin has been tested with Eclipse 3.4 and with Flex Builder 3.x.

The official Tour de Flex page and install can be found on the Flex.org website.

Whether you are new to Adobe ® Flex ® or have been developing for a while, frameworks can help you get organised quickly.

Below is a list of Flex and AIR frameworks that will allow you to get up and running and develop highly-collaborative applications. The introductions are by the frameworks themselves, but I’d like to here from you about your experiences using them.

Cairngorm

Cairngorm is the lightweight micro-architecture for Rich Internet Applications built in Flex or AIR. A collaboration of recognized design patterns, Cairngorm exemplifies and encourages best-practices for RIA development advocated by Adobe Consulting, encourages best-practice leverage of the underlying Flex framework, while making it easier for medium to large teams of software engineers deliver medium to large scale, mission-critical Rich Internet Applications.

More information can be found on the Cairngorm project’s website.

PureMVC

PureMVC is a lightweight framework for creating applications based upon the classic Model-View-Controller concept.

Based upon proven design patterns, this free, open source framework which was originally implemented in the ActionScript 3 language for use with Adobe Flex, Flash and AIR, has now been ported to nearly all major development platforms.

Two versions of the framework are supported with reference implementations; Standard and MultiCore, though only the Standard version has been ported to other languages so far.

More information can be found on the PureMVC project’s website.

Mate

Mate is a tag-based, event-driven Flex framework.

Flex applications are event-driven. Mate framework has been created to make it easy to handle the events your Flex application creates. Mate allows you to define who is handling those events, whether data needs to be retrieved from the server, or other events need to be triggered.

In addition, Mate provides a mechanism for dependency injection to make it easy for the different parts of your application to get the data and objects they need.

More information can be found on the Mate project’s website.

Swiz

Swiz is a framework for Adobe Flex that aims to bring complete simplicity to RIA development. Swiz provides Inversion of Control, event handing, and simple life cycle for asynchronous remote methods. In contrast to other major frameworks for Flex, Swiz imposes no J2EE patterns on your code, no repetitive folder layouts, and no boilerplate code on your development. Swiz represents best practices learned from the top RIA developers at some of the best consulting firms in the industry, enabling Swiz to be simple, lightweight, and extremely productive.

More information can be found on the Swiz project’s website.

Guasax

Guasax is an ease of use programming framework which provides the creation of an ordered and scalable application with Adobe Flex. The lifecycle of the Guasax framework is based in the MVC pattern to take on our program actions. The Guasax framework helps you to maintain your business logic tier highly decoupled from your presentation logic tier.

Guasax takes reflection and introspection techniques as well as the Inversion of Control (IoC) pattern to execute the operations which we have pointed at and to make a decision about itself. Guasax is not intrusive on your class model. You don’t have to extend your classes in a framework class to use it.

More information can be found on the Guasax project’s website or on their Google code project.

Model-Glue: Flex

Model-Glue: Flex brings implicit invocation, Model-View-Controller design, and cleaner, less repetitive integration with backend services to Flex and AIR applications.

It shuns repetitive, boilerplate code in favor of helper classes and expressive APIs.

More information can be found on the Model-Glue: Flex project’s website.

Gaia

Gaia is an open-source front-end Flash Framework for AS3 and AS2 designed to dramatically reduce development time.

Gaia is targeted at anyone who develops Flash sites. It provides solutions to the challenges and repeated tasks faced with front-end Flash site development, such as navigation, transitions, preloading, asset management, site structure, deep linking and SEO. It provides speed and flexibility in your workflow and a simple API that gives you access to its powerful features.

More information can be found on the Gaia Framework’s website.

UPDATE: Some more frameworks that I overlooked.

Parsley

Parsley is an application framework for Flex/Flash/AIR applications written in AS3. It contains the following modules:

IoC Container (Configuration and Dependency Injection) – Inspired by the Spring Framework it brings the concept of anIoC(Inversion of Control) container to ActionScript. It is useful for configuration and wiring of applications. It helps building a well structured architecture and decoupling the individual building blocks of your application. Configuration is based on XML files.

MVC Framework – The MVC (Model View Controller) framework helps decouple the view layer from other parts of the application. It borrows the concept of a FrontController from Cairngorm, but instead of advocating the use of BusinessDelegate and ServiceLocator patterns, the framework integrates the FrontController with the IoC container.
More information can be found on the Parsley Framework’s website.

Prana

Prana is an Inversion of Control (IoC) Container for ActionScript 3.0, and more specifically the Flex framework. It enables you to configure objects and components in a non-intrusive way by describing them in an external XML document and having them loaded at runtime.

At its core is a Spring-ish application context and IoC container. The XML dialect for the application context is aimed to be Spring compliant.

The framework also contains utility classes for configuring and extending Cairngorm and PureMVC applications, a Reflection API and general utilities.

More information can be found on the Prana Framework’s website.

Arp

Arp is a pattern-based framework for Flash and Flex. It supports both ActionScript 2 and ActionScript 3.

More information can be found on the Arp project’s page on the Open Source Flash website.

In the past, the US has held a near monopoly not only in ColdFusion-based user groups, but also conferences, with CFUnited, cf.Objective() and the more general Adobe MAX leading the way.

But the landscape is changing and the UK is challenging for its share of the scene. 2008 is seeing a renaissance in the ColdFusion world following on from the buzz created around the release of ColdFusion 8 in 2007 and the eagerly anticipated future release of ColdFusion, codenamed Centaur. This buzz has resulted in not one but three conferences for 2008: CFUnited Europe was held in London in March, Scotch-on-the-Rocks was held in Edinburgh in June and soon we will see the return of CFDevCon.

The inaugural CFDevCon one-day-conference was held back in 2006, in Croydon, but in September 2008 it is heading down to what is arguably one of the creative capitals in the south of England, Brighton. The conference has not only become a two-day conference, but its scope has moved beyond simply Adobe-based products, with the introduction of Microsoft-based technologies, specifically IIS7.0, Silverlight and SQL Server 2008 and technology-agnostic topics such as Regular Expressions, Search Engine Optimisation (SEO) and Accessibility.

As with all great conferences, CFDevCon has a great line-up of speakers with the likes of Sean Corfield, Hal Helms, Peter Elst, Peter Bell, Aral Balkan and Simon Bailey, to name a few, all presenting sessions.

So, lets get excited people, support the conferences and user groups and evangelise ColdFusion.

Adobe has progressively been developing an online presence with Buzzword, Share, Brio and Photoshop Express. But the online presence falls short of important spreadsheet and presentation applications.

So who could the contenders be? Here are two extremely promising applications built on the Flash platform:

SlideRocket

SlideRocket LogoSlideRocket is a rich Internet application, built on the Flash platform, that provides for every part of the presentation lifecycle. It integrates authoring, asset management, delivery and analytics tools into a single hosted environment that allows you to quickly create stunning presentations, intelligently manage your assets, securely share your slides, and measure the results.

There are already a number of companies that are striving to be the web-based presentation application of choice, including Google, Zoho and Empressr.

SlideRocket is the first online productivity application that embraces business level features such as collaboration, robust security, dynamic data binding and business integration with applications like Salesforce.com. SlideRocket aims to differentiate itself from other presentation products by including a community marketplace where content and services can be shared and transacted. SlideRocket also embraces the best of the Internet with features like asset tagging, web content mashups, embedded data services and seamless rich media support.

It’s absolutely one of the best presentation creation applications out there. And because it’s built on rich Internet application technologies you can add interactivity and create a cinematic experience that I haven’t seen done any where else.

Ryan Stewart, Adobe’s Rich Internet Evangelist writing in ZDNet – SlideRocket – the king of presentation applications.

SlideRocket - main presentation screenSlideRocket - incorporating videoSlideRocket - adding Flickr to the librarySlideRocket - manipulating images

(click on the images for more detail)

SlideRocket has been designed from the ground up with extensibility and portability in mind as well. To this effect, third party developers will be able to build components into slideshows using the application’s APIs, creating compelling presentations.

You can find more information on the SlideRocket website.

blist

Blist LogoBlist makes it easy for anyone to create private or collaborative databases.

Blist is not alone in the online database market. Zoho DB, DabbleDB and Trackvia are all web-based tools that provide users the ability to create and administer databases.

Although Blist’s simplicity makes it seem like you’re not dealing with anything more complicated than an online spreadsheet, the Blist user interface is actually hiding a complex relational database backend.

Unlike other online database systems, such as Zoho DB, using Blist doesn’t require the user to know SQL to use all it has to offer. This makes Blist great for users who need more than an Excel spreadsheet, but who don’t want to delve into the complexities of a database software application like Access.

Blist BetaBlist BetaBlist BetaBlist Beta

(click on the images for more detail)

Blist’s focus on making database creation and management a straightforward process, built on an always available, rich Internet application suggests it can fill a niche. Demand will prove the depth of such a niche, but if it grabs enough attention from people as regular users, it will become an extremely interesting prospect for acquisition.

You can find more information on the blist website.

The ActionScript reference for rich Internet application development provides an alphabetical reference for all native ActionScript APIs for the Adobe technology platform runtimes: Adobe Flash Player and Adobe AIR—as well as the Adobe Flex framework APIs. Use this guide both as an API reference and a tool to learn about the ActionScript APIs available within the runtimes.

Download the ActionScript reference for RIA development (PDF 1.3MB)

The Adobe technology platform contains two primary runtimes. Flash Player is browser-based, and Adobe AIR is desktop-based. Because Adobe AIR is built on top of Flash Player, the Flash Player APIs are available within Adobe AIR. Consequently, Adobe AIR APIs are not available within Flash Player. The Flex framework is built on top of the Flash Player APIs, so it runs in both Flash Player and Adobe AIR. However, a number of Flex APIs take advantage of AIR APIs, and thus work only within Adobe AIR.

More information about this guide can be found on the Adobe Developer Centre Website.

Adobe AIR LogoSince the Adobe Integrated Runtime (AIR) was released at the end of February, we now have a stable platform on which to build desktop applications with our existing web skills. A number of people have already started and the Adobe AIR Marketplace is filling with AIR applications by the day.

So what is the big deal? The Adobe marketing team state that:

The Adobe AIR runtime lets developers use proven web technologies to build rich Internet applications that deploy to the desktop and run across operating systems. Adobe AIR offers an exciting new way to engage customers with innovative, branded desktop applications, without requiring changes to existing technology, people, or processes.

What AIR applications should you check out?

What is intriguing is that all the tools I have chosen are generally useful tools for the developer or designer, with the exception of twhirl, which is a social-interaction tool. I’m looking forward to when other, less developer-centric tools become freely available. AgileAgenda has taken the lead with this respect, albeit not freely available, as has eBay desktop, but I would like to see examples from the BBC in the form of a desktop BBC iPlayer or maybe a Flickr image browser, del.icio.us bookmark reader, RSS aggregator and a Picnik image editor.

Analytics Reporting Suite

Google Analytics Reporting SuiteThe Analytics Reporting Suite, by Nicolas Lierman, brings Google Analytics to the desktop. It uses it’s own custom API to interact with Google and nearly implements all the features of Analytics.

For website owners this is a must-have application. Like the twhirl AIR application below, it is a fantastic example of what can be achieved with Flex and AIR. Measuring visitor trends and traffic are essential tasks to managing and improving a websites performance. The Analytics Reporting Suite allows you to configure multiple Google’s Analytics accounts and access the web-based suite’s plethora of features via a desktop application. The application displays integrated graphs and animations via a tabbed interface, which allows you switch between a number of reports. These reports can then be saved as a PDF, Excel or XMLdocument, or printed.

You can download and install the application from the About Nico website.

twhirl twitter Client

Twhirl Logotwhirl, by Marco Kaiser, is probably the most popular desktop client for the twitter micro-blogging service. Most of the features available on the twitter website are accessible through twhirl, plus, a lot of usability enhancements have been added to make it easier to manage multiple accounts. This is great for those who want to separate business and personal accounts they may have.

The twhirl application is a great example of how AIR can bring web applications to the desktop; it can dock to the system tray, display message alerts and you can configure the applications opacity when not focused (great if you like Mac and Vista-styled themes). The application allows you to search twitter users, view their timelines, add friends, view followers, delete tweets and much much more. Twhirl automatically fetches your friends’ status updates, direct messages and replies, whilst also colour coding different types of messages and alerting you to messages both audibly and visually.

The twhirl application is skinnable and comes with several built in skins with which you can customise the application. All-in-all twhirl is not only one of the best twitter clients, but AIR applications.

You can download and install the application from the twhirl website.

Kuler Desktop

Adobe Kuler LogoAdobe kuler is the first web-hosted application from Adobe Labs designed both to stand alone and to complement Adobe Creative Suite software. Built using Adobe Flash and ActionScript 3.0, kuler is all about colour: colour for exploration, inspiration, experimentation and sharing. Kuler is clearly targeted at the designer, but anyone interested in colour will benefit from its use.

You can download and install the application from the Adobe Labs website.

WebKut

WebKut LogoWebKut is a web screenshot tool that allows you to capture web pages, or parts of them in a very simple way. It provides you with 3 capture options: the entire page, the current view, or only a selection. This little application proves particularly handy for those presentations or projects that need great visuals from the web.

You can download and install the application from the WebKut website.

RichFLV

RichFLV, by Benjamin Dobler, lets you edit FLV files. The key features include reading FLV metadata, read and edit cuepoints, cut FLV files, convert the sound from an FLV to MP3 format, convert an FLV to an SWF … and much more.

You can download and install the application from the Adobe AIR Marketplace website.

SearchCoders Dashboard

SearchCoders LogoThis Flex-based chat widget is designed with programmers in mind. The code input feature allows developers to chat about code without disrupting the conversation.

You can download and install the application from the SearchCoders website.

Pownce

Pownce LogoMuch like twhirl in look, feel and ease-of-use, but with a slant towards productivity rather than micro-blogging, Pownce is a way to keep in touch and share things with your friends or colleagues. You can send people files, links, events, and messages and then have real conversations with the recipients. This is a great collaboration tool and was one of the first services to really embrace AIR as an application architecture, which could realise their service as a desktop client. Everything that is available via the Pownce website is also available via the client application, except and possibly importantly, the ability for the user to amend their account settings and add friends to your network; this still has to be done via the website.

For a small annual amount, Pownce offers a paid-for service which will eliminate adverts from your profile and allow you to send huge file sizes (100MB) and customise the theme of your Pownce.

Pownce also offers Drupal integration and a mobile application, which works with the iPhone, BlackBerries and many more ‘internet-ready’ mobile devices.

You can download and install the application from the Pownce website.

For a long time now Adobe’s Flex IDE has been the one of the only tools for developing ActionScript 3 applications. Now there is an alternative in the form of PowerFlasher’s FDT 3.0.

Developed for internal by PowerFlasher, the FDT (Flash Development Tool) wowed freelancers so much that the company decided to launch it as a commercial product. Like Flex Builder, FDT is built upon the Eclipse framework and therefore has many similarities with other Eclipse-based tools, not least JDT upon which it is based.

It is great to see competing tools out there on the market and it can only serve to strengthen the popularity of the technology.

PowerFlasher’s tool can be found at http://fdt.powerflasher.com. It is really worth a look.

Whether you love it or you hate it, LinkedIn for Groups now has the UK Adobe User Groups for ColdFusion, Flex and Flash.

The ColdFusion, Flex and Flash User Groups represent a central information resource for all UK Adobe developers. With the increasing importance of Rich Internet Applications, Rapid Application Development, the popularity Adobe software and industry recognition of the ColdFusion, Flex, Flash and AIR products, these user groups assist developers in defining their role within the Adobe and wider community. These groups aim to provide information resources and a chance to meet fellow developers and network within the community.

To join the groups and start networking, simply click on the appropriate link below:

UK ColdFusion User Group:

http://www.linkedin.com/e/gis/27811/79F5911ECBBE

UK Flex User Group:

http://www.linkedin.com/e/gis/27255/6343D73C42C2

UK Flash User Group:

http://www.linkedin.com/e/gis/27401/0E94A97A7DD4

The Flex and Flash User Group websites are still being designed/developed, but you can email them at

info [at] ukfxug [dot] org

info [at] ukflug [dot] org

respectively with ideas on what you would like to see on each site.

« Older entries