With the release of ColdFusion MX 7 came the introduction of the Application.cfc ColdFusion component. This component replaced the traditional Application.cfm and OnRequestEnd.cfm ColdFusion application templates. Furthermore, if Application.cfc is present, both of these templates are ignored by the application.

In addition to replacing the Application.cfm, the Application.cfc introduced a number of built in methods that handle specific events. These events, as discussed in detail below, allow for a greater control over events within the application.

Application Variables

The THIS scope in the Application.cfc contains several built-in variables that allow you to set the properties of the application.

The following cfscript briefly outlines the variables that you can set to control the application’s behaviour.

<cfscript>
//the application name (should be unique)
THIS.name = "ApplicationName";
//how long the application variables persist
THIS.applicationTimeout = createTimeSpan(0,2,0,0);
//define whether client variables are enabled
THIS.clientManagement = false;
//where should we store them, if enabled?
THIS.clientStorage = "registry"; //cookie||registry||datasource
//define where cflogin information should persist
THIS.loginStorage = "session"; //cookie||session
//define whether session variables are enabled
THIS.sessionManagement = true;
//how long the session variables persist?
THIS.sessionTimeout = createTimeSpan(0,0,20,0);
//define whether to set cookies on the browser?
THIS.setClientCookies = true;
//should cookies be domain specific
//i.e. *.domain.com or www.domain.com
THIS.setDomainCookies = false;
//should we try to block cross-site scripting?
THIS.scriptProtect = false;
//should we secure our JSON calls?
THIS.secureJSON = false;
//use a prefix in front of JSON strings?
THIS.secureJSONPrefix = "";
//used to help ColdFusion work with missing files
//and directory indexes. tells ColdFusion not to call
//onMissingTemplate method.
THIS.welcomeFileList = "";
//define custom coldfusion mappings.
//Keys are mapping names, values are full paths
THIS.mappings = structNew();
//define a list of custom tag paths.
THIS.customTagPaths = "";
</cfscript>

Method Summary

Below is a brief discussion of the built-in event methods available to the Application.cfc. Since the Application.cfc is a regular ColdFusion component, you can also implement your own methods alongside the built in ones (assuming the names are uniquely different).

The onApplicationStart Method

Runs when the application first starts up: when the first request for a page is processed or the first CFC method is invoked by an event.

<cffunction name="onApplicationStart" returnType="boolean" output="false">
	<cfreturn true />
</cffunction>

This method is typically used to initialise code; for example to to set variables, such as datasource, into the APPLICATION scope, or create Singleton instances of ColdFusion components.

For example:

The following example creates structures in tha application scope to store general configuration settings and Singleton objects that can be later referenced by the application framework.

<cffunction name="onApplicationStart" returnType="boolean" output="false">
	<cfscript>
	// INITIALISE CONFIGURATION VARIABLES AND APPLICATION BUSINESS COMPONENTS
	// **********************************************************************
	// LOAD COMMON SITE VARIABLES INTO APPLICATION SCOPE
	// create structure to hold configuration settings
	APPLICATION.strConfig = structNew();
	//site-wide datasource(s)
	APPLICATION.strConfig.datasource = "DatasourceName";
	// default records per page for pagination
	APPLICATION.strConfig.recordsPerPage = 15;
	// **********************************************************************
	// LOAD PERSISTENT OBJECTS INTO APPLICATION SCOPE
	// data for object instantiation
	strArgs	= structNew(); // flush strArgs
	strArgs.datasource = APPLICATION.strConfig.datasource;
 
	// create structure to hold objects
	APPLICATION.strObjs = structNew();
	APPLICATION.strObjs.objUserManager = createObject("component","com.whatley.user.UserManager").init(argumentCollection=strArgs);
	//etc...
 
	// instantiate utility service objects
	APPLICATION.strObjs.objEmailServices = createObject("component","com.whatley.service.Email");
	APPLICATION.strObjs.objFileServices = createObject("component","com.whatley.service.File");
	APPLICATION.strObjs.objQueryServices = createObject("component","com.whatley.service.Query");
	//etc...
 
	// native coldfusion objects
	APPLICATION.strObjs.objServiceFactory = createObject("java","coldfusion.server.ServiceFactory");
 
	// **********************************************************************
	return true;
	</cfscript>
</cffunction>

Since the objects above are created as Singletons, we do not have to create or destroy objects throughout the application, but simply reference the object held in memory. This is efficient, but of course, would not be suitable for per-session objects, such as shopping carts.

For example:

Referencing and invoking an object from the APPLICATION scope:

<cfinvoke object="APPLICATION.strObjs.objUserManager" method="getUser" returnvariable="qryGetUser">
	<cfargument name="userId" value="#SESSION.strUser.userId#" />
</cfinvoke>

The onApplicationEnd Method

Runs when the application stops: when the application times out or the service is stopped.

<cffunction name="onApplicationEnd" returnType="void" output="false">
	<cfargument name="applicationScope" required="true" />
</cffunction>

This method is typically used to clean-up currently activities, save the current state of the application to a database or log the application’s end to a file. The latter can be useful to help determine when and why an application ended.

Below is a simple example of how you could implement a simple log:

<cffunction name="onApplicationEnd" returnType="void" output="false">
	<cfargument name="applicationScope" required="true" />
        <cflog file="#THIS.Name#" type="Information"
        	text="Application #ARGUMENTS.applicationScope.applicationName# Ended" />
</cffunction>

Notes:

  • The method is not associated with an individual request so you cannot use it to display data to a user.
  • If you call this method explicity, ColdFusion does not end the application, but does execute the code within the method.
  • The method can access the SERVER scope directly, but does not have access to the SESSION and REQUEST scopes.

The onMissingTemplate Method

Triggered when the user requests a ColdFusion template that doesn’t exist.

<cffunction name="onMissingTemplate" returnType="boolean" output="false">
	<cfargument name="targetpage" required="true" type="string" />
	<cfreturn true />
</cffunction>

ColdFusion invokes this method when it encounters a file not found condition, that is, when a URL specifies a CFML page that does not exist. This is an important addition to ColdFusion 8 and allows missing template errors (also known as HTTP 404 errors) to be captured more efficiently by the application framework.

The onRequestStart Method

Runs before the request is processed.

<cffunction name="onRequestStart" returnType="boolean" output="false">
	<cfargument name="thePage" type="string" required="true" />
	<cfreturn true />
</cffunction>

This method is great for user authorisation and login handling and for request specific variable initialisation. For example, you could use this method to log statistics to a database (performance and usage).

As this method runs at the beginning of a request, we can also use it to fire other events. In the example below, I reinitialise the Application which enables me to refresh objects held in memory that may have changed during code development or release.

<cffunction name="onRequestStart" returnType="void" output="false">
	<cfscript>
	//flush the application scope
	if ((CGI.server_name == "localhost") || (structKeyExists(URL,'refresh') && structKeyExists(URL,'password') && URL.password == "p455w0rd"))
	{
		onApplicationStart();
	}
	return true;
	</cfscript>
</cffunction>

The onRequest Method

Runs before the request is processed, but after onRequestStart.

<cffunction name="onRequest" returnType="void">
	<cfargument name="thePage" type="string" required="true" />
	<cfinclude template="#ARGUMENTS.thePage#" />
</cffunction>

This event handler provides an optional request filter mechanism for ColdFusion page requests. Use it to intercept requests to target pages and override the default behavior of running the requested pages. You can use this method to do preprocessing that is required for all requests. Typical uses include filtering and modifying request page contents (such as removing extraneous white space), or creating a switching mechanism that determines the exact page to display based on available parameters.

The onRequestEnd Method

Runs at the end of the request when all pages have been processed.

<!--- Runs at end of request --->
<cffunction name="onRequestEnd" returnType="void" output="false">
	<cfargument name="thePage" type="string" required="true" />
</cffunction>

This method can be useful for gathering performance metrics, or for displaying dynamic footer information (although I wouldn’t generally put display code in an Application.cfc).

For example:

Log the CGI variables to a database table.

<cffunction name="onRequestEnd" returnType="void" output="false">
	<cfset var qryInsertStats = queryNew('tempCol')>
	<cfquery name="qryInsertStats" datasource="#APPLICATION.strConfig.datasource#">
	INSERT INTO tbl_site_stats (template,query_string,referer,user_agent,remote_addr,datetime)
	VALUES
	(
		<cfqueryparam value="#CGI.PATH_INFO#" cfsqltype="cf_sql_varchar" />
		<cfqueryparam value="#CGI.QUERY_STRING#" cfsqltype="cf_sql_varchar" />
		<cfqueryparam value="#CGI.HTTP_REFERER#" cfsqltype="cf_sql_varchar" />
		<cfqueryparam value="#CGI.HTTP_USER_AGENT#" cfsqltype="cf_sql_varchar" />
		<cfqueryparam value="#CGI.REMOTE_ADDR#" cfsqltype="cf_sql_varchar" />
		<cfqueryparam value="#now()#" cfsqltype="cf_sql_datetime" />
	)
	</cfquery>
</cffunction>

The onError Method

Triggered when an error is encountered that is not caught by a try/catch block.

<!--- Runs on error --->
<cffunction name="onError" returnType="void" output="false">
	<cfargument name="exception" required="true" />
	<cfargument name="eventname" type="string" required="true" />
	<cfdump var="#ARGUMENTS#" />
        <cfabort />
</cffunction>

This method is used to handle errors in an application-specific manner. This method overrides any error handlers that you set in the ColdFusion Administrator or in cferror tags. It does not override try/catch blocks.

For example:

The following displays a friendly, static error page to the user if it is not a development server whilst also logging the error. If the error is on development, simply dump the error to screen for debugging.

<cffunction name="onError" returnType="void" output="true">
	<cfargument name="exception" required="true" />
	<cfargument name="eventName" type="string" required="true" />
	<cfif CGI.server_name neq "localhost" and CGI.server_name neq "127.0.0.1">
		<!--- Live application, handle error --->
		<cfinclude template="error/error.htm">
		<!--- Log all errors. --->
	        <cflog file="#THIS.Name#" type="error"
	            text="Event Name: #ARGUMENTS.Eventname#" >
	        <cflog file="#THIS.Name#" type="error"
	            text="Message: #ARGUMENTS.Exception.message#">
	        <cflog file="#THIS.Name#" type="error"
	            text="Root Cause Message: #ARGUMENTS.Exception.rootcause.message#">
	<cfelse>
		<!--- dump error for Staging and Development --->
		<cfif len(ARGUMENTS.eventName)>
			<cfdump var="#ARGUMENTS.eventName#" />
		</cfif>
		<cfdump var="#ARGUMENTS.exception#" />
	</cfif>
</cffunction>

The onSessionStart Method

Runs when your session starts.

<cffunction name="onSessionStart" returnType="void" output="false">
</cffunction>

This method is used for initialising SESSION-scoped data, such as a shopping basket and application form.

For example:

<cffunction name="onSessionStart" returnType="void" output="false">
	<cfscript>
	SESSION.start = now();
	SESSION.strShoppingBasket = structNew();
	SESSION.strShoppingBasket.items = 0;
	</cfscript>
</cffunction>

The onSessionEnd Method

Runs when session ends

<cffunction name="onSessionEnd" returnType="void" output="false">
	<cfargument name="sessionScope" type="struct" required="true" />
	<cfargument name="appScope" type="struct" required="false" />
</cffunction>

Use this method for any clean-up activities when the session ends. A session ends when the session is inactive for the session time-out period. You can, for example, save session-related data, such as shopping basket contents or whether the user has not completed an order, in a database, or do any other required processing based on the user’s status. You might also want to log the end of the session, or other session related information, to a file for diagnostic use.

Adobe Livedocs has a whole section dedicated to the Application.cfc.

I have created an example Application.cfc, which is available for download.

Download the SQL Server 2005 JDBC Driver 1.2, a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in J2EE (Java2 Enterprise Edition).

This release of the JDBC Driver is JDBC 3.0 compliant and runs on the Java Development Kit (JDK) version 1.4 and higher. It has been tested against all major application servers including BEA WebLogic, IBM WebSphere, JBoss, and Sun.

Following a conversation with a friend regarding how ColdFusion handles arrays and structures in ‘the background’, I was interested to find out what Java classes each were mapped to. This was a relatively simple case of using the functions getClass(), getSuperClass() and getName() to parse out the name of the Java classes.

<!--- Arrays (repeat up the hierarchy) --->
<cfdump var="#arrayNew(1).getClass().getName()#">
<cfdump var="#arrayNew(1).getClass().getSuperClass().getName()#">
<!--- Structures (repeat up the hierarchy) --->
<cfdump var="#structNew().getClass().getName()#">
<cfdump var="#structNew().getClass().getSuperClass().getName()#">

What became immediately apparent was that both were handled differently. In the case of a ColdFusion array, the parent class was the java.util.Vector, which seemed obvious. The Vector class implements a growable array of objects. Like an array, it contains components that can be accessed using an integer index. However, the size of a Vector can grow or shrink as needed to accommodate adding and removing items after the Vector has been created.

ColdFusion structures, however, are handled entirely differently, with the parent class being a coldfusion.runtime class. In fact, as we can see below, the code to handle a ColdFusion structure is entirely written for ColdFusion until the root class of java.lang.Object. Clearly ColdFusion does some complex wizardry to handle the complex nature of structues (associative arrays).

The class hierarchy for an Adobe ColdFusion array:

java.lang.Object
	java.util.AbstractCollection
		java.util.AbstractList
			java.util.Vector
				coldfusion.runtime.Array

The class hierarchy for an Adobe ColdFusion structure:

java.lang.Object
	coldfusion.util.CaseInsensitiveMap
		coldfusion.util.FastHashtable
			coldfusion.runtime.Struct

Being an inquisitive person, I applied the same code to Railo and BlueDragon, with equally interesting results.

The Java class hierarchy behind a Railo array:

java.lang.Object
	railo.runtime.type.ArrayImpl

The Java class hierarchy behind a Railo structure:

java.lang.Object
	railo.runtime.type.StructImpl

The Java class hierarchy behind a BlueDragon array:

java.lang.Object
	com.naryx.tagfusion.cfm.engine.cfData
		com.naryx.tagfusion.cfm.engine.cfJavaObjectData
			com.naryx.tagfusion.cfm.engine.cfArrayData
				com.naryx.tagfusion.cfm.engine.cfArrayListData

The Java class hierarchy behind a BlueDragon structure:

java.lang.Object
	com.naryx.tagfusion.cfm.engine.cfData
		com.naryx.tagfusion.cfm.engine.cfJavaObjectData
			com.naryx.tagfusion.cfm.engine.cfStructData

Adendum: Ben Nadel has a good little post on ColdFusion Data Types from Different Sources and How ColdFusion Sees Them.

New Atlanta is announcing today, at CFUnited Europe, a ColdFusion technology conference in London, U.K., that they will be creating and distributing a free open-source Java Platform, Enterprise Edition (Java EE) version of BlueDragon, their ColdFusion-compatible web application server.

You can read the full release here:

http://www.newatlanta.com/products/bluedragon/open_source/faq.cfm

Will Adobe follow suit with their ColdFusion server technology? They have done similar things with the Flex SDK and BlazeDS, so it stands to reason that ColdFusion could follow the same route.

Terrence Ryan sees things differently, however, and has a good article here:

Yawn, BlueDragon Goes Open Source.

When trying to install the latest version of Apache on my development machine, I was presented with the following error at the end of the installation:

Only one usage of each socket address (protocol/network address/port) is normally pemitted. 
make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to openlogs
Note the errors or messages above, and press the < ESC > key to exit.

Initially I thought it was a problem associated with Windows Vista (yes my development machine is a Vista PC!) and the previously installed IIS. However, after a lot of deliberating and Google searches, it appears that Skype was the culprit. Skype listens on port 80 and 443 for incoming requests. So to solve the problem I simply closed down Skype and re-installed Apache. As Apache was setup as a Windows service, no conflicts subsequently arise with Skype as Apache will start using the ports before Skype.

There is a setting in Skype under Tools > Options > Advanced > Connection called “Use port 80 and 443 as alternatives for incoming connections”. This is checked by default. Uncheck this to prevent conflicts with Apache.

Skype Advanced Connection Options

The Key Point: Stop Skype before installing Apache.

Installing PHP is a relatively simple task one would think. Indeed it is simple, but configuring the php.ini isn’t; at least not so on Windows Vista! It is infuriating when such a relatively simple task is made inordinately complicated because of the nuances of Vista permissions. What started out as a 5 minute task took a significant number of hours searching for a suitable answer on Google, and not only by myself.

The task I was trying to achieve was the installation of development versions of WordPress, Drupal, MediaWiki and Moodle, all of which would require a MySQL database. Trying to load the MySQL extension should have been a simple case of uncommenting the line in the php.ini and restarting the Apache service. With Vista, this was certainly not the case.

I set up a very simple page detailing the php configuration in an index.php file:

< ?php phpinfo(); ?>

This showed me the default configuration path of my php.ini and extensions directory, amongst a whole host of other information.

In both cases the paths were incorrect. First and foremost the configuration file path stated C:\Windows when in fact I had installed it in the root (C:\PHP5). So, although I was amending the php.ini file with the correct detail, Vista was using the default values. If there is no php.ini file in Windows, then you’ll continue banging your head against a brick wall.

The problems didn’t stop there. Moving the php.ini file to the Windows directory under Vista isn’t a simple copy and paste task. You need to be administrator. But Vista’s administrator priviledges are more pseudo than actual! In order to amend and save the php.ini file in the Windows directory, you must run Notepad as administrator and save the file as such. Voila! Everything then works. The phpinfo() function returned the correct installation detail and I could continue with the job I was meant to be doing.

PS. Thanks to Rob Douglas for his help.

Pre-requisites:

  1. Follow my instructions on installing Apache on Windows Vista
  2. And then follow my instructions on installing PHP on Windows Vista

Installing PHP with Apache on Windows Vista is a relatively simple task until you try an configure the settings in php.ini. Problems can occur and stem from the fact that when you install PHP and edit the php.ini file, you need to not only be logged in as Administrator, but run the installer and Notepad text editor as Administrator. The php.ini file also needs to be located in the Windows directory.

Below is an outline of the steps to get your PHP installation running and configured correctly.

  1. Run Notepad as Administrator. Go to All Programs > Accessories Right-click “Notepad” and select “Run as Administrator”. Open the php.ini file, in my case:
    C:\PHP5\php.ini
  2. Edit the php.ini file as necessary, e.g.:
    extension_dir = "C:\PHP5\ext"
    upload_max_filesize = 16M
    upload_tmp_dir = "C:\PHP5\upload"
    session.save_path = "C:\PHP5\session"
  3. Enable the extensions you need by deleting the semi-colon at the beginning of the line. For example, you will commonly need the following MySQL extensions:
    extension = php_mysql.dll
    extension = php_mysqli.dll
  4. Save the edited php.ini file into your Windows directory. This is very important as Vista will not read the changes but will refer to the default settings.
  5. Check that the PHP directory has been added to your computers “Environment Variables”. Click Start, right-click on Computer, select Properties > Advanced > Environment Variables. Click on PATH and select Edit. If the PHP path is there, in my case “C:\PHP5\”, all is well, otherwise add the PHP path.
    • System Properties:

      Vista System Properties

    • Environmental Variables

      Vista Environment Variables

    • Edit Environmental Variable - PATH

      Vista Edit Environmental Variable PATH

  6. Open your Apache configuration file (httpd.conf). Ensure the following lines are present (at the bottom of the file):
    LoadModule php5_module "C:\PHP5\php5apache2_2.dll"
    AddType application/x-httpd-php .php
    AcceptPathInfo on
    PHPIniDir "C:\Windows"

    If there are additional LoadModule lines, remove them, leaving only the one that relates to your version of Apache.

  7. Find the DirectoryIndex in the Apache config and append index.php, e.g.:
    <ifmodule dir_module>
    	DirectoryIndex index.html index.php
    </ifmodule>
  8. Restart the Apache service.
  9. Create a index.php file in your webroot and add the following lines:
    < ?php phpinfo(); ?>
  10. Navigate to the file (e.g. http://localhost/index.php) and you will be presented with all the PHP and server settings. You’re now good to go.

  1. Download the current version of PHP from http://www.php.net/downloads.php. Get the Windows installer (in my case version 5.2.5).
  2. Uninstall any previous versions of PHP. Delete any extraneous remaining directories.
  3. Disable antivirus and firewall software.
  4. Disable Windows Defender.
  5. Disable User Account Control (UAC).
  6. Use the command prompt to manually run the PHP installer. Go to All Programs > Accessories Right-click “Command Prompt” and select “Run as Administrator”.

    Browse to the location of the PHP install file e.g.:

    C:\Users\Simon\Desktop\
  7. In the command prompt type:

    C:\Users\Simon\Desktop\msiexec /i php-5.2.5-win32-installer.msi

    And hit the [Enter] button.

  8. The installer should start and you should see the screenshot below. Click “Next”.

    PHP Install - Step 1

  9. Read and accept the terms of the license agreement and click “Next”.

    PHP Install - Step 2

  10. Choose your install folder and click “Next”.

    PHP Install - Step 3

  11. Choose the web server you wish to setup. In my case I will be using Apache 2.2.x. Click “Next”.

    PHP Install - Step 4

  12. Browse to the Apache Configuration Directory. In my case this is:

    C:\Program Files\Apache Software Foundation\Apache2.2\conf\

    Click “Next”.

    PHP Install - Step 5

  13. Choose the items to install. In my case I have chosen to install all items. Click “Next”.

    PHP Install - Step 6

  14. PHP is now ready to install.

    PHP Install - Step 7

  15. The installation is now complete. The next task is to configure PHP.

    PHP Install - Step 8

Silverlight aims to compete with Adobe Flash and the presentation components of AJAX. It also competes with Sun Microsystems’ JavaFX, which was launched a few days after Silverlight.

Microsoft Silverlight is a proprietary runtime for browser-based Rich Internet Applications, providing a subset of the animation, vector graphics, and video playback capabilities of Windows Presentation Foundation. The runtime is available for Microsoft Windows and Mac OS X, with Linux support under development via the third-party Moonlight runtime.

Microsoft describes its advantages as follows:

Compelling Cross-Platform User Experiences

  • Deliver media experiences and rich interactive applications for the Web that incorporate video, animation, interactivity, and stunning user interfaces.
  • Seamless, fast installation for users, thanks to a small, on-demand, easy-to-install plug-in that is under 2 megabytes (MB) in size and works with all leading browsers.
  • Consistent experiences between Windows-based and Macintosh computers without any additional installation requirements.
  • Create richer, more compelling Web experiences that take greater advantage of the client for increased performance.
  • Stunning vector-based graphics, media, text, animation, and overlays that enable seamless integration of graphics and effects into any existing Web application.
  • Enhance existing standards/AJAX-based applications with richer graphics and media, and improve their performance and capabilities by using Silverlight.

Flexible Programming Model with Collaboration Tools

  • Based on the Microsoft .NET Framework, Silverlight enables developers and designers to easily use existing skills and tools to deliver media experiences and rich interactive applications for the Web.
  • Simple integration with existing Web technologies and assets means Silverlight works with any back-end Web environment or technology. No “rip and replace” required.
  • Silverlight integrates with your existing infrastructure and applications, including Apache, PHP, as well as JavaScript and XHTML on the client.
  • Choice of development languages including JavaScript, Ruby, Python, C#, Visual Basic .NET, and more.
  • Role-specific tools for both designers and developers that take advantage of Web standards and the breadth of the Microsoft .NET–connected software features.
  • For designers: Microsoft Expression Studio for creating interactive user interfaces and media rich experiences, preparing media for encoding and distribution, and creating World Wide Web Consortium (W3C) standards-compliant sites using modern XHTML, XML, XSLT, CSS, and ASP.NET.
  • For developers: Microsoft Visual Studio for developing client and server code with full Microsoft IntelliSense, powerful cross-platform debugging, rich language support, and more.
  • Consistent presentation model by using XAML, the declarative presentation language used in Windows Vista–based applications. Controls, visual designs, media, and other elements can be presented with full design fidelity in both Silverlight and Windows–based applications.
  • Extensible control model makes it easy to add rich content and behaviors while enabling efficient code-reuse and sharing.
  • Dramatically improved performance for AJAX–enabled Web sites with the power, performance, and flexibility of Silverlight and .NET-connected software.

High Quality, Low Cost Media

  • Unified media format that scales from high definition (HD) to mobile with Windows Media Video (WMV), the Microsoft implementation of the Society of Motion Picture and Television Engineers (SMPTE) VC-1 video standard, as well as support for Windows Media Audio (WMA) and MP3 audio.
  • Add vector-based graphics and overlays to media with support for integration of graphics that scale to any size and broadcast-style overlays for tickers and closed captioning.
  • Flexible ad-insertion solutions with video and animation, including the ability to deliver fluid, broadcast-style video or animated advertisements without loss of visual fidelity or motion quality.
  • Lower-cost media streaming with Emmy Award–winning Windows Media technologies that can lower the cost of streaming delivery by up to 46%, and enjoy the flexibility to work with your existing Windows Media streaming deployments. Even further cost reductions are possible with the upcoming Microsoft Internet Information Services (IIS) Media Pack for Microsoft Windows Server 2008.
  • Broad ecosystem of media tools, servers, and solutions compatible with the Windows Media operating system.
  • Microsoft PlayReady content-access technology that delivers a single solution for digital rights management support on both Windows-based and Macintosh computers for content providers (coming in Silverlight 1.1)
  • Powerful encoding tools for live and on-demand publishing of media experiences with Microsoft Expression Encoder, including hardware-accelerated encoding of WMV and VC-1 at up to 15 times the performance of software alone when paired with a Tarari Encoder Accelerator board.

Connected to Data, Servers, and Services

  • Mash-up and incorporate services and data from the Web by taking advantage of the Silverlight support for LINQ while accessing that data with common protocols like JSON, RSS, POX, and REST.
  • Increase discoverability of rich interactive application (RIA) content that can be indexed and searched due to the text-based XAML format that describes interface and content in a Silverlight-based application.
  • Rapidly scale applications with Silverlight Streaming by Windows Live to host and integrate software services and media content.

Streaming audio and video

  • Silverlight Streaming by Windows Live offers a free streaming and application hosting solution for delivering high-quality, cross-platform, cross-browser, media-enabled rich interactive applications (RIAs). With the ability to author content in Microsoft Expression Encoder and other third-party editing environments, Web designers maintain complete control of the user experience.

Microsoft is finally making real efforts to woo the designer community who have traditionally worshipped the Adobe and Mac product ranges. One new product that addresses this previously overlooked community is Silverlight, which uses the XAML technology and is touted as Microsoft’s Flash killer. For anyone who is keen to listen, Microsoft proposes that Silverlight will achieve similar results to Flash, but it does so in an entirely different way and has different aims. So, the big question is, will Microsoft be able to break the dominance of Adobe’s Flash platform, that is available on the PC, Mac and mobile devices alike? I’m sure the jury is out on that one, but it can be said it is an uphill task.

So what is Silverlight and XAML proposition? How does it vary from Flash?

Microsoft Silverlight is a proprietary runtime for browser-based Rich Internet Applications, providing a subset of the animation, vector graphics, and video playback capabilities of Windows Presentation Foundation. The runtime is available for Microsoft Windows and Mac OS X, with Linux support under development via the third-party Moonlight runtime.

Not much difference to Flash so far…

Extensible Application Markup Language (XAML) is a declarative XML-based language used to initialize structured values and objects. XAML is used extensively in the .NET Framework 3.0 technologies, particularly in Windows Presentation Foundation (WPF), where it is used as a user interface markup language to define UI elements, data binding, eventing, and other features, and in Windows Workflow Foundation (WWF), in which workflows themselves can be defined using XAML.

Not much difference to Adobes’s MXML

Browser support…

A frequently asked question is which browsers and operating systems will it run on? If XAML is limited in this area, its usefulness in the web world will also be significantly limited. Previous encarnations of XAML, were limited and justifiably criticised as it would only work with an ActiveX control. However, this has now been resolved with support for Firefox, Opera, Safari and Netscape, Windows and OSX alike. Support is provided by a downloadable plugin, much like Flash!

Like Flash…

Silverlight enables web developers to create visually rich user interfaces and animations, play video clips and stream media within the web page, again, much like Flash! But it is different! The comparison doesn’t end there. Animations are organised using timelines and frames within the tool…how else would you organise an animation without timelines?!

Like Flex…but not!

Where things differ from Flash are the tools used to develop the Silverlight applications. Silverlight is supposed to be a way of designing and building rich user interfaces. However, standard HTML elements are missing. The way you design a particular interface is to build a standard HTML form in your favourite editor, e.g. Dreamweaver CS3, and then open this page in Silverlight to add the visual enhancements that your design requires. This sounds complicated to say the least. In comparison, Flash has a brilliant tool and framework called Flex that does this far more gracefully and with the development of Thermo, designers can really feel comfortable in the web application development mix.

Silverlight applications will also run on mobile devices, but the plan is for the applications to only run within a mobile web browser. This is unlike Adobe who are feaverishly developing the AIR runtime to allow Flash applications to run independently of the browser environment and offline.

So, Web 2.0 and beyond with Silverlight and XAML may be somewhat jumping the gun. You may say that there is nothing new or innovative with the Silverlight offering. It does, however, serve to emphasise how important the Rich Internet arena is becoming or indeed has become.

« Older entries § Newer entries »