| Sign in to see your personalized home page | |||||||
|
|
||||||
| Textbooks | Sell Textbooks | Books | Supplies | Medical Books | College Apparel | DVDs | Clearance |
|
|
||||
|
Ready to flex your Web development muscles and start building rich Internet applications? With Flex 3.0, you can create great RIAs that perform like desktop applications using Adobe Flash Player, which is already installed on more than 95 percent of Internet-connected computers. And the fun and easy way™ to get up to speed on Flex is with Adobe Flex 3.0 For Dummies. This friendly guide shows you how Flex lets you leverage the power of Adobe’s ubiquitous Flash technology to build large applications. If you’ve written code in any language, Adobe Flex 3.0 For Dummies will get you started, introduce you to FlexBuilder and the Flex framework, and have you building some really “flashy” stuff before you know it. You’ll find out how to:
All the code used in the book is on the companion Web site to save you that much more time. Adobe Flex 3.0 For Dummies helps you become Flex-literate in a flash! Adobe Flex 3.0 For DummiesBy Doug McCune Deepa Subramaniam John Wiley & SonsCopyright © 2008 Doug McCuneAll right reserved. ISBN: 978-0-470-27792-8 Chapter OneGetting to Know Flex
In This Chapter * Understanding what Rich Internet Applications (RIAs) are * Comparing Flex to other RIA technologies: Flash, AJAX, and Silverlight * Taking Flex applications offline by using Adobe Integrated Runtime (AIR)
Adobe Flex is an application development platform that you can use to build Rich Internet Applications (RIAs). Flex applications are Web-based, but they provide immersive levels of interactivity and rich media experiences that make them seem more like computer desktop programs than traditional Web applications. Flex is the ideal technology to use when you want to create complex data visualization, performance dashboards, multimedia experiences, and countless other interactive applications. RIAs are raising the bar for Web applications, and Flex is leading the way. In this chapter, we discuss what Flex is, what it isn't, and how it compares to other technologies.
Using Flex to Develop Rich Internet Applications The computer world has come a long way from static HyperText Markup Language (HTML) Web pages. Over the past two decades, rich online experiences have gradually evolved into RIAs. Flex is on the forefront of technology that allows you to create such engaging Web-based applications, but it has taken nearly 20 years since the first HTML page was created to get to where we are now. (See the nearby sidebar for more on the journey from HTML to RIA.)
Understanding what an RIA is The term Rich Internet Application (RIA) was coined in a Macromedia white-paper written in 2002 to describe a new model for application development that separated the back-end data services from a rich front-end client. One of the cornerstones of RIA development is the ability to asynchronously load data within the application. Simple HTML Web pages require a full page refresh to load new data. RIAs, on the other hand, load data asynchronously, which means they can load chunks of data without requiring page refreshes and they keep track of the application state in memory. Flex applications are stateful clients, which means they store data about the current state of the application, such as the content of a shopping cart, in memory in the client. RIAs usually load data by using eXtensible Markup Language (XML). Asynchronously loading XML is an integral part of all RIA technologies (not only Flex). Version 4 of Flash, which was released in 1999, was the first version of Flash that let developers load external XML data into Flash applications.
Taking a look at the rise of Flex Macromedia, which Adobe later acquired, introduced the first version of Flex in March of 2004. Initially, the first two major releases, Flex 1 and 1.5, were expensive server-based products. A license for Flex 1.5 cost about $15,000, and you had to deploy a server application that would compile your Flex applications and serve them to the user. These initial versions of Flex were based on Flash Player 7 and ActionScript 2, and the code editor was based on the Macromedia Dreamweaver editor. The release of Flex 2 marked a dramatic shift in the product line. Flex 2 was no longer a server technology at all; instead, Flex was a completely client-side product. The cost dropped dramatically, and Adobe rewrote the entire Flex framework and the Integrated Development Environment (IDE) from the ground up. Flex 2 was based on Flash Player 9 and ActionScript 3, which brought serious performance gains. Flex 3 added additional functionality to Flex Builder, such as refactoring and enhanced styling support, as well as new data visualization components in the Flex framework. Flex 3 also marked the official open-source release of the Flex SDK and Flex compiler. For more on the open-source aspect of Flex, visit http://opensource.adobe.com.
Defining Flex Defining exactly what Flex is can be confusing because Flex actually includes a combination of different technologies. Flex is not a single software product, but instead includes the following four main pieces:
You use a combination of ActionScript, a scripting language, and MXML, a markup language, to create Flex applications. MXML is similar to HTML, so if you have experience creating HTML Web pages, then you should be able to figure out MXML pretty easily.
The Flex SDK (also known as the Flex framework) is a set of user interface components, such as lists, buttons, and charts, that you use to build Flex applications. The Flex SDK (with the exception of the charting package) is free and open source.
You use Flex Builder to edit your code, compile your applications, debug your code, and profile performance. Flex Builder is an integrated development environment (IDE) sold by Adobe.
What's next? Adobe is actively developing Flex 4, codenamed Gumbo. This version will focus on an improved workflow between developers and designers, and will likely include an improved component framework model to more gracefully separate the visual design of your Flex applications from the underlying code. Toward a similar goal, an additional product in the Flex product line (code-named Thermo) will focus specifically on allowing designers to create complex RIA user interfaces and interactions by using a visual editor, which will create Flex application code that the designer and developer can share. Flex has been largely in a class of its own when it comes to RIA development platforms, but that reign is now being challenged because some serious competitors are entering the RIA market. Microsoft's Silverlight platform and Sun's JavaFX are two RIA development products aimed directly at taking on Flex. Over the next few years, the competition will get serious, which can only be a good thing for all the developers out there. RIA development is an exciting field; you've chosen wisely!
Comparing Flex to Flash, AJAX, and Silverlight Because you bought this book, we assume you've decided that Flex is the right choice for your project. But, if you need to sell the decision to your boss, he or she will probably ask you how Flex compares to related technologies. The following sections summarize some of the key differences between Flex and a few other RIA technologies.
Flex versus Flash Whenever Doug tries to explain what he does for a living, someone always asks whether Flex is Flash. This question quickly leads to a heated discussion about Flash advertisements, and he has to calm everyone down and explain that, fundamentally, Flex is a Flash-based technology, but no, he doesn't make those annoying ads - he makes applications. Flex is an application development framework and toolset that you can use to create RIAs. These applications are delivered over the Internet by using the Flash Player. So, what's the difference between Flex and Flash? The following list identifies a few of the most important features that Flex offers that are not available in Flash:
You can use Flash, rather than Flex, to create RIAs, but you have to work in the Flash Authoring environment, which means you don't get the benefits of Flex Builder (such as code hinting), and you can't use the MXML markup language. You may find the Flash Authoring tool really helpful if you're creating animated movies. It uses the timeline metaphor when you create animations and includes drawing tools. Flex Builder, on the other hand, is designed for application development, not animation creation. Flex Builder doesn't include any drawing tools, and it has no timeline.
TIP If you have to decide between Flex and Flash for a specific project, think about exactly what kind of project you're working on. Flex excels when you're creating large desktop-like applications, sharing work among a team of developers, or visualizing data with charts and graphs. For other kinds of projects that require complete control over the visual experience, such as games or advertisements, Flash might be a more appropriate choice.
Flex versus AJAX Asynchronous JavaScript and XML (AJAX) is a technique that you can use to load data into HTML Web pages without refreshing the full page. Instead of sending a new HTML page to the user's Web browser for every change, AJAX applications send XML asynchronously and update relevant portions of the screen when needed. By using AJAX, you often end up with a much more responsive user interface and a more desktop-like application experience. Flex applications also asynchronously load XML data.
TECHNICAL STUFF JavaScript and ActionScript are very similar languages; both are based on a language specification called ECMAScript, which is developed by Ecma International, a collective group of representatives from various technology companies (Adobe is a member). The ECMAScript specification has had few revisions. ECMAScript Edition 3 is the latest published edition, and Ecma is currently developing Edition 4. JavaScript is currently an implementation of ECMAScript Edition 3. The current version of JavaScript most closely resembles ActionScript 2, which also implemented ECMAScript Edition 3. Adobe released ActionScript 3 in 2006, which is based on the preliminary draft of ECMAScript Edition 4. After Ecma officially releases a new version of ECMAScript Edition 4 and Web browsers support an updated version of JavaScript, the JavaScript programming language should become more like ActionScript 3. Because of the similarities between the ActionScript and JavaScript languages, and their similar approaches to asynchronously loading XML data, the fundamental benefits of Flex have to do with its underlying Flash Player technology. Here's a rundown of some of those benefits:
Flex versus Silverlight Microsoft's competitive RIA technology is Silverlight, a browser plug-in, like Adobe's Flash Player. Just like you have to install the Flash Player plug-in to run Flex applications, you need the Silverlight plug-in to run Silverlight applications. Because Silverlight is fairly new, the Silverlight plug-in isn't nearly as common as Flash Player. Silverlight will likely become more widely used in the future, but right now, the Flash Player plug-in has a strong advantage because of the large number of computers on which it is installed. The first release of Silverlight 1.0 included the browser plug-in and focused on streaming video on the Web. This release certainly competed with Flash Player because it focused on some of the media features of Flash, but it didn't really threaten Flex's position because Silverlight 1.0 didn't contain a set of user interface controls that you could use to build RIAs. Silverlight 1.0 provided all the low-level graphics capabilities but none of the application framework pieces. In early 2008, Microsoft released the first beta version of Silverlight 2.0 (originally named Silverlight 1.1), which included a set of UI controls, such as a DataGrid, CheckBox, and Slider. These new controls make Silverlight a closer competitor with Flex. The competition between Flex and Silverlight has just begun, and it's too early to draw any firm conclusions about how serious a competitor Silverlight will become.
Taking Flex to the Desktop with AIR Adobe developed Adobe Integrated Runtime (AIR), previously code-named Apollo, to let you deploy Flex applications as computer desktop applications. By using AIR, you can create your own desktop applications that can run natively on Windows, Mac, and Linux operating systems. You can create AIR applications as Flex applications or AJAX applications, so if you know how to create Flex or AJAX applications, you can create desktop applications, too. When deciding whether AIR is the right technology for your application, consider these three main features that AIR provides:
Using the AIR-specific framework controls falls outside the scope of this book. If you're interested in finding out more about AIR, visit www.adobe. com/products/air. (Continues...)
Doug McCune is a developer and Flex fanatic who has created several popular applications and Flex add-ons. Deepa Subramaniam is a computer scientist on the Flex Framework team. |
|
||||||||||||||||||
|
||||||||||||||||||
|
Buy Textbooks Sell Textbooks College Apparel Shop by School Virtual Bookstores |
Order Status Shipping Rates Return Policy Marketplace Info F.A.S.T. |
Contact Us Privacy Policy Legal Notices Site Security Employment |
Help Desk eCampus Blog Affiliate Program Bulk Orders College Marketing |
|
Need Help? eService@ecampus.com
Copyright© 1999-2008
|
|||||
| . | |||||