Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
5Activity
P. 1
10 Things a Good Flex Developer Should Know

10 Things a Good Flex Developer Should Know

Ratings: (0)|Views: 737 |Likes:
Published by Naveen Kumar

More info:

Categories:Topics, Art & Design
Published by: Naveen Kumar on Aug 29, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

10/30/2011

pdf

text

original

 
Posted by Jeremy MitchellIt takes more to be a good Flex programmer than simply knowing how to use some built-in Flex containersand controls. It takes significantly more.Here's my take on the subject...along with some resources or some keywords that you can easily Google.
1. Object-oriented programming (OOP)
The language on which Flex is based, ActionScript 3, is a fully object-oriented language. Although not an easyconcept to grasp, object-oriented programming is a prerequisite to learning Flex. If your prior experienceincludes OOP (Java, C#, Ruby, etc), then you're set. If not, you'll need to pick up an OOP book and startlearning ASAP.
Head First Java(Java? Yes, I know. But trust me.)
Object-oriented programming with ActionScript 3.0 Note: Some of you may be asking - "What about design patterns?". Let's take one step at a time, shall we?Concern yourself with understanding classes and objects, interfaces, inheritance, composition, polymorphism,encapsulation, etc. Only then should you even consider looking at design patterns. In fact, if I write a postentitled "10 Things A GREAT Flex Developer Should Know", design patterns will be 1st on the list.
2. ActionScript / MXML
ActionScript is the programming language used along with MXML to create Flex applications. MXML is tag- based declarative language written in XML. Each MXML tag is mapped directly to a correspondingActionScript class. MXML is primarily used by Flex developers to lay out the UI, whereas, ActionScript is usedfor business logic. Exceptions apply, of course.The Flex Framework includes hundreds of ActionScript classes and interfaces used to develop Flexapplications. Your skill level as a Flex developer is tied directly to your proficiency with ActionScript andMXML.
Essential ActionScript 3.0 Note: You should be VERY familiar with theFlex Language Reference. As a Flex developer, you will use it ona daily basis.
3. Debugging
A large portion of any developer's time is spent debugging. Obviously, debugging is required to track down theroot cause of bugs. However, debugging is also a great way to learn a new code base.Fortunately, there are many tools available to assist you with your debugging efforts. Invest some time inlearning these tools. Your investment will pay dividends immediately.
 
4. Event-driven programming
Flex applications are event-driven. Every action is the result of an asynchronous event.As a Flex developer, you must know how to respond to events and how to create and dispatch events. Toaccomplish this, a solid understanding of Flex's event architecture is required including familiarity with thefollowing concepts:
Built-in events (Flash Player or Flex Framework events)
Custom events (Events created by the developer that extend the Event class or one of its subclasses)
Event dispatchers, event broadcasters (See EventDispatcher class and its dispatchEvent method)
Event listeners, event handlers (See EventDispatcher class and its addEventListener &removeEventListener methods)
Event Flow (capture, target & bubbling phases; target vs. currentTarget)
Event objects, event types (See Event class and subclasses)
Event default behavior (See Event class and subclasses and its preventDefault method)
5. Data binding
On the surface,data bindingis a no brainer. Bind the value of one property to the value of another propertyusing curly bracket notation. When the value of the source propertychanges, so does the value of the property.However, there is overhead associated with data binding and indiscriminate use can have performanceimplications. A solid understanding of data binding will help you determine when it is appropriate and when itis not.
6. Item renderers
One characteristic of a well-designed Flex application is the presentation of data in a visually-compellingmanner. Flex provides a number of list-based controls (DataGrid, List, TileList, HorizontalList, etc) responsiblefor the presentation of data. However, only with the help of an item renderer can a list-based control customize the display of the data. You will spend a lot of time working with item renderers. Get very comfortable with how they work.
7. Accessing remote data
Do you know of many applications that don't interact with data? Me neither. Learn how to retrieve data viaHTTPService, WebService and RemoteObject. A Flex architecture framework may also help you with this (see#9).
 
8. Styling / Skinning
Let's not forget that Flex is a UI technology and as such certain design expectations exist. As a Flex developer,you should be able to customize the look and feel of your Flex applications using CSS styling and/or graphicalor programmatic skins.With Flex 4, there are no more excuses. Spend a little time getting to know the right side of your brain for once.It's a nice change of pace, and it will help differentiate yourself from other Flex developers.
9. At least one Flex architecture framework 
Most Flex architecture frameworks enforce a separation of concerns by implementing an MVC (model-view-controller) application design. In addition, many of these same frameworks dictate how your code should beorganized and packaged within your Flex project.Although many would argue that frameworks are unnecessary, I believe that Flex developers benefit in manyways from the experience of using one. Simply witnessing the techniques (good or bad) employed by aframework to solve complex architectural issues contributes to your growth as a Flex developer / architect.Also, it's hard to deny the fact that framework experience will substantially increase your marketability as aFlex developer.Jesse Warden recently told me "There are a few shops that don't use frameworks, but those are rare. It's in 'fashion' whether we like it or not." I agree.
10. Component lifecycle & the display list
I wasn't convinced of the need to learn the Flex component lifecycle or the display list until I wrote my first"custom" component (actually, it was a semi-custom component that extended Canvas). Until that time, I used built-in Flex components and blissfully lived in MXML land where the display list was handled for me. Never once did I encounter an addChild, createChildren or commitProperties method, and I used the creationCompleteevent for everything.My first custom component utilized a handful of asynchronous events, and I could not reliably predict the order in which each event would be handled. Only after I learned of the Flex component lifecycle methods and dirtyflags could I regain control.These lifecycle methods are already there. Learn how they work and use them to your benefit. Your life will beeasier and you'll lose less hair.

Activity (5)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
johntandra liked this
Pieter Bonne liked this
Bernard Toplak liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->