Archive

Posts Tagged ‘Best Practices’

Favorite Eclipse shortcuts

March 5th, 2009

Anyone who knows me knows that I hate touching the mouse. I do not like using it one bit. If there is a shortcut on the keyboard, its a pretty big guarantee I am going to do my best to find it. Being a programmer, I spend a massive amount of time using Eclipse. Naturally I have a pretty good understanding of all the shortcuts that make my life easier. Here a list of shortcuts that can help you. Also a brief how to on removing the most annoying shortcut of all, show in breadcrumbs.
Read more…

Best Practices, Opinion, Random Notes, tutorial ,

5 tips to help designers style your Flex components

March 3rd, 2009

Alright designers, lets get one thing straight. I don’t like you and you don’t like me. You design components that are either a)impossible/painstakingly difficult to build or b) has more transitional effects that even make a mac snob would vomit. Dare I complain? Too bad. The client already signed off on it and they loved it. Guess what though, jokes on you! Following my typical fashion, I have made it as easy to style as you have to build it. TAKE THAT EDGY COOL GUY(or girl)!.

Unfortunately, this vicious circle doesn’t help you and it doesn’t help me. You can call me lazy and I can call you a moron but it leads us to the same spot. With this in mind, I’ve recently decided to extend the olive branch. I have sat down with one of the main designers at my job and asked “What can I do to my components that will make your job easier?”. With a warm smile, he thanked me and gave me some good tips on how I can make not just his life easier, but also make my components just that much more versatile.
Read more…

Best Practices, Flex, Opinion, Random Notes, tutorial , , ,

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…

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…

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…

Best Practices, Flex, tutorial ,