Archive

Author Archive

An indepth look at Flex Events

March 2nd, 2009

One of the great things about I love about Flex is that it is fairly close to writing a desktop application. You can, for the most part, even take a Flex application and publish it as an AIR application for your desktop. In my opinion, one thing that makes it extremely similar is the way it handles Events. Its all about the eventListeners. As we all know, it is never as easy as adding an eventListener in one spot and a eventHandler in another. Within this article, I want to discuss how to add and handle eventListeners, dispatching them, how to stop event from propagating, difference between a target and a currenttarget, and the ever important thought of when to remove events.
Read more…

Marcel Best Practices, Flex, Learn This, Opinion, Random Notes, tutorial , , ,

Learn This: When and how to make Immutable objects

February 24th, 2009

It can be sometimes difficult to see why someone would want to create an immutable class. We as programmers LOVE to be in control of things, which is what immutable classes limit us to. So what is an immutable class? An immutable class is a object who can not change once it is initialized. All values of that object are fixed and will not change throughout the lifetime of that object. While it may sound like something we dont want, in this article, I will discuss how to make an object immutable and I will also talk about when to use and not use them.
Read more…

Marcel Best Practices, Learn This, Opinion , , ,

Overriding core UIComponent Methods

February 19th, 2009

Whenever I am working on a Flex project, it is quite seldom that I have been able to take an out of the box component and have it do EXACTLY what I need to do (barring something like a Label). Sometimes I need to create a container component to use as an itemrenderer for a grid. However, sometimes it is not as easy as whipping up some mxml tags to layout what we need. Luckily though, there are 5 methods that every UIComponent implements* that we are able to override and manipulate our objects as we wish. These methods are createChildren, commitProperties, measure, layoutChrome and updateDisplayList. I will be giving a brief explaining of what they are and why we would override them. After that, I will be discussing the flags within UIComponent.as that call these functions and some things to watch out for when overriding these functions.
Read more…

Marcel Best Practices, Flex, tutorial ,

Intro to Google Maps API for Flex

February 18th, 2009

Google Maps has proven itself to be one of the best mapping systems on the internet. We have also seen a great number of google maps mashups take place (Everything some Subway maps to where is the cheapest gas). I only felt it would be nice to have an intro on how to use the google maps API with in Flex. On that note, it has been four posts since I have done a How-To article, so this is even more fitting. Within this tutorial, I will just go over some basics on how to add and edit Markers on a map and keep track of them in a grid.
Read more…

Marcel Flex, Google Maps API, tutorial , , ,

Learn This: When to use an Abstract Class and an Interface

February 12th, 2009

For some odd reason, work allows me to handle phone screens and interviews. Each time I give an interview, I try to do three things. First I ask them about general programming questions. This might be OO questions. It might be methodology questions. It might be design pattern questions. Next I like to ask them more specific technologies questions, such as questions “how do you do ABC in Flex? Java?”. Lastly I want to know what they do in their spare time. What books they read? Do they code outside of work? How they go about researching new technologies? Etc.
Read more…

Marcel Best Practices, Learn This, Opinion, tutorial , , ,