Recently by Adam Flater and Scott Sheridan

Inevitably, the process of coding your Flex applications will sooner or later result in some bugs. As a continuation of our coverage of the Flex Builder I.D.E., we focus this time on the built-in debugger tool, and a few of its capabilities. Those new to Flex programming should take away from this a basic understanding of how to use debugging as a means to pinpoint any problems in their code.

Having covered the finer points of installing Flex Builder last time, both in it's standalone form and as a plugin, we'll now focus on making sense of the work environment within Flex Builder. Novice Flex users should expect to take away from this article an understanding of the organizational structure of the Flex development environment within Flex Builder 3, as well as an appreciation for the power of the Flex Builder workbench.

It's likely that if you're interested in learning about Flex, you've already downloaded and experimented with Flex Builder 3. In the next few posts we'll be exploring Flex Builder. We'll start with the installation, and then go into more depth as we explain how the premiere tool for building Flex applications works. We've already made mention of the fact that Flex Builder is based on Eclipse, and we'll be discussing this useful tool as well.

In LFFS - 9, we included a "homework" assignment in the form of a non-functioning calculator with the hopes that those new to Flex may learn from attempting to get it to work. After I came up with a solution, it was code-reviewed by Adam, and a few changes were made in order to comply with best practices. We've included the source code for both, but we will be focusing our attention on the revised version as we go through an explanation of the code step by step.

In our last installment, we briefly introduced the MXML language. We learned that all MXML tags are used as a sort of "short hand" representation of ActionScript code in Flex applications. This time, we continue to look at MXML and it's role as a helpful tool within the Flex programming environment.

All of the material in this article involving code, and indeed all code examples so far in the series, have been written using Flex Builder 3.0. It's worth noting that although we haven't yet devoted an entire installment to the use of Flex Builder, (we will very soon), those new to Flex and wishing to learn more should definitely head straight to the Adobe product downloads page and grab their free 60 day trial. Flex Builder is as good as it gets as far as I. D. E. s are concerned, and a great way to learn programming is to start messing around with code to try to get things to happen. On that note, we've included a sample application for you to experiment with, but more on that later.

Let's continue our focus on the languages of Flex with a little discussion of MXML. We've learned that rich internet applications by their nature have more advanced functionality than say, a typical web page laid out with just HTML. We've also learned that the way a Flex application achieves this advanced functionality is by using ActionScript to provide the "logic" for its applications. Lucky for developers, there's a way to quickly employ the power of ActionScript to create applications that also have the look and feel of anything web based. Flex developers can use MXML.
In this installment of Learning Flex From Scratch, I'm going to diverge a bit
from the usual content, and devote this time to disclosing the most helpful resources I've found so far on my journey into Flex. There's a lot of information out there for those who want to learn Flex, but nonetheless it can be tricky sometimes to find that perfect resource that answers your questions.
flex-icon.png
Organizing data into chunks is a fundamental part of our cognitive experience. The ability to understand individual items in terms of their membership within a group saves our brains an immense amount of processing power. Imagine the difficult time you'd have if, when you went to the grocery store, all of the things you needed to pick up were written on separate pieces of paper instead of on a nicely organized list. You could still get your shopping done, but it would be a real pain to shuffle through all those individual sheets! In addition, you'd have to make sure that all of those sheets really actually contained things you needed to pick up from the store, and not perhaps, things that you already had in your refrigerator. In other words, using an organized system that groups items together into meaningful lists saves you a lot of time and effort.
flex-icon.png
In order for software to be useful, it needs to be able to react to its environment. Put another way, a program needs to have logic. The logic of an application gives it the ability to change course when a given condition is met. Program flow in ActionScript 3.0 is controlled by conditionals and loops. Both conditionals and loops are responsible for determining whether a particular code block is executed, and are therefore placed within a method body. The main difference between the two is that conditionals decide on executing one collection of statements over another, and loops allow a collection of statements to execute over and over. As we'll soon see, loops, like many things in object-oriented programming, are great tools that provide the very important element of scalability. But first, a bit about conditionals.
flex-icon.png
As promised, the current installment of Learning Flex From Scratch focuses on the syntax of ActionScript 3.0. We know from the previous post that an application written in an object-oriented programming language involves, by definition, the use of objects. Objects, we found out, are derived from classes, which serve as a blueprint for the object's methods and properties. This post goes into the details of creating a class in ActionScript 3.0, providing a foundation for our journey into the language. The code examples provided here are strictly theoretical, and shouldn't be thought of as a working piece of software, but rather as a starting point to illustrate some basic language concepts.

<< 1 2


Poll: Adobe and Zend Framework

Adobe and Zend announced their collaboration last week. How will this collaboration affect the applications you are working on?

Vote | View Poll Results | Read Related Blog Entry

Tag Cloud

Related Books

Development Series

Get an overview of the tools and technologies that work together to allow developers to build Rich Internet Applications (RIAs) quickly and easily.

Anatomy of an Enterprise Flex RIA

Archives


 
 


Or, visit our complete archive.  

About This Site

Welcome to the premiere community site for all things RIA sponsored by O'Reilly Media and Adobe Systems Incorporated.

About Us
Meet the Experts
Meet Our Contributors
Send Us Feedback