BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage Interviews James Ward discusses Flex and AIR

James Ward discusses Flex and AIR

Bookmarks
   

1. We're here with James Ward of Adobe Systems; he is a technical evangelist for Flex and AIR. James, can you tell us about why the enterprise developer should care about RIA and Adobe's role in that and give us the overview and we can drill down from there.

Yes, definitely. I think that is a great question, it's very relevant to what is happening in the industry right now. There is obviously a lot of hype around Rich Internet Applications, but really there is something real behind the hype and I think what that is, is that people really want software to evolve beyond what we get today with web applications. We want to be able to really have software experiences that are more like the natural world experiences that we have. So in normal life things feel alive, they move, they have shadows, they have translucency and so that may just seem like something unnecessary in software but really the success of the iPhone kind of shows that people do really care about these things, they really do want their software to be more like the way that we experience the natural world.

There's a few other things, like in the real world we're connected to each other, we're connected to things, we also can be disconnected from those things and so another place where Rich Internet Applications are really kind of evolving to is this world where you can be connected, you can also be disconnected; and that can happen in the browser or on a desktop application. The actual implementation doesn't matter as much as the concept of being able to be connected and disconnected like we are in the real world. And then another aspect that we see a lot is actually interactivity and being able to interact, just like we do in the real world, interact with each other, interact with things, touch-screen interfaces, all those things are very important to software as well and being able to bring interactivity whether it's through integrating video and audio or realtime streaming all those things into your applications; this helps to make those applications more like real-world applications. The last characteristic of Rich Internet Applications is responsiveness and being able to have applications that you are not waiting for; with web applications they're just notorious to make the user wait for something. You click on a button and you just kind of sit there. With Rich Internet Applications it's about trying to make the software work more like the real world where when I ask somebody a question, if they respond in more than a second it seems strange. So making software work in the same way where as soon as I click on something, I don't have to wait, I get an immediate response in under a second is really the target for Rich Internet Applications and again playing into the alive characteristic as well is adding these fluid movements and making it feel responsive even if the user does have to wait for something.

   

2. What technologies has Adobe given the developers to deliver that functionality, to solve those problems, to give those rich experiences, both on the desktop and the web, what do developers have available from Adobe to do those things?

Flex is the key technology for developers to build these types of software experiences, Rich Internet Applications. Flex is a programming toolkit, it's open source, it's currently in Flex 3 Beta 2 is the current version that's out.

   

3. So is Flex the programming language?

Flex is the programming language. It provides two different languages: MXML, which is an XML-based declarative language, mostly used for laying out UIs; and then there is the ActionScript language which is basically JavaScript 2 or ECMAScript 262 revision 4.

   

4. So isn't ActionScript just the clunky language that comes with the Flash player or is there something more to it?

ActionScript is actually based on the standard that JavaScript 2 will be based on. It's an ECMA committee that was formed by Adobe, Mozilla, Microsoft and a lot of other vendors to really create the next generation of web programming language.

   

5. Is it the same language, if I looked at it 4-5 years ago today, or has it changed?

It's changed pretty dramatically. There is a lot of things that are similar, you still do your variable declarations the same, you still specify functions the same way, but it's also taken a lot of the constructs from .NET and I think C# and Java and integrated those into the language. So now you have real objects, so that you don't have to do the prototype method of doing objects anymore; you have a real object, you can extend objects, implement interfaces, you have packages, you import the classes, you use all those things that really make this a real object-oriented language; they're all part of ActionScript 3 which is our implementation for ECMAScript revision 4.

   

6. Is that only supported then in the Flash runtime or are there other runtimes for ActionScript since it is just an implementation of the ECMAScript standard?

That's a great question. What Adobe decided to do -- we built a virtual machine to run ActionScript 3 or this ECMAScript language and we decided: "Why do we want to make everyone in the world write their own ECMAScript virtual machine?". So what we did is we open-sourced that virtual machine with Mozilla, that is called Tamarin and so we use Tamarin in Flash player, we also use it in AIR as our virtual machine to run this code. So Mozilla will also be integrating Tamarin, into the browser to execute JavaScript 2 when they actually implement JavaScript 2 in the browser as well.

   

7. So does that mean that my Flex app will run outside the Flash player someday or is it more complicated than that?

The core language and the execution of that language is something that could be portable across any runtime that executes ECMAScript code. Flash player implements some functionality that currently isn't implemented anywhere else. It certainly could be, but things like vector graphics and video playback and streaming, bitmap manipulation… All those things are manipulated by Flash player to allow you to build Rich Internet Applications and rich experiences inside of the web. Those could certainly be created in some other way, using the ActionScript or ECMAScript language, but that would have to be implemented separately.

   

9. So Flex provides the UI framework for the web. You talked about desktop functionality and offline functionality. What is Adobe providing for developers to build that kind of functionality?

Yes. There are a few different things. One is that, first of all you take your Flex application, you can compile it and run it in the web browser with Flash player as your virtual machine. You could also run it as a desktop application with the Adobe Integrated Runtime, also called AIR. So it's the same bytecode, it's the same classes, you can target either runtime and then both of those runtimes have different pieces of offline functionality. So inside the web browser you could use… the Flash player has a local storage capability, you can use that; you could also use Google Gears or some other technology to actually persist things locally within the web browser. If you need something that allows for a more customized experience and offline/online notification and system notifications and custom chrome for your application, or being able launch your application from the Start Menu and local SQLite database , all those things are built into the AIR runtime.

   

10. So the Air Runtime, is that out of Beta?

It's currently on Beta 2 and it's on labs.adobe.com.

   

11. And as a developer what can I expect the licensing and the availability of that product to be to me? Is that something that each of my clients would have to pay for that runtime?

AIR will be distributed and be licensed just like Flash player, so free for anyone to use, no restrictions on that just like Flash player. So Adobe sells some development tools and some services and servers to pay for the effort that we put into the platform.

   

12. So that obviously leads right into the next most important point for any developer looking at a new technology and the tooling. What tools are available, what kind of functionality are they providing, what are they similar to in other areas that we've seen and what are the pricing on those tools?

Building Flex applications, the core of the Flex tooling is the Flex SDK. That's a free SDK, it's open source with Flex 3, so that is the core tooling and it provides the compiler, the debugger, all the components that you need to build your application and you can use any editor you want to build your applications and run the compiler. There's ANT compile tasks, there's a command-line compiler, all those sorts of things to actually allow you to compile your application into the bytecode. So that's the core, is a free open-source product called the Flex SDK and then on top of that there is the Flex Builder IDE which is a plugin to Eclipse. And that plugin to Eclipse allows you to more easily build your Flex applications. So it's using that same Flex SDK, but now you have things like code hinting, debugging, design viewer; you can just drag and drop your components onto a canvas to build your user interface. It also provides some great integration with designers; most designers are using Adobe tools, so you can actually take assets that those designers provide you and integrate their designs and their assets into your Flex application or Flex Builder, facilitate some of that. And you can do that without Flex Builder, but just not as efficiently.

   

13. Is that the same tool that you use to build an AIR application then?

Yes, exactly. So with Flex Builder 3, which is currently in Beta 2 on labs.adobe.com, you can build AIR applications, you can build desktop applications that use AIR or web applications that use Flash player, both of those inside the same tool, using the same everything.

   

14. So if I go out and build an application in Flex and deploy it on the Internet, how do I know… Does the versioning of the player matter, how do I know they have it? There are always these limitations with the client. How do you guys resolve some of those and what can I expect in terms of a developer there?

The first way that I think we resolve that is the fact I think 99.1% of connected computers on the Internet today have Flash player. That's one easy way to resolve it. Then for the people that may not have the right version, 94% of people on the connected Internet today have Flash player 9, which is what's required for Flex 2 applications. So for the other 6% that don't have that version we provide a detection toolkit, and this is all integrated into Flex Builder. When you create a project it does all those for you, but essentially what it does is when a user comes to your webpage with your Flex application on it, it will check to see if they are running Flash player 9. If they are not, then it will ask them if they want to upgrade to the latest version of Flash player. It's a single click, 1 megabyte download, and now they're up and running with the new version of Flash.

   

15. Will Flex 3 target the same Flash player or will they have to upgrade to get the Flex 3 functionality?

Flex 3 will require the same version of Flash, Flash 9, and there will be some additional capability that's been added since Flash player 9 that you could utilize in your Flex application. So you can actually go into your detection script and say: "I need to require version 9.0.60" if you want to take advantage of the new capability and there's also ways that you could detect if the user doesn't have that version, then you do something else. But even those point versions are adopted pretty quickly. Typically any new version of Flash player that we release reaches about 90% adoption in the first 12 months, so it's pretty significant uptake. Actually the fastest uptake of any software application in the world is Flash player. I think Flash player 9 has now been downloaded about 2.5 billion times and is installed on about 94% of PCs worldwide.

   

16. When can we expect to see Flex 3 and AIR out of Beta and in a production release?

They will be in production releases at the beginning of 2008. Right now there's actually people that are building production applications on Flex 3 and so people can do that. If you go to desktop.ebay.com, it's actually using AIR and was built with Flex 3 Beta 2 and AIR Beta 2. So there are some pretty significant applications already building on the Beta technology and it's pretty stable at this point because we're pretty close to a final release.

   

17. Can you tell us a little bit about the community and where enterprise developers fit? I come from the Java side of the world and when I talk to people about Flex and Flash it seems like the oddball in the stack. So can you tell us about where you guys fit in terms of enterprise software, with the typical developer, Flex developers, what kind of profile, what they look like, were they a Flash developer before, where they come from, Java or .NET, and also it would be interesting to know what size that community is, and just tell us more about what's happening there on the community side?

Actually I want to jump back first to a question that you asked that I forgot to answer, which was pricing for Flex Builder. There's a few different options for pricing for Flex Builder and the base price for Flex Builder is $249 per developer seat, that's for Flex 2 and for Flex 3. The charting components in Flex Builder, we call it Flex Builder Professional now, has the charting components and advanced data grid components, that's not $249, that's more that $249, I don't remember the exact price. Flex Builder Professional is free for students and educators, so if you're a full time student or educator, then you can actually get Flex Builder Professional for free. And then there are some upgrade options as well, for upgrading from Flex 2 to Flex 3.

   

18. You guys license enterprise infrastructure as well, for data services?

Yes. There is a product called LiveCycle Data Services that is licensed per CPU and there is a lot of different pricing options depending on what your configuration is and what your application is.

   

19. To really build a Flex application, do I have to have LiveCycle Data Services or are there other options to me in terms of integrating with the backend?

That's a great question. LiveCycle Data Services is something that is optional, but it's something that does a add lot of value. It adds the AMF protocol which is a great serialization protocol to more efficiently move you data across the wire, it adds publish and subscribe messaging, data synchronization capability, PDF generation, WSRP provider support, a bunch of things that people may need or want, but it's not required. You can connect any Flex application built with all the free stuff, the free SDK, to your web services, SOAP web services, RESTful web services, JSON, so there's lots of different ways to do that. There's also open-source products that provide some of the functionality of LifeCycle Data Services that people have looked at too.

   

20. Since we're jumping back, you threw out AMF there. Can you tell us what AMF is and why as a developer I would want to use that over more standards-based or open web service protocols?

AMF is a binary serialization protocol for Flash. So it's extremely efficient both across the wire and then also on the parsing side of things. So when you actually have to take that data and parse it, it's extremely efficient at doing that. So it is a protocol that for now is a proprietary protocol, but it is something that has been documented by the community and has been implemented for every backend, I think: PHP, Ruby, Python, .NET, they all have open-source implementations of AMF.

   

21. Does Adobe ever plan to publish the standard for that or is it just reverse engineered?

It's something we've talked about and I don't know if we will or not. I personally hope that we will, but I don't make those decisions.

   

22. Let's go forward. I am curious to hear about the community and what's going on there.

The community right now, I don't have exact numbers on how big it is and the best indicator of the size of the community is the size of the 'flexcoders' group on Yahoo. It's currently at, I think, about 8000 members, so I don't know what percentage of the overall Flex community is actually on 'flexcoders'. It probably would be similar to the other lists, so like there's a Ruby on Rails email list, it's kind of the standard email list and the same with Ajax frameworks and Struts and I have no idea how many users there are on those lists and what percentage of the community is on those lists, but it's probably pretty consistent. So that's, I think, a pretty good way to judge the size of the community, not saying that there's only 8000 members, but some percentage of the community, and I don't know what percentage it is, is on the 'flexcoders' list which has about 8000 members. There's also a blog aggregator called MXNA, weblogs.macromedia.com/mxna, and that's currently aggregating 600 blogs that blog about Flex technology. So that's a pretty significant number of bloggers out there blogging about Flex as well. Those are the best indications that I have of the size of the community. Another one is the flex.org/showcase which is a site that showcases all the public-facing Flex applications out there and I think there is a hundred and something applications listed there now. That of course doesn't list all of the applications that are behind-the-firewall applications or business applications that you can't actually go to and use yourself. So again that is some percentage of the total amount of applications that are built with Flex.

   

23. Beyond size, can you give us some attributes of both the developer that's adopting it and the kind of solutions they are building? Do you see trends? Is it just these "sexy applications" that people are using Flex for, or is it making its way into the enterprise and what kind of developers are you seeing that are quickest to adopt it and make use of it?

There is a broad range. You can get everyone from the Flash designer that got into some ActionScript coding and started building some stuff with Flex, to the other end of the spectrum -- the hardcore Java developer that's learned Flex and has started building UIs with Flex. So there is a wide spectrum. Right now the place where I'm seeing the most momentum is in the business application space, so it's pretty much becoming the de facto standard for Rich Internet Applications in the business application space, Flex is. We see companies now, like SAP has been a longtime Flex customer, Salesforce.com, NASDAQ, Oracle, just about any large company you can think of is using Flex for their business applications today and that's a trend that's continuing to grow and so we're seeing a lot of momentum there, we're seeing a lot of Java developers pick up Flex and start building their UIs with it, and still of course using Java on the backend. That's of course one of the options you can use. You can build Flex on top of any backend, but the enterprise space, the business application space is pretty much primarily using Java on the backend and Flex on the front-end now, for their Rich Internet Applications.

   

24. Is there anything else that someone considered starting a new project and considering which UI framework needs to know and also just in closing could you point them to any resources that would both help them evaluate that and then if they do adopt Flex will help them in their process, in learning it and implementing those technologies?

Yeah, definitely. I think there's a few things that are especially great for most developers to understand about Flex: one is that the programming model is very similar to what people are doing today, so even though it is a client-server architecture, ultimately the coding is similar to what people use today. So the MXML language is a lot like HTML, the ActionScript language is like Java and JavaScript and so these programming languages are really familiar to most developers already. It's just a matter of learning the syntax and the libraries that are available to you, the components that are available to you. Another aspect that's important is the object-oriented aspect of Flex. It's a fully OO, component-oriented language. Code reuse is so significant in Flex that it's like nothing I've ever seen before. As far as components, Flex actually makes components work; I mean I can go download a cool display shelf component from quietlyscheming.com and use that in my Flex application with a single line of code and no need to go hack the author's code.

   

25. In terms of components is Flex providing me the basic components I need or am I going off to each of these different guys and grabbing those?

Out of the box Flex provides a lot of components that you need to build your application: data grids, it provides comboboxes, lists, accordions, tabs, all the basic application components. And then there's hundreds of community components out there that you can also go download, there's a few sites to aggregate all these components. One is called FlexBox, I don't remember the full URL for it. Another one is the Adobe Component Exchange, so that's where people are finding these components and using them. One of the great things about the component model in Flex is that what we've done is, components actually contain a lot of the things that UI components should contain, but don't contain in other languages. For instance a Flex object or component can contain properties, and by properties it can be just variables or also setters and getters, which is pretty important to building UIs. Also events, events are something that is very important to building UIs, that's just a core part of a component is events. Methods, styles, effects, all these things that really should be encapsulated into a component, we've built into the programming model and components actually do bundle all that stuff up into a single, reusable component and that is one of the reasons why we see such high reuse of Flex components. That is one of the things that makes the Flex programming model a great component model as well and why people get excited when they see this level of reuse that they have in their Flex code.

   

26. But I could go and build a decent application with what gets shipped in the Flex framework?

Absolutely. And one thing that I didn't mention about the programming model yet was that we use CSS for our styling, so you can actually use CSS like everyone is already familiar with, to style these components as well. They are very deeply stylable, if you need to go beyond the style definitions that we provide. You can skin the components using either programmatic or graphical skinning, so there is a lot of different ways to actually customize the look-and-feel of the components.

   

27. Are there any resources that the InfoQ readers can check out to learn more about Flex and what you guys are doing in the RIA space?

Yes, definitely. flex.org is a great resource that has tons of information: the showcase and lots of documentation, the books are all linked to from flex.org. Also, learn.adobe.com is also a really new resource that has some great tutorials. If you download Flex Builder and run Flex Builder as a trial edition, that also has a bunch of tutorials in it and there is a ton of other documentation and articles on the Adobe Developer Connection, I think it's developer.adobe.com. labs.adobe.com also has a ton of information on how to get started building applications with Flex and AIR.

May 20, 2008

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Interview a little dated

    by Andrew Pym,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    The interview is a little dated now that Adobe have launched Flex 3 and also AIR
    br
    Reasonably high level discussion. Useful as an introduction to the platform.

  • Excellent interview

    by Teodor Baciu,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    This interview provides good information about the purpose of Flex and AIR. For me as a Java developer considering to use Flex as UI for my next web application this presentation was really useful.

    There is a mention of the Adobe Livecycle Data Services, the framework provided by Adobe for communicating with remote data services. The interview was done apparently before tools that support the AMF communication protocol were open sourced and became BlazeDS. More info about BlazeDS can be found at: opensource.adobe.com/wiki/display/blazeds/BlazeDS

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT