Well a little off topic compared to my usual Flex related posts but I always try to keep my friends and family updated as to the progress on my project car. My mates keep asking whens the first beach run and my girlfriend when can she take it for its first shopping run *shudder*
For those not in the know this convertible mustang started out in a bad way when I found her
I rebuilt the chassis (frame for the US people) and then proceeded to pretty much replace the entire body. Getting it on the chassis machine to check my workmanship etc.
After replacing the entire floor in both the cabin and the boot (trunk) I then had to replace most the engine bay and outer panels….weeeee. Along haul but I can now say I have built a car from scratch.
I also won some awesome Bridgestone rubber so I decided to splash out some pretty mags
Lately I have been slowly putting it back together as time and weather allowed
I went to welding school at MIT to get my welding tickets so I could do everything myself. Its kind of a nice way to break away from the computer and do something with my hands. Now comes the task of panel work and using as little bog (bondo) as possible to get her straight and off to the paint shop. So stay tuned for the beach run photos but as its hailing outside at the moment that may be a while off.
Having been on my Metadata train of though I finally found the time to hunt out in the compiler source where this all happens. Please bear in mind I am no Java buff, nor do I claim to be. In fact quite the opposite
Basically there are a list of Metadata tags in the Flex framework that when they appear in your AS3 or Mxml source, they get “preprocessed” by the compiler. Basically the compiler looks for these tags and modifies the code that appears below it according to a template. I was looking into how I could add my own “preprocessed” tags to the mix and unfortunately it seems that a custom build of the compiler would be the only solution (please correct me if I am wrong)
If you would like to see what happens.. The compiler uses a .vm file (some strange Macro file) to add watchers and setup functions to your classes for [Bindable] etc. Check out the ClassDefLib.vm file and scroll to the bottom and you will see:
Below the comments you might be able to figure out how it builds up the bindingsSetup function.
But I digress. The whole point of me tracking this down so I could… well for lack of a better work… Hack the compiler for my own selfish needs.
I find myself asking the question “are there more people out there that want to do the same“, have their own preprocessors for Metatags and build up their own libraries of time saving “preprocessors”. I imagine so. I guess it comes in under the feature request area.
I would love to see us as developers have some config file where we specify the tag and the appropriate template file and the compiler runs off and does some of the hard repetitive coding for me. We could specify a xslt file and knowing the variables that might be coming in would could build/add to code source.
[CampbellsSuperTag] :: someTeplateFilepath.xslt
Off to http://opensource.adobe.com I go….
After seeing Shunjie’s post I though I would try it out
As I mentioned in a previous post, I recently got back from WebDU in Sydney (pronounced seeeeyyed ` kneee in the local tongue). One of the best Flex related presentations was related to the startup cycle of flex apps. The Big Bang theory relates here.
Delivering the presentation Michael Labriola took what could have been quite a painfully subject and managed to keep it interesting and extremely informative relating it to situations that we often encounter during Flex development. So if you get the chance to see him present this topic (and as a side note get told off for all your bad coding habits) definitely take the opportunity as I suspect you will learn a lot of the little secrets which help form our flex apps. Slides below but really see it in person if you can