Posted by: Tom F | October 1, 2008

360|Flex San Jose: My Take

(Sorry I’m a little late with posting this)

360|Flex San Jose 2008 was my second 360|Flex conference and my third Flex event (my others were 360|Flex Atlanta in February, 2008 and Flex Camp Wall Street in April, 2008).  This time I attended with my summer intern, who has been doing a fair amount of Flex development since he joined our team in early June, and another co-worker who is just starting to learn Flex programming for other projects.

I have to say that the biggest difference for me at this conference versus the one in February (and even April) is that this time I understood a lot more of the issues related to Flex development.  Back then I had just cut my teeth in flex development, and while I got a lot out of the conference I’ve since spent some time pouring over the slides to get a deeper understanding of what’s going on.  This time I could understand what the issues were, where I had suffered with problems, and how things worked.  I also have spent a fair amount of time listening to The Flex Show in preparation for the conference, so I had a few talks in mind that I wanted to go to.

BTW, Adobe is putting all the talks online for free.  To watch these talks

Monday

Monday started with a great keynote, led by Mark Anders.  The highlight of this (for me) was the demonstration of Flex 4 or “Gumbo”, specifically, Thermo, a new tool for designers to change the look and feel of an application.  The focus of Gumbo is to enable designers to be able to do most of the UI design and layout (and cutting down the reliance on developers to implement what they need, freeing the developers to focus on the business logic and other aspects of the application).  From what they demoed it looks like they are making great strides in this.

I then attended a session on Item Renderers in Flex.  It was good, but I had done a lot of this already.

After lunch, I went to a fantastic talk on Mate (pronounced “Mah-tay”), a framework for event frameworks developed by the folks at AsFusion.  I had heard Laura Arguello talk about Mate on The Flex Show, but it wasn’t until this talk that I could appreciate what Mate offers.  The coolest part is the infrastructure for event routing and injecting events into classes – a very clean mechanism to provide separation of the model from the UI components.  There were a lot of happy faces after this talk – it was easily the talk of the conference that day!

(Here is a link to the Mate episode of the Flex Show).

The other two talks I went to were one on reusable components and another on using Blaze DS (and LiveCycle DS) in your applications.

That evening there was a dinner and several Bird of a Feather, but I was exhausted from flying in the night before from the east coast, so after eating I went back to my hotel room and collapsed.

Tuesday

Tuesday I jumped right into a presentation (by Alex Harui of Adobe and FlexComponents fame) on new API’s that are going to allow for dynamic sub-applications, as opposed to the current Modules.  This is useful for building Flex-style mashups, portals that might load sub-applications that come from non-local sources.  The advantage over modules is that these sub-apps have their own application domains but can still interact with each other, albeit in a more limited way.  Each sub-application will have its own styles and resource bundles (these are not shared), and while the Sprite class is shared between them, the UIComponent class is not.  Actions such as Drag and Drop require data to be marshaled (similar to what you would see in a classic remote procedure call implementation) so that it can be shared between sub-apps (in fact, there is a new mouse event, MarshalMouseEvent, to support this and other operations).

This capability will first appear in version 3.2 of Flex; I believe it also requires version 10 of the Flash player (but I could be wrong about this).  Future versions of Flex will be able to load and run sub-apps from previous versions that have this support (so Flex 5 could load a sub-app created with Flex 3.2).

The next talk I went to was on promoting your Flex and AIR applications, which was about how to market your app, including avenues that Adobe makes available to help grow the community.  What I took from this was that Adobe understands how important it is to help grow its developer community, be your focus technology and development or trying to get visibility for your product.

After lunch, the next two talks were both given by Michael Labriola.  Mike is a fantastic speaker, and he is the kind of person who loves to dig deep into a technology and try to understand every last little thing he can about how it works.  In Atlanta he gave a talk entitled “Dense and Hot” which was about the start-up activities of the Flash player (specifically, about the first 200 milliseconds of its start-up).

The first talk he gave was about AIR drag and drop support (Jeff Tapper was supposed to give the talk, but he wasn’t able to attend the conference).  It highlighted the differences between the internal drag and drop support in Flex and the ability to drag and drop between an AIR application and other applications running in the OS.  He presented the different mechanisms in a straightforward manner.  He also presented a link to a blog entry by Andrew  Westberg who implemented a new DragManager that handles both (it’s on Andrew’s blog at http://www.flexjunk.com).

The second talk I went to was on data binding.  Flex has mechanisms that enable you to tie a data source (such as an XML object or an array) directly to a UI component like a List or DataGrid.  What I didn’t realize was that these were Flex shorthand for a lot of code that is generated to actually make this magic happen.  I have done the very basic data binding in our apps (we have a view where we map tags to user-changeable color codes that we can use to color items, for example).  He described most of the components that are involved in data binding and the various ways you can hook in to them.  One of the reasons you might do this is to optimize the performance of an application.  This is going to be very useful for us when we start processing large amounts of data in our prototypes.

The final talk I went to that day was on building real-time and collaborative applications using Flex.  This was actually focused more on the back-end systems (Blaze DS/LiveCycle DS) and how to use these to share information, interact, and collaborate with others.  The highlight was the demo of Scrumtastic, an app being developed as part of the Charity Code Jam that’s a part of this conference (the Charity Code Jam is building an online food bank locator for Second Harvest).  Scrumtastic is like Jazz-lite in that it gives developers some means to coordinate what they are working on.  Very interesting tool.

After dinner I attended the BOF given by the Adobe team.  It was useful to put names to faces of people whom I have read postings or articles by.  What’s really cool is how accessible the team is – another good example of how Adobe is really trying to reach out to the Flex community.

Wednesday

The last day started with the type of keynote I expect from these guys.  My mind still reels at how open that Tom and John are about the financials – let alone how effective they are at running a conference of this size pretty much alone.

They also gave some time to the sponsors to present what they’re up to in the Flex world (My favorite was the demo at http://runpee.com – I won’t spoil it by telling you what the web site is about).  I also was interested in Workday’s demo as well.

I next went to a talk called “Filthy Rich Clients”, which covered some of the real cool visual flourishes you can add to your application to hook your users.  This was one of the talks I was really looking forward to, because I’m currently starting to play with how I could use animation effects in my apps and had started to play with tweening and effects.  It answered just about all of my questions.

The last talk I went to was on reflective programming in Flex.  One of the really cool things about scripting languages like ActionScript and JavaScript is that you can extend objects on the fly; the cost is that you either have to know in advance what the data globs are that you added, or you need some way to inspect an object and find the things that you need.  I hadn’t really used the Flex reflection API all that much and I hoped that this talk would give me more insights.  This was very high-level, and I had done most of the stuff he had presented.  Still it was a good talk.

Overall Impression

Another great conference from Tom Ortega and John Wilker.  I’m looking forward to the next 360|Flex conference very much.

Posted by: Tom F | September 26, 2008

Slides for “Unleash the Power of Flex Builder” Talk

UPDATED I made some minor changes to the slides just before presenting, so I’m replacing the old ones with these.

Here are the slides for the talk I’m giving at 360|Flex Camp on September 27th, 2008 at Montclair State University in Montclair, NJ.  This talk is tools- and Eclipse-focused with emphasis on working with the Flex Builder environment.

Posted by: Tom F | September 13, 2008

Greetings from Maui

I’m in Maui for a few days of rest and relaxation (and another hike in Mount Haleakala (if you ever get a chance to visit here do it – it’s like no place else in the world!).  And working on my slides for 360|Flex Camp between Mai Tai’s…

Posted by: Tom F | September 2, 2008

360|Flex Camp, September 26-27, 2008 in Montclair, NJ

I’ve gone to the last two 360|Flex events in the US, and they’ve been fantastic!  Now I’m going to get to do a talk at the 360|Flex Camp in on September 26-27, 2008 at Montclair State University in New Jersey.

My talk is called title: Unleash the Power of Flex Builder.  The description:

Flex Builder is the tool of choice for developing, debugging, and testing Flex and Air Applications.  Flex builder is actually a series of plugins to the Eclipse open-source tool framework.  While there’s a lot that you get out of the box when you install Flex Builder, Eclipse and the Eclipse community bring a lot of additional power to improve your Flex development experience.  In this session we’ll discuss some of the more advanced topics in Flex Builder and Eclipse, such as refactoring, tying into a source control or source configuration management system like CVS or Subversion, and integration with other tools like Aptana and Rational Jazz.  We’ll also discuss some of the potential gotchas that you might run into (such as refactoring gotcha’s) and how to manage them.

I am very excited about this opportunity to reach out to the greater Flex community.  I’m hoping to get my slides in shape over the next two weeks – if you have any suggestions for what you’d like to see in this talk please let me know.

Oh, and if you’re on the fence about going – if Tom Ortega and John Wilker do the kind of job they’ve done at past 360|Flex events, then this is going to be a great conference!  The first day is an all-day workshop entitled “Advanced intro into Flex”.  The second is the conference itself.  Excluding myself, they’ve put together a stellar line-up of speakers – including the following:

It should be a very good day.  I’m psyched to be a part of this event!

Posted by: Tom F | August 27, 2008

Flex Builder Refactoring “Gotchas”

Flex Builder (based on Eclipse) is a good developer environment, but one thing that stresses it more than anything is the refactoring support.  As a long-time Eclipse-based Java developer I’m very comfortable with how refactoring works for Java code and projects, so, perhaps, this has colored my view of Flex Builder’s refactoring support.

Refactoring is the fancy name for changing the structure of code.  It covers everything from renaming a property or function to renaming or moving a class, either within a project or from one project to another.  The goal of a refactoring system is to go through all code artifacts that reference the changed code and fix names and mappings so that the code still builds and runs (after all, you haven’t change the logic in your code, just names and/or locations of objects that make up the already-working system).

When would you want to refactor?  Suppose that you started working on an interface to a payroll system.  Initially, you might have a single project that contains both the code to access the payroll system and the user interface.  As the project grows, you realize that it might make sense to split the interface and UI code into separate projects – perhaps you want to have an AIR UI as well as a web-based UI, or perhaps you are just getting a new UI developer and want to minimize how much code he needs to digest as he picks up the code.  Perhaps, also, you decide that you need to change the names of some classes or methods so that they conform to a team standard, or even to reorganize the code to pull out some interfaces that help abstract some functionality to allow you to integrate this with several different interfaces.  Refactoring is the engine that makes this a lot easier.

We moved to Flex from doing UI’s in Java/SWT because we wanted to leverage the browser as an interface to our system and because we thought we could quickly try several different UI approaches.  We all had years worth of experience developing in Eclipse, so Flex Builder was very fast for us to pick up.  Unfortunately, the first time we had to refactor our code, we found that the refactoring support wasn’t what we were used to.  Some of the gotchas we hit include:

  • Renaming was somewhat problematic; sometimes the name change would propagate properly, sometimes not.
  • After moving a class from one project to another, sometimes the code would build, sometimes not, and if it did build, when we tried to run the application, the run-time would complain that it could not find the class.
  • We could move a class from one package to another, but the package descriptor in the file did not change

There are several tricks that you can do to ensure that your code will build:

  • Don’t do more than one thing at a time! Don’t move and rename a class; instead, move it, do all the checks to see that things still build and run, then rename it and do the same.  Or vice-versa.
  • Always check the build path for the project. To do this:
    • Right click on the project in question and select “Properties” (it’s all the way at the bottom of the pop-up menu)
    • Select “Flex Library Build Path” in the panel on the left of the Properties window
    • Select the “Classes” button in the button bar near the top of the right-hand panel (it should be the button all the way to the left)
    • Scroll down until you find the class that you’ve moved or renamed
    • Make sure that the checkbox to the left of the item is selected.  If it isn’t, then the class is not visible outside of this project
  • The order projects are loaded matters. If you move a class from one project to another, you need to make ensure that the project that contains the class is loaded before any other project that references the class.  This is especially important for any projects you either load externally or load as a runtime shared library.  To do this:
    • – Right click on the project in question and select “Properties” (it’s all the way at the bottom of the pop-up menu)
    • – Select “Flex Library Build Path” in the panel on the left of the Properties window
    • – Select the “Library Path” button in the button bar near the top of the right-hand panel (it should be the button all the way to the right). Once there, you can move a project up in load order by selecting the project and clicking the “Up” button, or you can move it down in load order by clicking the “Down” button.
  • Always rename textual matches. When you rename a class, always check “Rename textual matches in strings (requires preview)”.  This catches some instances that the refactoring logic misses.
  • Manually edit package names. Any time you change a package that a class is in, you have to open up the class in the editor and change the package name in the “package” descriptor right at the top of the file.  (Note: There are several bugs in the Adobe Bug and Issue Management System that are tracking refactoring problems, such as Bug FB-11318 and Bug FB-12987 – if these or other bus are important to you please register with the bug database and vote this bug up.)
  • Sometimes you need to manually edit .flexLibProperties. Once in a while, after you have moved a class from one package to another, you get a stale reference to the old package.  What has happened is that the .flexLibProperties file in the old project isn’t always updated correctly.  If this happens, then you need to edit this file to remove the old export.FlexBuilder normally hides the .flexLibProperties, so the best way to find the .flexLibProprties file is to do a search for the class.  To do this:
    • Select “Edit->Find in Files…”
    • Enter the name of the class in the “Containing Text” box
    • Make sure that the “File name patterns” box contains an asterisk (*)
    • Click the “Search” button
    • The search results will appear in the “Search” view (typically in the lower right portion of your screen).  One more gotcha: there should be two .flexLibProprties files that show up – the one that’s from the old project where the class was, and the other from the new project.  Be sure to only select the .flexLibProperties from the old project.
    • Remove the line with the old class name and save the file.
    • Clean the old project.

If you use these tricks then you should be able to successfully refactor your code.

Posted by: Tom F | August 26, 2008

My Introduction

Hi!  I’m Tom Frauenhofer, a software developer with over 26 years of experience in the tech industry.  I’ve worked at various companies during my travels, large, small, and in-between.  I’ve used a lot of different technologies and tools over the years, and I’ve seen a lot of different ways to build software that are the “correct” way that you’ll have to excuse me if I sometimes come across as a curmudgeon.

I’m currently a Senior Software Engineer at the IBM Thomas J. Watson Research Center in beautiful Hawthorne, NY.  As they are gracious enough to pay my salary I feel it is my obligation to mention any conflicts of interest in anything I write.  And don’t expect me to spill any company secrets or the like!  I enjoy working where I work, and I find I have a lot of freedom to explore lots of new and different ways to do things.

These days I’m mostly using Adobe Flex and Adobe Air to build applications, and I have to say I’m impressed with the technology, the community, and what I’m seeing from Adobe.  Not that it’s perfect – hey, it’s software, it’s never perfect.  I’ve also been involved in the the Rational Jazz joint project with IBM Research, and I use this as a part of my day to day work.

In my past I’ve also done a lot of Palm OS programming.  One thing that my Palm development experience has taught me is what happens when you confuse business decisions with innovation.  Palm has a special place in my heart, though, and I hope that they can finally turn the corner and come up with some new and exciting products (but it’s a race to see if they can keep themselves capitalized long enough).

Oh, and if you couldn’t tell, I love mobile tech.  iPod, iPhone, Treo, Windows Mobile, Nokia/Symbian, Android, etc.  I really see a future for a more pervasive computing platform.  But the user experience is going to be the key.  It’s not just having a great app – it’s filling a need and doing it in a way that is enjoyable to use.

Categories