For the last few months, I have worked quite a bit with Flex and at times, the complexity of the framework really makes it hard to work with. I have mentioned my problems with Flex in an earlier post but the gist of it was:
- A lot of our projects are widgets rather than apps that are as big as the webpage itself. The smaller the apps get in dimensions, the more unacceptable the load time becomes, so we could not create apps that compiled to swfs greater than 250k (even with framework caching).
- Flex apps are memory intensive on their own and I really need that memory for other things like rendering high def video (which a lot of our apps do).
- I want to build apps that are more expressive that what Flex lets me do.
Given these requirements, I have started working on an open source framework modeled after the Flex framework but with the primary goal of being really light and easy to extend. The project is actually being developed within the Flash team at Comcast Interactive Media to allow us to develop apps faster and give all the developers here a common standard to develop against. It started out as an R&D project but is now an official CIM project, so will definitely evolve in the next few months.
OpenPyro is not really complete but its at a good point where I can show it off a little bit and get some feedback. Here is what the framework does so far:
- A bunch of pre-built components like Buttons, Sliders, Scrollbars, etc (1.0 release should have most of the components we are used to)
- Has an explicit component lifecycle very similar to Flex with the concept of invalidation and differed UI update
- Layout management including using percent based layouts (so you can set a dimension of a control as a percent of the container its sitting in using percentWidth or percentUnusedWidth). Also there are no layout specific containers (like H or VBox) but rather a container can be assigned any layout.
- Runtime skinning
- Separation the look of the controller (based on a skin file) with its behavior (like Flex 4 or OpenFlux) [work in progress]
- Concept of Painters (not as complex as Degrafa yet but still pretty good and getting better)
- The components are not tied to the framework. So you can just use a component like a Scrollbar or Slider in your As3 / Fla project.
The best part is even some pretty complex layouts like the image below weigh only around 23k. Imagine doing that with separate V and HBoxes.
There is also a bunch of other classes (a collections framework-esque package as well as a host of utility classes) that I will migrate to OpenPyro once the core components are at a good point. So stay tuned for that.
Of course with all its wins, there are still things in Flex that OpenPyro will not be able to do:
- Data Binding: Since Flex does this at compile time using code generation, this has not been done.
- XML based layout: This may happen later (and may or may not be compile time) but this is definitely a phase 2 thing.
I will post more examples in a couple of days to show some actual apps built with OpenPyro, but in the meanwhile take a look at the video below and let me know if you have any comments on the direction the framework is taking. If you want to look through the source code, the project is hosted at the github. OpenPyro will be released under the MIT license. There is also a google group for the project at http://groups.google.com/group/as3-pyro-user-group/.
9 thoughts on “A sneak peek at OpenPyro: A lightweight alternative to Flex”
exciting stuff! i’m very interested in alternatives to the flex framework.
as a matter of interest, what’s the swf filesize for the Release build of the demo app from your screencast?
looking forward to seeing the framework progress.
@Shaun The final swf size was around 27k. Not bad 🙂
looks great…i will definitely check this out…
is there a way to hide the scrolling contents on the lower left side?
@ds you mean the right handside below the scrollbar right? Yeah thats where flex places a white box. I still need to do that.
Ð Ð°Ð·Ð´ÐµÐ» ÑÑ‚Ð¾Ñ‚ Ð·Ð´ÐµÑÑŒ Ð¾Ñ‡ÐµÐ½ÑŒ ÐºÑÑ‚Ð°Ñ‚Ð¸. ÐÐ°Ð´ÐµÑŽÑÑŒ, Ñ‡Ñ‚Ð¾ ÑÑ‚Ð¾ ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ðµ Ð·Ð´ÐµÑÑŒ Ðº Ð¼ÐµÑÑ‚Ñƒ. ÐÑ‚Ð¾ Ð¼Ð¾Ð¹ Ð½Ð¾Ð²Ñ‹Ð¹ Ð¿Ñ€Ð¾ÐµÐºÑ‚ – Ð·Ð´ÐµÑÑŒ Ð±ÑƒÐ´ÐµÑ‚ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑŒÑÑ ÑÐ°Ð¼Ð°Ñ Ð½ÐµÐ¾Ð±Ñ‹Ñ‡Ð½Ð°Ñ Ð¼ÑƒÐ·Ñ‹ÐºÐ° Ð´Ð»Ñ Ð²ÐµÑ‡ÐµÑ€Ð½ÐµÐ³Ð¾ Ð¸ ÑƒÑ‚Ñ€ÐµÐ½Ð½ÐµÐ³Ð¾ Ð¿Ñ€Ð¾ÑÐ»ÑƒÑˆÐ¸Ð²Ð°Ð½Ð¸Ñ. Ð¯ Ð½Ð°Ð¼ÐµÑ€ÐµÐ²Ð°ÑŽÑÑŒ Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ñ‚ÑŒÑÑ Ð¿Ñ€Ð¸ Ð¿Ð¾Ð´Ð±Ð¾Ñ€Ðµ Ð»Ð¸ÑˆÑŒ Ð½Ð° ÑÐºÐ¾Ð¹ Ð²ÐºÑƒÑ. ÐÐ¸ÐºÐ°ÐºÐ¸Ñ… Ð´Ñ€ÑƒÐ³Ð¸Ñ… ÐºÑ€Ð¸Ñ‚ÐµÑ€Ð¸ÐµÐ² Ð´Ð»Ñ Ð²Ñ‹ÐºÐ»Ð°Ð´Ñ‹Ð²Ð°ÐµÐ¾Ð¼Ð¹ Ñ‚ÑƒÑ‚ Ð¼ÑƒÐ·Ñ‹ÐºÐ¸ Ð½Ðµ Ð±ÑƒÐ´ÐµÑ‚. Ð§Ñ‚Ð¾-Ñ‚Ð¾ Ð¿Ð¾-Ð¼Ð¾ÐµÐ¼Ñƒ Ð¼Ð½ÐµÐ½Ð¸ÑŽ Ð±Ð¾Ð»ÑŒÑˆÐµ Ð¿Ð¾Ð´Ñ…Ð¾Ð´Ð¸Ñ‚ Ð´Ð»Ñ ÑƒÑ‚Ñ€ÐµÐ½Ð½ÐµÐ³Ð¾ Ð¿Ñ€Ð¾ÑÐ»ÑƒÑˆÐ¸Ð²Ð°Ð½Ð¸Ñ. Ð§Ñ‚Ð¾-Ñ‚Ð¾ – Ð´Ð»Ñ Ð²ÐµÑ‡ÐµÑ€Ð½ÐµÐ³Ð¾.
ÐÐ°Ð´ÐµÑŽÑÑŒ, Ñ‡Ñ‚Ð¾ ÑƒÑ‡Ð°ÑÑ‚Ð½Ð¸ÐºÐ¸ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ ÑÐ°Ð¹Ñ‚Ð¿ Ð½Ð°Ð¹Ð´ÑƒÑ‚ Ð´Ð»Ñ ÑÐµÐ±ÑŽÑ Ñ‡Ñ‚Ð¾-Ñ‚Ð¾ Ð´Ð¾ÑÑ‚Ð¾Ð¹Ð½Ð¾Ðµ Ð²Ð½Ð¸Ð¼Ð°Ð½Ð¸Ñ.
Ð£Ð²Ð¸Ð´Ð¸Ð¼ÑÑ Ð½Ð° ÑÐ°Ð¹Ñ‚Ðµ!