| By Yakov Fain | Article Rating: |
|
| December 25, 2007 01:30 PM EST | Reads: |
25,277 |
OK, your Flex application is already deployed in production. How are you planning to deploy patches to your code? I mean bug fixes or enhancements to specific MXML components or ActionScript classes? Of course, you can recompile the entire application with hundreds of classes just to deploy a new version of the class MyGreatCreation.as. Let’s see if there is a way to deploy just MyGreatCreation leaving the rest of your application intact.
In Java world, the solution to this issue is pretty simple. A typical Java application consists of a number of .jar files (think libraries or swc) and there is a concept of a class path. If a program needs to use a class MyGreatCreation, the Java class loader tries to find it based on the classes or jars listed in the classpath. If there is more than one version of this class in the path, the class loader will grab the first one. This greatly simplifies deploying any patches in Java production applications. Just make changes to your class and place it in the jar that is listed first in the classpath. Then deploy just this jar in production, and the loader will be happy to pick up the brand new version of MyGreatCreation.
Luckily, we can use the same techniques in Flex, which also has concepts of classpath, class loaders and libraries.
Go to the Properties window of your Flex Builder project and check the build path of your application. At a minimum, you’ll find there a number of libraries (compiled swc files) that represent the Flex framework itself. The chances are that you’ve added more swc’s there that contain your application-specific code.
In any event, create a new Flex Library project called patches or something of this nature. To be able to compile this project into an swc, add an empty ActionScript class there. We’ll be using the patches.swc as a first item in the build path of our main project.
In 2007 AJAXWorld Is Sponsored by More Than 70 Leading Rich Web Technology Companies
AJAXWorld Conference & Expo this year was sponsored by the world's leading rich web technology providers including: 3Tera, Addison-Wesley, Adobe, Apress, Backbase, Bindows, Conference Guru, Cynergy Systems, Dynamic Toolbar, Extension Media, Farata Systems, Flash Goddess, FrogLogic, GoingToMeet.com, Google, Helmi Technologies, IBM, ICEsoft, ILOG, IT Mill, Ittoolbox, JackBe, JetBrains, Kaazing, Krugle, Laszlo Systems, Lightstreamer, Manning Publications, Methods & Tools, Microsoft, Nexaweb, OpenSpot, OpSource, Oracle, Parasoft, Passport Corporation, PushToTest, Quasar Technologies, Rearden Commerce, Servoy, SmartClient / Isomorphic Software, SnapLogic, Sun Microsystems, TechTracker Media, Tele Atlas, The Thomson Corporation, ThinWire, TIBCO Software, TileStack, Universal Mind, Vertex Logic, Web Spiders, and Webtide.
Published December 25, 2007 Reads 25,277
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Yakov Fain
Yakov Fain is a Managing Director of Farata Systems, consulting, training and product company. He has authored several Java books, dozens of technical articles. SYS-CON Books released his latest co-authored book , Rich Internet Applications with Adobe Flex and Java: Secrets of the Masters in Spring 2007. Sun Microsystems has nominated and awarded Yakov with the title Java Champion. He leads the Princeton Java Users Group. He is an Adobe Certified Flex Instructor. Yakov co-athored the O'Reilly book "Enterprise Application Development with Flex". He twits at twitter.com/yfain.
- Asynchronous Logging Using Spring
- What to Expect in 2012: Cloud Computing and Open Source Software
- Will PaaS Finally Bring Open Source Love to the Enterprise?
- AT&T Joins OpenStack, Floats Cloud Architect
- Red Hat Sets Up GlusterFS Advisory Board
- Linux Virtualization and Tired Open Source Myths
- Acquia Announces Two New Board Members
- OpenOffice.com Lives
- Cloud Computing: A Platform-First Approach
- Powering the Cloud with Open Source
- Top 10 Open Source eCommerce Software (Joomla and Drupal)
- Piston Delivers First OpenStack-Based Cloud OS
- Adobe Sends Flex to the Apache Foundation
- i-Technology in 2012: Five Industry Predictions
- Microsoft Tries Hadoop on Azure
- OpenXava 4.3: Rapid Java Web Development
- Asynchronous Logging Using Spring
- StorSimple Supports OpenStack
- What to Expect in 2012: Cloud Computing and Open Source Software
- Will PaaS Finally Bring Open Source Love to the Enterprise?
- AT&T Joins OpenStack, Floats Cloud Architect
- More Use Cases for Big Data Analytics
- Red Hat Sets Up GlusterFS Advisory Board
- Linux Virtualization and Tired Open Source Myths
- After Ubuntu, Windows Looks Increasingly Bad, Increasingly Archaic, Increasingly Unfriendly
- SCO CEO Posts Open Letter to the Open Source Community
- Simula Labs Launches Hosted Delivery Platform To Enable Enterprise Open Source Adoption
- Where Are RIA Technologies Headed in 2008?
- Source Claims SCO Will Sue Google
- How Open Is "Open"? – Industry Luminaries Join the Debate
- Latest SCO News is Plain Weird
- SCO Claims Linux Lifted ELF
- IBM Tells SCO Court It Can't Find AIX-on-Power Code
- Flashback: Investing in 'Professional Open Source' - Exclusive 2004 Interview with David Skok, Matrix Partners
- Developing an Application Using the Eclipse BIRT Report Engine API
- HP Starts Pushing Desktop Linux




















