So when I last posted an article, I did an example on PureMvc. It was just something small and simple. One of the thing I do not like about PureMvc though (plan on writing an article about this later) is the mediators “handleNotification” function. It seems to almost be common practice with PureMvc that you have this function and it just turns into a massive switch statement to find out what came back, where it goes, how its handled, etc. Fine some something small, but we have all seen what can happen with rogue switch statements. I’m sure there are more eligant work arounds for this, but I see it as a decent sized flaw.
Read more…
Marcel Flex, tutorial Actionscript, fabrication, Flex, howto, puremvc, tutorial
Well it has been awhile since I have written anything, but that doesn’t mean that I haven’t been busy. Lately at work I’ve been working a lot more closely with Flex, writing some pretty creative/new custom components, learning a lot, etc. Lately we discussed the possibilities of switching from the standard use of Cairngorm to the use a PureMVC, so I wanted to go over a brief tutorial of PureMVC to show how its used. Later I will be posting a short article over the differences of cairngorm vs PureMVC.
Read more…
Marcel Flex Actionscript, Flex, puremvc
So at work, I am given the task to refactor a lot of DTO’s. It’s an unfortunate lump of busy work, but at least eclipse has a built in generate getters/setters option. However, it doesn’t have a ToStringBuilder generator and it is beyond a pain to type .append(”class1″,class1).append(”class2″,class2), etcetcetc.
Luckily I found a plugin that generates them for you. You can also customize how you want your class to be generated. Its a nice small plugin that could save you a lot of time.
Marcel Random Notes
Alright so my updates have been lacking, but that is because I have been working on a version of Sets in Flex. Sets is a really fun card game that apparently Mensa loved in the early 90’s and gets somewhat addictive. Right now its still in beta and has some bugs that need to be worked out. The game itself works, its just that nothing happens at the end, the timer doesnt restart when you click ‘restart game’ and there are other features I want to add (high score maybe?). But the game is fully playable and newer images will be added soon. Also I will be posting the code after I clean it up a bit for everyone to check out.
Check out the wiki for the rules and give it a shot!
Marcel Flex Flex
In this article I want to discuss the Template Pattern. One of the main reasons why I wanted to talk about it is that it holds a few similarities to the Strategy Pattern (which I recently wrote an article on). At the end of this article, I will discuss the differences between the two in hopes to help you choose what fits best for you.
So what is a Template pattern? A Template is a way for use to define the skeleton of an algorithm in an abstract class. The skeleton for our algorithm is defined within a final method, so the outline cannot change. How these methods are carried out are then defined within the subclasses. When used, it gives an inverted control structure, where the super class calls the subclasses methods. This is also how it became known as the Hollywood Method, or “Don’t call us, We’ll call you.”. So lets take a closer look.
Read more…
Marcel Design Patterns Design Pattern