OpenFlux Independant From Flex
Over the last month I've been working on getting OpenFlux independant from UIComponent and many of the other large Flex classes with a goal to create a much ligher framework.
OpenFlux Application (77KB)
Flex Application with OpenFlux Components (205KB)
I have two applications above that look exactly the same. The difference is one is a OpenFlux application with OpenFlux components and the other is a Flex application with OpenFlux components. Although the code is almost identical, the OpenFlux app compiles to 77kb and the Flex app compiles to 205kb. Before you think "oh great another framework" I'd like to point out the following:
1. OpenFlux components can be used with or without Flex
OpenFlux components all extend a class (currently called PhoenixComponent) that implements IUIComponent allowing them to work with or without Flex. Likewise, you can use Flex classes and projects like Degrafa and Mate with pure OpenFlux applications.
2. This is not a completely separate framework, just lighter weight implementations of Flex's interfaces
We'll continue to use the parts of Flex that work well but replace the parts can be done better. Luckily the Flex team uses interfaces well allowing us to use our own implementations for almost every piece of the framework.
3. MXML, CSS, Resource Bundles and Data Binding all still work with pure OpenFlux apps
These 4 features of Flex make our lives as developers way easier and I wouldn't have even bothered continuing getting OpenFlux independant from Flex if it ment I'd have to build all my applications in pure AS3. Utilizing these features do add size to your compiled application but I think the benefits they provide make it well worth it.
4. Flex is monolitic, OpenFlux is modular.
My opinion is if your application is loaded over the internet it should be highest priority to keep the application size small and don't include any code that you aren't utilizing. For example, the List component in this application doesn't need drag n' drop support so that code isn't included.
Even if create a basic Flex application with just a List component that application's optimized compile size is 250kb. Actually, an OpenFlux application is even smaller then a Flex application that uses Runtime Shared Libraries. I think 77kb even is too large though and it's an on going effort to continue reducing the size of OpenFlux applications.
So what's next?
Our goal is to have an OpenFlux SDK you can use with Flex Builder and an OpenFlux.org website available in time for 360|Flex Indianapolous. I have a session called "OpenFlux and Flex 4" where I will discuss the differences between the two frameworks, give examples on when to use one over the other and how you can use them both together.
Over the last month of coding/experimenting we weren't even sure if our goals were possible. Now that we've been able to accomplish mainly what we hoped for we'll be focusing on resolving issues, documentation and examples.


March 11th, 2009 - 10:18
Ryan, startup speed is unbelievable. How can this dependency of Flex can be turned off? Simple application source code with extending from PhoenixComponent would be very helpful
Keep up the good job!
March 11th, 2009 - 10:42
I’m still working out some issues that are pretty major before releasing a new swc and docs. The goal is to have this ready for prime time for 360|Flex.
Mainly just posting this as a tease for now
March 12th, 2009 - 03:17
“replace the parts can be done better”
So have you had to drop any features that plain Flex has ?
March 12th, 2009 - 05:27
The main spot I dropped features is mainly in my own SystemManager.
Keep in mind though I haven’t actually modified the Flex SDK or removed any code from it. The goal is to keep the initial dependancies low but stay compatible will all Flex features and include them in your app as needed.
March 12th, 2009 - 15:31
Hi Ryan,
Im very interested trying OpenFlux, Im working in a huge Flex Enterprise App with more than 150 Flex Modules, so my question is How does OpenFlux interact with them, i mean its transparent for the developer?
Thanks Ryan, great job!!
March 13th, 2009 - 02:05
“Although the code is almost identical, the OpenFlux app compiles to 77kb and the Flex app compiles to 205kb.”
Isn’t majority of that cached nowadays though?
March 13th, 2009 - 05:59
Yes, but even if I turn on RSL the Flex app is still 101kb and you’ll also need to download a 565kb swf the first time you access the app.
I see RSL as temporarily trying to avoiding the issue instead of solving it.
April 7th, 2009 - 04:16
Nice job in taking on the SystemManager. That one would be fun.
Next up, the DragManager and Flex 4′s StyleManager, those things need complete overhauls.
July 22nd, 2009 - 09:25
Hello forum. My name Şenol. I made a new web page.
I’ve created 3 flex app.
App Filter, app demand report, app google map.
Companies will be listed in the App Filter SAMPLE ISTANBUL CITY
App demand reports LIST REQUEST
app google map. GOOGLE MAP LOCATION companies to DEMO you write comments
December 23rd, 2009 - 00:45
Hi Ryan,
If you want, please share the code for openflux without flex dependencies,
your minimalcomps example is great, but seems that openflux is better to develop a few components that I need
thanks in advance