getting dirty with the flex sdk

32
Getting Dirty With the Flex SDK Nate Beck Senior Adobe Developer at T-Mobile USA & Co-Founder of BugQuash.com

Upload: nate-beck

Post on 07-Jul-2015

2.301 views

Category:

Technology


1 download

DESCRIPTION

A recording of this presentation can be found here: http://blog.natebeck.net/2009/07/getting-dirty-with-the-flex-sdk-slides-and-recording/ So the Flex SDK is open source now, but what does that mean to you? You are a Flex developer but you have never even looked at the code powering the Flex SDK. This session is focused on Flex veterans as well as beginners who want to get their hands dirty with the inner workings of the Flex SDK. This session will equip you with the knowledge to get started developing for the Flex framework itself. We will cover the following topics: - Resources to learn about the inner workings of the Flex SDK (Coding Conventions, Specs, etc...) - Subversion, ANT, Mustella... What they are, and how they are used with the Flex SDK. - Obtaining the Flex SDK source code. - Setting up Flex Builder for working with the Flex SDK. - Common pitfalls when getting set up. - Finding bugs to fix - How to run check-in tests. - How to submit a patch, creating diff files. - Getting involved in the community.. BugQuash, reviewing patches, spring cleaning the bug system. This session will be presented by Nate Beck, one of the creators of BugQuash. Nate is an active member the Flex community, and has first-hand knowledge of the excitement and addiction that is contributing to the Flex SDK.

TRANSCRIPT

Page 1: Getting Dirty With the Flex SDK

Getting DirtyWith the Flex SDKNate Beck

Senior Adobe Developer at T-Mobile USA

& Co-Founder of BugQuash.com

Page 2: Getting Dirty With the Flex SDK

Flex is Open SourceSo What?

Page 3: Getting Dirty With the Flex SDK

We get to make a great product even better.

We have the ability to submit our own fixes.

Collaboration is key for a successful platform.

So, Flex is Open Source

Page 4: Getting Dirty With the Flex SDK

What’s in it for me?

As I’ve already said, Open Source is a good thing. But there are some other reasons why you should get involved.

Bragging Rights!

Know the Flex SDK better than 90% of every other Flex Developer out there.

Free Stuff! The Flex Team will buy you an Adobe related book for every 3 patches that are accepted.

Page 5: Getting Dirty With the Flex SDK

What this talk is about

The tools and processes that are used for development of the Flex SDK.

Tips and tricks that will make your life easier.

And hopefully, a quick demo.

Page 6: Getting Dirty With the Flex SDK

What this talk isn’t about

In-depth Operating System specific setup (with the exception of some tips).

OpenSource.Adobe.com/flex has excellent resources for your specific OS.

Page 7: Getting Dirty With the Flex SDK

Where to start

Adobe’s Open Source Website (http://opensource.adobe.com/flex)

Select “Developer Documentation” under the Flex SDK Project. Then select “Set up your development environment”.

Tip -- There are links near the bottom of this page for your specific operating system.

Page 8: Getting Dirty With the Flex SDK

What you’ll needSubversion (command-line or a GUI)

Apache Ant

Java 2 Software Development Kit

Configure your Flash Player

Configure your operating system (Adobe provides a script to take care of this)

Cygwin (if you’re on Windows, read the Windows specific setup)

Page 9: Getting Dirty With the Flex SDK

Wow Nate, that’s a lot.

It’s not as hard as it seems.

You only need to set this up once on your development machine.

Let’s dive in.

Page 10: Getting Dirty With the Flex SDK

SubversionSubversion (commonly known as SVN) is an open-source version control system.

There are two ways you can work with subversion:

You can use the command-line tool.

You can use a GUI.

SmartSVN (mac) || TortiseSVN (win) are good options.

TIP -- Adobe’s OpenSource site assumes you are using command-line. So we’ll use that in this talk.

Page 11: Getting Dirty With the Flex SDK

Ant (Another Neat Tool)

Apache Ant is a software tool for automating software build processes. It is similar to make but is implemented using the Java language.

Therefore, it requires the Java platform.

Ant uses “build files” to automate compilation of the Flex SDK.

Page 12: Getting Dirty With the Flex SDK

Java 2 Software Development Kit

Tip -- Windows users need to follow the Windows instructions carefully. The Flex SDK build script assumes that the Java JDK is installed in a very specific directory.

Tip -- On Mac OS X, Just run Software Update. This ensures that you have the latest Java binaries. Thanks Apple.

Page 13: Getting Dirty With the Flex SDK

Okay, I think I’m good to go.

Great! Let’s double check our setup. Open up your command-line. Terminal on Mac, Cygwin on Windows.

ant -version

svn --version

java -version

echo $JAVA_HOME (echo %JAVA_HOME% on Windows)

Page 14: Getting Dirty With the Flex SDK

Sweet... now what?

If that worked, pat yourself on the back and get a drink... because we’re just getting started.

I’ll wait.

Page 15: Getting Dirty With the Flex SDK

Time to check out... the code that is.

Page 16: Getting Dirty With the Flex SDK

Getting the Source Code

Head back to Adobe’s Open Source Flex site(http://opensource.adobe.com/flex)

Select “Source” under the Flex SDK Project.

TIP -- Use the Flex project skeleton provided on this page so you don’t have to check out EVERYTHING.

TIP -- Using the “svn up” command will allow you to select which directories and files you want to download.

Page 17: Getting Dirty With the Flex SDK

Finding bugs to quash...(If you don’t have your own)

“Software is by its nature an imperfect science and often small defects exist. With enough eyes, bugs are much easier to see, understand, and eliminate.”

-- Ted Patrick, Adobe

Page 18: Getting Dirty With the Flex SDK

Sign up for Adobe’s Bug System (JIRA)

Go to Adobe’s Bug website: http://bugs.adobe.com/flex/

Register if you haven’t already.

This is the site where users come to submit bugs against the Flex SDK.

This is also the site we use to find relevant bugs for us to work on.

Page 19: Getting Dirty With the Flex SDK

On the hunt for a bug

If you don’t have a “pet” bug in mind already that you want to work on, you can find one in the Adobe Bug system.

TIP -- The bug system has a special milestone called “SDK Community Bug Fix Candidates”. There are bugs that the Flex Team specifically has asked the community to fix (http://bit.ly/aEEfa).

Page 20: Getting Dirty With the Flex SDK

Become a contributor

Before you can submit a patch, you must become a contributor.

It’s easy, just fill it out and send it in (but, read it first of course). Once submitted you will have a new link when you are logged in to Adobe’s Bug System (JIRA) called... Submit Patch.

Another perk to being a contributor is you get a sandbox to play in.

Page 21: Getting Dirty With the Flex SDK

Time to get dirty...Ninja-style

Page 22: Getting Dirty With the Flex SDK

Setting up Flex Flash Builder

The Flex SDK Team has been very kind to us... they have given us all that we need to use Flash Builder to develop the SDK.

TIP -- When using Flash Builder to develop on the SDK, remember to add a Linked Resource for “FLEX_SDK”.

TIP -- If you run into problems when switching between different versions of the SDK, make sure your Linked Resource setting is correct.

Page 23: Getting Dirty With the Flex SDK

The Woot Label

Demo

Page 24: Getting Dirty With the Flex SDK

Set Environment Variables

The SDK has scripts that will automatically set your environment’s variables.

Change to the version of the SDK you are working with... (ex. 3.x or trunk) and run:

source setup.sh

TIP -- On Windows, you should be running this command from Cygwin.(more info here: http://bit.ly/1aNlDp)

Page 25: Getting Dirty With the Flex SDK

Configure Flash Player

Follow the steps found on the Open Source site (under Configure Flash Player on http://bit.ly/1aNlDp) to:

Make changes to or create mm.cfg if it doesn’t exist.

Download FlexSDK.cfg into FlashPlayerTrust.

TIP -- If you run into SecurityErrors you may need to add more paths to the FlexSDK.cfg file. I had to add /flex/sdk/branches/3.x and /flex/sdk/trunk.

Page 26: Getting Dirty With the Flex SDK

Testing The Fix

The Flex SDK team has an automation tool called “Mustella” which they use to test the SDK.

To run the check-in tests from command-line, change to the version you are working on and run:

ant checkintests

Page 27: Getting Dirty With the Flex SDK

Creating The Patch

svn status

svn diff Label.as > patch_wootLabel.diff

Page 28: Getting Dirty With the Flex SDK

Where to go from hereAdditional Resources

Page 29: Getting Dirty With the Flex SDK

OpenSource.Adobe.com

Be sure to spend some time looking around this site. It has almost all the information you could ever want about the Flex SDK... including:

Detailed Setup Instructions

Coding Conventions

In-Depth Specs and Whitepapers

Page 30: Getting Dirty With the Flex SDK

Bug Quashes are fast paced, high energy events. With food and drinks, good music, lots of code and breaking things. Good times to be had.

Created by Nate Beck, Marty Mickelson & Mike Johnson

The next BugQuash event is being planned right now, the date is currently being determined.

http://www.bugquash.com

Page 31: Getting Dirty With the Flex SDK

Show off with the BugQuash badges

Automatically updated

Available at http://www.bugquash.com

Page 32: Getting Dirty With the Flex SDK

Thanks!

Now get out there, and do some good!

These slides and this recording will be posted on my blog at:

http://blog.natebeck.net

Questions?