Mon 25 Feb 2008
The big day is finally here! Flex Builder 3 is shipping, and the Flex 3 SDK and AIR 1.0 runtime are available for free download. I actually hadn’t been keeping up with all the latest AIR stuff, so it’s been fun checking out all the great AIR apps that have already been posted.
We’ve also just launched the Adobe Open Source portal, a one-stop shop for all Adobe open source technologies, including Flex, BlazeDS, and Tamarin.
Download, design, develop, and enjoy!
digg this |
del.icio.us |
February 28th, 2008 at 4:33 pm
Hi nj,
Great work on Fl3!
I am interested in what the best practice approach is for Flex to have a set of re-usable UI building blocks, some of which might be skinned derivates of the build-in ones and some of which might be new components (compound or from scratch) for reuse within a group or department, all of which should look like they are visually branded in a certain way. What is the best way to create this and package it up for other Flex users to re-use? Thanks for any pointers!
February 28th, 2008 at 6:15 pm
Hey German–great to hear from you! It’s been awhile.
I’m not really an architecture/best practices guy, but here’s my take on your question. For entirely new components, the easiest thing to do is to package them in a SWC. In Flex Builder, you can do this by creating a Flex Library project and putting the components in there.
For customized versions of the built-in components, you have two options. If all you’re doing is skinning/styling them, then (as you probably know) you set up the skins and styles in a CSS stylesheet. If you’re additionally adding custom functionality, then you’d probably want to subclass them instead (or in addition), in which case you could package them in a Flex Library project as before.
Now, ideally, you could include both your CSS stylesheet (for skinned built-in components) and your custom components in the library SWC, and in fact Flex allows you to do this–if you call the stylesheet “defaults.css”, and put the SWC in the library path of your main app project, Flex will automatically link the stylesheet in. The problem is that Design View doesn’t currently support this.
So, my suggestion for now is:
– Put your custom components in a SWC
– Create a CSS stylesheet for all the skins/styles for built-in components as well as your custom components
– Hand these two things off to your users.
Your users will need to: tag to their main application
– Put the SWC in the library path of their Flex project
– Put the stylesheet in their main project source folder
– Add a
Hope this helps–let me know if it works for you.
February 28th, 2008 at 6:18 pm
Oops–something got left out of my comment. “Add a tag to their main application” should read: “Add a <mx:Style source=”styles.css”/> tag to their main application” (where styles.css is the name of your stylesheet file).
February 29th, 2008 at 2:58 am
Thanks, great - this sounds doable! Will let you know how it goes…