Adobe Open Screen Project – Open Specifications and Open Technology to Help Expand Flash Player Reach

Today Adobe is announcing the Open Screen Project, something that continues our steady march to being more open and at the same time should help foster the community around the Flash Player by freeing up how and where people use it. (Info for developers is here) Here’s the news from the press release:

  • Removing restrictions on use of the SWF and FLV/F4V specifications
  • Publishing the device porting layer APIs for Adobe Flash Player
  • Publishing the Adobe Flash® Cast™ protocol and the AMF protocol for robust data services
  • Removing licensing fees – making next major releases of Adobe Flash Player and Adobe AIR for devices free

The biggest part of the announcement in my mind is that we’re finally removing the restriction on the use of not only the SWF specification but also the FLV and F4V specification. We think we’ve gotten to a point where users don’t want different versions of a Flash Player and that there isn’t much incentive to create one, so opening up and removing the restrictions on the SWF, FLV, and F4V spec is a way to show that. Now our community can really dig into these and see what makes Flash so great. But one of the major reasons I’ve heard for wanting to implement separate versions of the player is because there are parts of the technology world, especially devices, where Flash doesn’t exist yet. That’s also going to change.

The second exciting part of the announcement is that we’re removing the licensing fees for the next major releases of Adobe Flash Player and Adobe AIR for devices. That means you’ll be able to distribute and deploy the Flash Player anywhere you want without having to pay Adobe. We’re also planning to publish the device porting layer APIs for the Flash Player. That combined with the removal of the license fees means you’ll be able to actively participate in porting the Flash Player to devices that are important to you. It’s still not open source, but I think this makes the Player a more agile piece of software and empowers developers to expand the number of places it runs. There are also a number of implications on the mobile side that Bill Perry discusses in detail.

I’m really excited about what this means for our community. Developers can now look at the SWF spec, the core video spec in FLV and F4V, and the AMF spec that we released as part of BlazeDS. The goal here is to provide the same Flash Player experience across a number of devices, operating systems, and machines. We haven’t quite had that yet when you look at Flash Player and Flash Lite. But the combination of the Open Screen project, our partners (Intel, LG Electronics, Marvell, Motorola, Nokia, Samsung, Sony Ericsson, etc), and the recent movement of the mobile business unit into the same business unit as the desktop Flash Player at Adobe, we’re going to see that happen. It’s a really exciting time to be a developer.

Go SWF! There’s a pretty good FAQ for the Open Screen Project up for any more questions you have. Dave McAllister, one of the maestro’s of the project has a blog post up as well.

Real Time Communication with Flex and AIR using ColdFusion and LiveCycle Data Services

In this walkthrough I’m going to take you through using ColdFusion (which contains LiveCycle Data Services) to create real time communication between an application in the browser and one on the desktop built with Adobe AIR. Both applications are written in Flex. You’ll see how we can create a better user experience on the desktop by using things like drag-and-drop and still tie that into a real time scenario inside of the browser.

The first thing you need to do is get ColdFusion 8 or LiveCycle Data Services (LCDS). For this tutorial I’m using RTMP which BlazeDS doesn’t support. I’ll have a BlazeDS example out later this week hopefully. ColdFusion has a LiveCycle Data Services install on top of it, so that’s what I’m going to use. You can grab all of the code from my SVN repository under the GPXShare project. You’ll also need my AS3 GPX library. I’ve got a sample GPX file you can use as well.

The second thing to be aware of is there are two general categories of communication in LiveCycle DS: the real time communication using RTMP and data management. Data Management lets you do things like synchronize data between online and offline sources while real time communication allows you to push data to clients instead of having to force clients to check in with a server. Data management is included in LiveCycle DS but not Blaze DS and BlazeDS doesn’t support the RTMP protocol but does have support for AMF for psuedo-real time communication. For this I’m just talking about real time messaging over RTMP. Damon Cooper has a good blog post about the differences between RTMP and AMF and how they apply to BlazeDS and LiveCycle DS.

The code is really, really simple. In my example, called GPXShare, I have two applications, one is a Flex-based application running in the browser and the other is a Flex-based AIR application on the desktop. You’ll see that I’m reusing a lot of code, one of the great things about using Flex is that you can quickly and easily move between the browser and the desktop. What I’m going to do is take an XML file with a bunch of GPS waypoints, drag it on to my AIR application, which will then send out that data to the browser application. You can have any number of browser applications open – each one “subscribes” to messages coming from the AIR application so they get the data in real time. The second part adds a tiny bit of collaboration. I want to be able to select a specific waypoint in either the AIR version or the Flex browser version and have that selection be highlighted on all the clients. All of that is really easy to do with LiveCycle Data Services.

Let’s first take a look at the AIR application. In my AIR app I have two pieces of code which establish a Producer and Consumer:

<mx:Producer id="producer" destination="GpxShare" />
<mx:Consumer id="consumer" destination="GpxShare"
			    message="doMessage( event );" />

. The Producer lets me send code out and the Consumer is what watches for changes. Each of those point to a destination which tells all of the connected clients how to pass the information back and forth. There are a couple of things we need to configure on the server now that we’ve seen the consumer and the producer.

  • The Destination – The first thing is to set the destination. We’re looking for a file called messaging-config.xml in the /WEB-INF/flex/ directory. In ColdFusion it’s located in your wwwroot directory. Add the following code in between the <adapters> node:
    <destination id="GpxShare">
    	<adapter ref="actionscript" />
    	<channels>
    		<channel ref="cf-rtmp" />
    	</channels>
    </destination>
    
  • The Channel – Now that we’ve set the destination, he second thing we need is to make sure that “cf-rtmp” channel exists. The channel tells the connected clients which protocol they’re all using to get to each other and where to send the information. Here we’re looking for a file called services-config.xml which will be in the same place as the destination config file. Once you find it, the channel definition should already be there you just need to uncomment it and tweak it. It should look like this:
    <channel-definition id="cf-rtmp"
    	class="mx.messaging.channels.RTMPChannel">
    <endpoint uri="rtmp://localhost:2048"
    	class="flex.messaging.endpoints.RTMPEndpoint"/>
    <properties>
             <idle-timeout-minutes>20</idle-timeout-minutes>
                  <serialization>
                      <instantiate-types>false</instantiate-types>
                  </serialization>
              </properties>
    </channel-definition>
    

So we’ve got our configuration files set up (you’ll have to rebuild your Flex project if you’re following along at home to make sure they get the new configuration settings). With that Producer/Consumer tag set up in our AIR application we’re ready to send out some data. Using the AIR API’s I’ve enabled drag and drop events from the file system so that when I drag in a GPX file, it will parse the data and display it in the grid. Once that happens we use the Producer to send the data out to all of our consumers with a doSend() function:

// Send our changes out to the consumers
public function doSend( array : Array ):void
{
	// Create the message and set the message body to our data
	var mess:AsyncMessage = new AsyncMessage();
	       mess.body.waypoints = array;
	       producer.send( mess );
}

The doSend() function is called after we finish opening the file from the file system and we just pass in the array of Waypoints. We create a new asynchronous message for storing our data and then set the body of that message to our data. In this case I’m sending an array with the name of waypoints. Finally we call the send() method on our Producer to fire it off. Now lets take a look at what happens inside of our browser application.

If you take a look at the code, you can see that we get to reuse a lot. Same data grid code and the same Producer/Consumer code. In this case, the browser is acting as a Consumer and you can see we’ve set the message attribute: message="doMessage( event );". This sets all of the consumers to watch for new messages and when they come in to call that doMessage function. So when we get message from our Consumer (the AIR application) with new GPS data, we call doMessage() in the browser:

// This is what happens when we get a message from the producer
public function doMessage( event:MessageEvent ):void
{
	// Logic checks to see which kind of message we're getting
	if( event.message.body.waypoints != null )
	{
	   dg.dataProvider = event.message.body.waypoints as Array;
	}
	dg.selectedIndex = event.message.body.selectedIndex;
}

Pretty straight forward. We’re passing in a MessageEvent and that MessageEvent contains the waypoint array we passed in from the AIR application. The only semi-tricky thing is that because this application also sends the selected row information back and forth, I do a check to make sure we actually have waypoint data and not just a new selected row number.

So that’s it! The only other part to the application is sending the selected row back and forth. For that you can again reuse a lot of the same code between the AIR application and the browser application. In both applications we follow the same steps. Set up a change event to fire on our data grid when we select a new row which calls a doChangeSend() function. Then attach the selectedIndex to the message body and pass it through the AsyncMessage. Now when we receive that message we set the selectedIndex of our data grid:

// When we make a change to the datagrid we
// send a message with this function
public function doChangeSend( event : ListEvent ) : void
{
	// Create the message and set the message body to our data
	var mess:AsyncMessage = new AsyncMessage();
	       mess.body.selectedIndex = dg.selectedIndex;
	       producer.send( mess );
}
// When we get back a change event
// make sure the right index is selected
public function doMessage( event:MessageEvent ):void
{
	dg.selectedIndex = event.message.body.selectedIndex;
}

That’s all there is to it. Remember you can grab the source code for both the browser-based Flex application and the desktop-based Flex application built with Adobe AIR from my SVN repository. If you have any question, leave a comment or send me an email. Damon Cooper also has a great list of resources for BlazeDS and LiveCycle Data Services for more information.

Another Great Use for AIR – Beatport Downloader

Thanks to CrunchGear I just caught wind of the Beatport Downloader. It’s an AIR application that lets you download and manage music you buy from the beatport service, a music store along the lines of Amazon MP3 and iTunes but that focuses on trance/techno/electronic.

I’ve been hoping and wishing on the stars here in Seattle that Amazon would release an AIR version of their MP3 downloader because I think AIR provides a great use case for this kind of thing. The link between the web and the filesystem makes downloading very easy. You can create your own filetypes so you could download a smaller XML file with references to the songs and then load that into the AIR application and have the app start downloading. It’s all cross platform so you’d open the service up to Mac, Windows, and Linux – with just one code base to worry about.

New Topo Explorer and Introducing trail.digitalbackcountry.com

TechCrunch has a post about the just-launched beta of TOPO! Explorer, a site which provides a Google Maps interface on top of real topo data and it lets you upload your GPS data as well as geotag videos and photos of the trail.

Now is a good time to introduce you to my latest pet/side project, trail.digitalbackcountry.com. When I first created (and Ciara came up with the name) DigitalBackcountry I was hoping to talk about the intersection of the outdoors and technology. I thought DigitalBackcountry captured that pretty well. Well, I ended up moving towards the technology end and didn’t focus much on the outdoors part. It worked out very well for me so I didn’t mind, but I always felt a nagging, especially now that GPSes and Geocoding have become popular.

So trail.digitalbackcountry.com will be where I’ll occasionally post things like trip reports, hardware/gear reviews, and stuff that I’m working on that involves the intersection of outdoors and technology like, for example my AS3 GPX library. Posting will probably be pretty light as it’s not my main gig and I won’t have a lot of time to spend. But if you’re interested, you can always subscribe to the feed. You’ll also get a more personal side of me…but that may be kind of scary.

Also, bear with me while I get to the very slow housekeeping.

What Morgan Stanley’s Internet Trends Report has for Adobe Developers

TechCrunch has a copy of Morgan Stanley’s Internet Trends report for March and there’s a lot of good news in there for anyone in the Adobe developer sphere. TechCrunch’s analysis revolves around the social aspect of the report and there is a lot of data about the value/opportunity/popularity of social sites. The contrast between the most popular sites in 2005 and the ones today is particularly striking. But for developers looking to build RIAs on Adobe’s platform there is some good data beyond the social scene.

Video is gigantic (slide 31). It provides a hook for people to come back (50% of YouTube users visit weekly or more) and it’s getting more and more popular. People are watching around 25 billion minutes of video on YouTube. Adobe has been working on both video quality (H.264 support) as well as making it easier to stream and bring video content offline. DMO (where the video stuff is) is one of my favorite groups in Adobe and they’re doing a lot to foster the entire video ecosystem on the web.

Widgets are a big deal (slide 20+). This is partly because of the power and reach of social networking sites. Making embeddable content that can be consumed on these sites gets you an instant audience and lets you go where the users are. Providing widgets that are interactive only increases the value – this is a case where Flash blows away any competition. Just be sure to keep your widgets clean and low-key :)

One of the most fascinating trends was the link between various platforms. There is a graph of traffic for CBS across their regular TV station, their website and the mobile screen (slide 35). The peaks and valleys are the same for all three platforms. When people are interested in an event they “touch” every part of your brand. As a result, you’ve got to provide experiences across devices and platforms, something I think Flash makes very easy.

Online Ad Spend still has a LONG way to go (slide 37). In 2007 it just passed Radio to reach $21 billion (radio was $20 billion). Radio!!?! Ahead of it are Cable TV, Broadcast TV, Direct Mail, Newspapers and Direct Telephone. Online Ads are better in almost every single way so I don’t see how this can slow down. Those of you building ads in Flash should have a long, profitable career.

Emerging markets are ripe (slide 59). A lot of traffic is coming from outside the US. Easy localization and customization are going to be important to help capture that. I think there are some enhancements to both the Flash Player (being able to do right-to-left text in Flash Player 10) as well as the Flex Framework (localization bundles) that should help Adobe developers take advantage of that.

Mobile growth continues to be very strong (slide 62). You’ve got to be on the small screen and as the other data shows you’ve got to tie that back to your main property. With the integration of Adobe’s Mobile Business Unit into our Platform Business Unit I think you’ll see great things. Flash Lite and the Flash Player being in the same business unit will help bring those two experiences much closer together.

Update: Reading Alec Saunders reminded me about the impressive iPhone adoption numbers. I chalk this up to what a really great experience can do for you. We need that in the software/RIA world.

The Return of Ryan’s Shared Items

I’ve been really slacking off in the feeds that I read and as a result I’ve been missing some of the coolest news from the community. Having MXNA down makes it even worse. But after a really great, relaxing week in Ireland I’m back on the RSS crack and since I’ve switched from Google Reader to the NewsGator (and NetNewsWire) I’ve got a new shared items feed which you can find at http://feeds.feedburner.com/ryanstewart/shared. It’s going to be full of Adobe-centric news with a smattering of good, general RIA posts that I find.

Could We Make The Flash Install More User Friendly on Linux?

There’s a funny/cool post over on Content Consumer about a guy who let his girlfriend lose on a copy of Ubuntu 8.04 and asked her to do some basic things like download a music album, draw a picture, and find the capital of Bosnia. One of the tasks was to go watch a YouTube video. Well Ubuntu obviously doesn’t come pre-installed with Flash, so this posed a bit of a problem:

Second task: Watch a video on YouTube.

(note: this is a problem specifically with YouTube – it detects whether or not you have Flash using JavaScript and then puts a link to Adobe’s webpage instead of displaying the plugin. Firefox’s standard behaviour is to ask you to install it in an automated fashion. Just bad luck I happened to choose YouTube!)

This proved more problematic. Erin went to YouTube and searched for a Beatles video, and seemed to assume that it would work straight away. When it told her that she needed a plug-in she groaned, but clicked the link they gave her. It took her to the official Flash plug-in page, and gave her the option of downloading a gzipped tarball, an RPM or a YUM.

Because she’s using Ubuntu, the RPM and the YUM are going to be of no use – not that she knows this. Erin tried the .tar.gz, and it downloaded to her home folder. It opened in the archive manager, and she extracted it to the default. Then, she was lost. She tried double-clicking the file, and Ubuntu just asked her what she’d like to do with it. The option “run” results in it crashing. No clue was given to her that she should open up a terminal and type ‘./flashplayer-installer’. To be fair, there are links to installation instructions, but the average person acclimatised to Windows is not expecting to have to read complex information before installing a program – all they need to do is double click it. Obviously her attempts with the RPM and the YUM went nowhere. Frustrated, Erin conceded defeat.

There are other ways to install flash on Ubuntu, such as by using the inbuilt package manager. Why doesn’t Firefox tell her to do this, or do it automatically like Rhythmbox does with codecs? Ubuntu ship Firefox with their own special modifications, couldn’t this be one of them?

In general, this doesn’t seem to be an issue with the way Adobe handles installing the Flash player on Linux but how Firefox and YouTube do. I’m not sure we could do anything more on our Linux install page to help, but you have any ideas, I’m all ears.

Commenting on Flex Developer Center Articles

Adobe Developer Connection just rolled out a commenting system for the Flex Developer Center. I used to have trouble pointing people to a place they could get information about building with Adobe technologies but the Developer Connection has been doing a pretty good job of getting new articles across a wide array of products. I think the Flex section is probably one of the better on the site and so I’d love to see the community get involved by adding comments and submitting feedback. Is there a feature you want? Drop me an email. Have an idea for an article? Drop me an email. I’ll forward it on to the teams.

Webware Covers Thermo

At Web 2.0 Expo, Steven Heintz gave a session on Thermo and after the session he sat down and talked to Rafe Needleman about it. They cover how things are done today and what make Thermo different. There’s not a whole lot of new content for people that have been following Thermo, but it’s targeted at more general designers, so you can share it with your designer friends.

Also, I still like “Devigner” better than “Devsigner” but I suppose “Devsigner” doesn’t sound quite as religious.