| By Peter Ent | Article Rating: |
|
| October 18, 2004 12:00 AM EDT | Reads: |
10,447 |
Perhaps you've heard of Flex, maybe you've even dabbled with Flash, or you have one or more Flash developers on your team. Nevertheless, you aren't sure how Flash and Flex fit together.
As an enterprise application developer, I work on both the server side using Java and the client side using Flash. Knowing the benefits Flash has for the client, I looked into Macromedia's enterprise development offering, Flex. As a Flash developer myself, I saw my Flash skills being used differently on Flex-based projects. I have now begun using Flex because it fits in well with my own skills, but more important, it fits with the skills and needs of my team and our enterprise development environment. However, since I started introducing Flex to colleagues, the same questions kept popping up: "Do I need to learn Flash to use Flex?", "How does Flash work with Flex?", and "What does Flex offer that Flash doesn't?"
This article shows you, based on my own experience, how Flash and Flex work together and how the role of the Flash developer changes when involved with a Flex-oriented project.
Do I Need to Learn Flash to Use Flex?
You don't have to learn Flash to write Flex applications. Flex applications are turned into Flash movie files (the SWF file) and sent to the end-user's Flash player; this means that you can think of Flex as an alternative to using the Flash IDE (Integrated Development Environment) to make Flash movies. If you are an enterprise application developer and you've tried to learn Flash but found the concepts of the movie clip, multiple timelines, and levels a bit confusing, then Flex will be much more to your liking.
How Does Flash Work with Flex?
Flash developers play an important role in developing high-quality, enterprise-level applications. It is important to understand how Flash and Flex fit together to appreciate how valuable a Flash developer can be to your Flex team. Before Flash 5 debuted, it wasn't easy to use Flash as the sole front end to your Web application. Flash simply lacked the necessary communication link between itself and the server. When Flash 5 debuted it became possible to use Flash as a front end for Web applications. Not only could you create buttons to hyperlink to Web pages, but you could now request data from the server and modify the user interface without generating a new page. But to do this, you had to learn the Flash development environment and think in movie-making terms. This was great for the creative artist; Flash became the way to show off yourself and your company on the Web.
Tip: Flash had earned a reputation for snazzy "intro" movies, electronic greeting cards, and other, cartoonish uses. Even though it is possible to build applications in Flash 5, you have to build all of your own user interface controls. This effort, along with Flash's flamboyant reputation, didn't help convince IT organizations to use Flash instead of HTML.
Nonetheless, you probably discovered that the Flash environment is not for everyone. Just as not everyone's brain is wired to write software, not every programmer's brain is wired to think in terms of animation - a lot of us are old-fashioned, procedural-driver programmers.
Flex, on the other hand, has been clearly targeted at the enterprise Web application developer. Flex offers the advantages of Flash, but in a package that fits with enterprise development. Here's how:
- Flex applications are created in a manner similar to JSP-based applications and require an application server to run.
- The MXML files can easily be placed into source code control (with changes to them tracked - you can't do that with the binary Flash FLA files).
- MXML files can be edited by any text editor.
- ActionScript, the language of both Flash and Flex, is based on JavaScript, which many Web developers already know.
- Flex applications (that is, the MXML and related files) are deployed to production application servers as any JSP, HTML, or image file is deployed.
- Flash offers market penetration with 98% of the world's PCs running the Flash player. Furthermore, Flash applications have a much smaller download than Java applets or Java/Swing applications.
- Flash is priced for individuals and small firms; Flex is priced for corporations.
Since Flex applications are ultimately translated into SWF files executed by the Flash player, you may ask "Can I build the same application with Flash MX 2004 as I can with Flex?" Both Flash MX 2004 and Flex share a common look and feel. Both Flex and Flash use the halo-themed components. The on-screen objects, such as buttons and lists, have a glow, or halo, about them when you move the mouse over them. Since Flex applications are translated into Flash movies, you can logically assume that what Flex delivers, you can do in Flash MX 2004.
The short answer to the question above is, "Yes, you can." The long answer is "Yes, but why would you want to?" Flex contains more user interface components than Flash MX 2004, and Flex contains things enterprise developers are expected to provide in their applications. For instance:
- Flex contains the objects to validate phone numbers, email addresses, numbers, and strings. Feedback is automatically given to the user without the developer having to write any additional code.
- Layout managers provide the means to resize and reposition elements and happen transparently to the developer.
So Why Do I Need Any Flash Developers?
I have written several applications with Flash that fall into this "enterprise" category. I made extensive use of the UI controls provided by the MX 2004 Professional edition. Yet it was still a handcrafted affair. I have since reworked these applications in Flex with much success.
Tip: Applications written for Flex not only take less time to build and test, they are easier to maintain.
But there is a catch. The original Flash applications contained user interface elements that I could not create with Flex alone. For example, one of the applications has a chart that the user can manipulate. The user can drag the mouse over the chart to zoom in. Flex does not come with a component to do this.
To solve the problem, I put on my Flash hat and created a component (see Figure 1) that sits beneath the chart. When the user moves the mouse over the chart, a line follows the mouse until he/she presses the mouse button. A yellow ribbon extends from the line and follows the mouse, giving the user a clear indication of which part of the chart he/she wants to zoom.
It was very easy to add my component to the Flex project. But without any Flash skills, this embellishment would not have been possible. In this case it may have killed the project altogether since the feature is so valuable.
Tip: So what does a Flex team need with a Flash developer? The Flash developer is there, in a new role, to create more Flex components! Flex comes with over 50 components, but there is always something more you need.
Figure 2 shows a clock component added to a time-tracking application I created in Flex. The clock shows the current time and it sits under labels that are defined in Flex. The Flash component fits easily within the Flex layout of the page and is treated like any other Flex MXML tag.
Rather than charging your Flash developers with creating whole applications for your Web site, use them to augment Flex applications.
Conclusion
You do not need to learn Flash to use Flex. The design and purpose of Flex is to leverage the delivery and runtime capabilities of Flash while fitting into the enterprise development environment.
However, you cannot wholeheartedly toss away your Flash development for Flex. Flash plays too important a role. For instance, the beauty that some artists (and developers) achieve with Flash cannot be duplicated in Flex. Flex does not come with every user interface control you will ever need; Flash provides the tools necessary to create any type of control you can imagine.
Flash developers contribute to a Flex team in the following ways:
- Develop new Flex user interface components.
- Extend, or change, existing Flex components.
- Assist page designers with the ActionScript they need to make the application work. For example, data returned from a remote server call may need to be transformed so it is easier to deal with in the Flex application.
- Build new skins to change the overall look of the components. Skinning, as it is called, is the act of replacing the look of an interface with a new one. For instance, your company may have decided that all of the buttons in an application should be oval with a copper sheen. You can achieve some of this change using style sheets. But the skin determines the shape of the button. A skilled Flash developer can make new skins that fit within the theme.
For the enterprise Web application developer, Flash takes a new supporting role on the stage where Flex is the star player.
Published October 18, 2004 Reads 10,447
Copyright © 2004 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Peter Ent
Peter Ent is a Web application developer specializing in Rich Internet Applications. He has more than 20 years of experience ranging from keypunches to wireless PCs.
![]() |
Randy 10/27/04 05:49:57 PM EDT | |||
That's great. But until Macromedia gets a clue and lowers the price Flex is out of the ball park for most people. I work for a multi-billion dollar company and can't justify the high cost. We'd be limited to deploying everything against one server or pony up around 12 grand a box to support our clustered environment. So it takes a little longer to build the app in Flash. Building it using ActionScript 2.0 and classes, I can still use source control. And in the end, I have an inexpensive app that I can put on whatever server we need to have it. It'll even integrate into our content management system. I was on the Flex beta and have used Brady to develop with. Great products, but the price is way too high. |
||||
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Adobe Flex Developer Earns $100K in New York City
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Ph.D. in Twitter Anyone?
- Eolas Sues the Internet
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Special Report on the Emerging Cloud Computing Trend
- Adobe Cans Another 9% of its Workforce
- My Thoughts on Ulitzer
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Ulitzer Live! New Media Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Executives Feature on Cloud Computing Expo Power Panel
- Software Flexibility in the Cloud - Part 4 of 5
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Where Are RIA Technologies Headed in 2008?
- Cover Story: How to Increase the Frame Rates of Your Flash Movies
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Your First Adobe Flex Application with a ColdFusion Backend
- Adobe Flex 2: Advanced DataGrid
- i-Technology Blog: Death-Knell For "Rich Media? Hardly!
- Adobe/Macromedia - Microsoft, Look Out!
- How To Create a Photo Slide Show ...
- Adobe Flex Interface Customization - Themes, Styles, Skins
- Personal Branding Checklist
- Has the Technology Bounceback Begun?
- "Real-World Flex" by Adobe's Christophe Coenraets








































