Flex/Actionscript UML Tool: UML4AS

Anyone remember Saffron?  I was never certain if this project was ever going to come to fruition, so lately I was thinking excessively about making my own.  I started searching for inspiration in other UML tools so I could design a better user interface.  Low and behold, I stumble across UML4AS, a brand spanking new project that does just what I was planning of doing.

It integrates completely with Eclipse (and Flash Builder) and has this neat feature called CodeSync that makes sure your model and code is always persisted between each other.  In other words, everything works together in an integrated workflow to save you time.

I’ll have to dig deeper, try this out on projects and do a complete review.  In the meantime, please support this initiative by registering and posting on the forum.



RichTextArea Component

A few months ago, I was working on a project that needed a CMS backend to create content that will be displayed in Flex. We used a RichTextEditor component to create appropriate HTML so that it would display like we wanted to on the frontend.

The problem with this approach is that we needed our application to be re-themeable between different clients that would be using this product, which meant that we also needed a way to style the html content without having to redo the html itself.

Read more…



Actionscript Deferred Instantiation

While I was making a custom component which would take certain data which would then create objects that were then added dynamically to a ViewStack. This was all done with Actionscript and I was wondering why all the object were being created the second they were added to the ViewStack. This confused me because the standard behaviour when using ViewStacks in Flex is that nothing is created until it’s needed. It’s called deferred instantiation and it’s something that Flex does quite a bit in it’s process to reduce load time and memory consumption.

However, I quickly learned that when you use Flex based components and you create them with Actionscript, their behaviours change.  This annoyed me because it’s another bad development design implemented in Flex (behavior change) which doesn’t make any sense.  But yet again, there is a workaround for it.

What needs to be done is when you add whatever component to your Viewstack, you just need to set the creationPolicy to ‘none’.  This will prevent the early instantiation of your component until the Viewstack actually needs it.



Actionscript Enumerated Types

One thing that annoys me from time to time  is the lack of support for enumerated types.  For those without experience in different languages (like C++), an enumerated type (enums) is an easy to way specify a data type to a variable that has a set amount of possibilities.

For example, if you have a class named ‘DeskLamp’ that has a property ‘state’, that property could be a of a ‘LightState’ enum which only has 2 possible entries, ‘On’ or ‘Off’.

Get the idea?  This has many advantages to developers because it limits the possible inputs to that property and saves time because typos are caught at the compiler and not during runtime, which can be hard to debug.  Essentially, it restrains developers from making a mistake; this can save time when developing in a team environment.

Read more…



Ottawa Flash Platform Meetup

A few weeks ago I was asked by Tristan Roscoe, the current Ottawa Flash Platform Usergroup manager to help him with organising this monthly meeting; to spread the word and get some proper content.

The next meetup is June 3rd at the Adobe building on Preston Street. I urge anyone that works with Flash in any way to attend; It’s a great way to network and learn about the industry. So go register for it right away!



« Older Posts