Welcome!

Adobe Flex Authors: Liz McMillan, RealWire News Distribution, Maureen O'Gara, Yakov Fain, Keith Swenson

Related Topics: Adobe Flex, ColdFusion

Adobe Flex: Article

The Web Is Exciting Again

There has never been a better time to be building Web applications than now

ColdFusion developers have known for years how powerful rapid development can be and how much of a difference that makes when building dynamic Web applications. Over the course of a little more than a year we've watched as the Web model was turned on its head in favor of something that feels much more intuitive and is much more user-friendly. Part of this change has come about because of what most people call "Web 2.0." Web 2.0 has brought about more buzzwords than a marketing convention. A lot of normal users have stopped trying to figure out what tagging is, what AJAX means, or what the blogosphere really is. They have to be wondering why most of the Web sites they're using suddenly have "beta" on them.

Despite all of this, the thing that matters most to Web users is experience. No matter what you think about Web 2.0 and the obscene amounts of money venture capitalists have decided to throw at all of these "beta" Web applications, it's difficult to deny that people are looking at the Web in a whole new way. The Web is exciting again, and more people are using it every day. The potential for developers is almost limitless. Whether your goal is to sell your company to Google or just make a few people's lives more comfortable, the technologies at our disposal are making that easier than ever. But that's part of the problem. We have so many technologies that it gets confusing to sort out what we should start looking at let alone what we should ultimately use as we build our Web applications. Luckily, there are some best practices that we can use to sort out the mess.

What Is Your Target Audience?
In the past, developers didn't have to worry about what people were going to be using to view their Web applications. The language they developed in, whether it was ColdFusion, PHP, ASP.NET, or any other variety, didn't really matter. For one, most of the Web was using Internet Explorer, which made it difficult to implement a standards-compliant CSS page, but it also meant that everyone was basically seeing the same thing. Any small differences caused by the browser as a result of the back-end language (of which there were few) didn't come up. Web developers lived in a fairly homogenous world.

This has changed. A variety of different Web browsers have sprung up, and all seem to handle Web standards differently. More people are also using Macs, which means yet another browser, Safari, that handles things very differently from most of the major Windows-based browsers. But most importantly, people have come to rely on browser technologies to power their Web applications. To provide a rich experience on the Web, developers are leveraging technologies like JavaScript, CSS, and DHTML, all of which look very different depending on the browser you're using, and when combined, becomes an even bigger headache.

A technology like Flash solves this problem because it runs on top of the browser via the plug-in and it's on 98% of the world's computers. If you're trying to reach as wide a base as possible, and you're looking for a powerful, rapid solution for developing Web applications, Flex 2 is the way to go. Web developers will be right at home in MXML, the XML-based language that powers Flex 2. If you're used to JavaScript, you'll also be able to pick up ActionScript 3, the language behind the scenes of Flex 2, quickly. ActionScript 3 is based on the new ECMA standard, and JavaScript developers will find it very easy to use, but also quite a bit more powerful.

So when thinking about your audience, take into account what browser and operating system they're using. If you're writing a Web application for people who are all going to be using Firefox and IE then AJAX is a possibility. But if you're planning to deploy to a wide audience, or even an enterprise-level audience, Flex 2 is the best way to go. It gives you the wide reach of the Flash Platform, and all the richness of a desktop application.

How Expandable Does This Application Have to Be?
There are a couple of angles to this. One, how does your application have to adapt over time? I've seen some powerful things done with AJAX, but one thing that a lot of people don't seem to consider is how JavaScript is adapting as a language and how support for JavaScript may change over time. While there are a lot of frameworks that help users get over the issues of cross-browser compatibility, the core functionality of JavaScript is five-years-old. There are radical changes ahead for the ECMA standard, and as a result the next version of JavaScript. When you combine that with the different ways that browsers handle JavaScript, building an AJAX application that will be compatible with tomorrow's browsers becomes a dicey proposition.

Flash doesn't have this problem. In fact, the newest version of the Flash Player is compatible with the very first version of Future Splash from way back in 1996. This is an incredibly important consideration. It means you can develop your application, and when a new version comes along, take your time in deciding what features to embrace and what features to leave out. AJAX has the benefit of being standards-based, but the standards body isn't really beholden to anyone. First, Macromedia and now Adobe have a history of making sure that they don't alienate their developers by rendering the time and energy they've spent on development useless.

The second thing to consider when it comes to expandability is obviously being able to add to your code base and quickly build new features. This means being able to find developers as well as being able to enhance your application easily. When it comes to developers, JavaScript is an easy language to find them for. Because it's been around so long, there are a lot of people that know the ins and outs very well. Flash engineers are harder to come by, but they're growing every day. AJAX applications win out when it comes to developer numbers, but when it comes to enhancing the application, Flex wins. AJAX frameworks like Dojo, Prototype, and even Adobe's Spry framework make getting into AJAX easy. They even solve a number of the compatibility issues. But when it comes time to make enhancements, they fall short. You're essentially trying to build out your application on two separate code bases: yours and the framework you're using. Flex follows a component-based model that allows for quick and easy expandability. Flex 2 components are one of the more underrated features of the framework. Developers can be working on what seem like two separate applications and very easily bring them together when it's time for a final deployment. That flexibility is a dream come true for developers trying to keep up in the ever-shifting world of Web applications.

What Kind of Infrastructure Do I Have? What Does My Budget Look Like?
Nothing beats free, and if you looked at Flex 1.5 while it was out, you know that there were some enormous costs associated with it. For an enterprise-level shop, it wasn't a big deal, and a lot of enterprises have been using Flex for a long time. But for a start-up or smaller Web application companies, when comparing Flex and AJAX, the relative cost of the Open Source AJAX made it a no brainer. But Adobe listened to the complaints and Flex 2 is entirely free. You can download the Flex 2 SDK from Adobe right now and start building Flex applications. Buying Flex Builder 2, which is built on top of the Eclipse platform, gives you powerful debugging tools and all of the trimmings you'd expect from a world-class IDE. But even Flex Builder 2 isn't expensive, starting at $499 without the charting components. A steal compared to Flex 1.5 and still not much when you compare the benefits it provides versus other IDEs.

You also want to think about how all of your technologies are going to work together. You may be using ColdFusion to drive your Web development, or you may have chosen to go Open Source with PHP. You could be using all Microsoft technologies and your Web applications are built on top of .NET. AJAX is universal - it doesn't matter what your code looks like on the middle tier because it's only concerned with the client. This is a pretty compelling reason to use AJAX, because you want your client technology to be as agnostic as possible. However Flex 2 has also made some great strides in this area and Adobe has worked hard to make sure that Flex 2 works with almost any technology you put behind it. There are some great resources out there for building a Flex 2 application on top of PHP or .NET. For the ultimate rich Internet experience, Adobe's ColdFusion works seamlessly with Flex 2. You can also take advantage of Action Messaging Format (AMF) with either ColdFusion or PHP. AMF is a binary format used to transfer data between the client and the server. It results in smaller data sizes and more security. ColdFusion has been engineered to use AMF and there are some fantastic PHP solutions including AMFPHP. Recently, the team over at Midnight coders released a version of their WebORB software that allows for AMF between Flash and .NET. There are a lot of options when it comes to Flex and your infrastructure.

What Are My Time Constraints?
For a long time, people associated Flash with a very tedious, time-consuming development process. The nature of Flash didn't lend itself to rapid development in any way shape or form - it was a tool made for designers. When looking for rapid development, there are a plethora of AJAX frameworks out there to get you started, and JavaScript is an easy language for people to pick up and start building. Now, the Flex 2 framework has abstracted a lot of the tedious parts of Flash in the same way that AJAX frameworks do for JavaScript. Jumping into Flash development has never been easier, and you have never been able to crank out great looking applications in less time than you can now.

JavaScript has served developers very well over the years, and its resurgence in the form of AJAX has helped foster a lot of the creativity that we're seeing on the Web now. But many of the good things about AJAX are matched by Flex 2. Flash has come a very long way since its days as a tool for Animation, and more developers are realizing the benefits of a rich desktop-like experience, without the headaches of worrying about browsers and operating systems. However, if you've invested a lot in AJAX, it may be difficult to give up on the technology entirely. Luckily, AJAX and Flex do some great things together. Adobe released the Flex AJAX Bridge on Adobe Labs, which lets AJAX developers get their feet wet in Flex 2 without making a big commitment. It's a great way to try out the richness of Flex 2 and the improvements without rewriting your entire code base or trashing your AJAX investment.

It's still always about choosing the right tool for the job, and AJAX is a fantastic technology when it comes to enhancing Web sites and making the entire Web experience better. But when you're setting out to develop Web applications, and you want them to have the richness that people associate with their desktops, what at first may seem like big advantages for AJAX turn out to be covered very well by Flex 2. Flex is a young technology, and many developers are just now starting to see what it can do, let alone try to push the boundaries. AJAX, on the other hand, is built on technologies that have been through a lot, but have very little left in them when it comes to pushing the envelope. As you make your development decisions going forward, give Flex 2 a look and see how it can help you. I guarantee you'll be impressed by how far Flash has come.

More Stories By Ryan Stewart

Ryan Stewart holds an economics degree from the University of Pennsylvania and is now a Rich Internet Application developer and industry analyst. After graduating from Penn, he spent two years developing applications for the Wharton School and pushing the idea of the web as a platform for learning. Ryan now lives in Seattle with his wife and runs his a consulting company, helping clients build and architect Rich Internet Applications. He tracks the web and Rich Internet Applications for ZDNet on The Universal Desktop (http://blogs.zdnet.com/Stewart/) as well as his personal blog, Digital Backcountry (http://blog.digitalbackcountry.com).

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.