RIAs, Adobe Flex, and related topics

About
Resume
Contact

October 18, 2007

Managed associations vs. hierarchical values

Filed under: Flex, OOAD — jimrobson @ 5:39 pm

I promised to post a follow-up to my comments on Jeff Vroom’s presentation at MAX, so let me get to it before too much time passes.

There are different ways of representing the properties of complex objects. For example, let’s consider the pickup truck class. Every pickup has a cab (where the people sit) and the bed (where the people put their stuff). There are certain properties of the pickup that are really specific to the cab (for example, the number of people it can seat, and whether or not the rear window slides). Likewise, there are properties that are specific to the bed (fleetside or stepside, number of tie-downs, etc.). We could represent the pickup truck such that the class includes all of these properties in a hierarchy.

complex type as monolithic hierarchy

Another way to represent the pickup truck is to use discrete classes for the bed and the cab. In this way, we can encapsulate the cab’s properties and functionality in the Cab class, and the bed’s in the Bed class. We then associate each instance of the PickupTruck class with an instance of the Cab class and an instance of the Bed class. This results in a more flexible, extensible, and maintainable design.

managed associations

When using LiveCycle Data Services (LCDS), there are specific advantages to using these managed associations rather than lumping everything together into hierarchical values. If we put all of the components together into a single hierarchical class, then LCDS treats it as a blob, so that the entire class instance is updated every time a change is made to any property. For example, if we change the value of cab.isAirConditioned from false to true, then all of the tables that provide data for our PickupTruck class are updated. However, if we use managed associations and change the value Cab.isAirConditioned, then only the table that provides Cab data gets updated, so it is less resource-intensive.

Using managed associations with LCDS also provides advantages for lazy loading. On application startup we could load all of the data for our PickupTruck objects but just load the IDs of the Cabs and Beds. Then we would pull the detailed Cab and Bed data as needed.

In short, Jeff affirmed that managed associations are preferred as long as IDs are available for the referenced objects. If the Cab and Bed tables don’t have IDs, then you may need to pile everything into the Pickup class. Otherwise, it’s better to write separate classes.

October 12, 2007

MAX 2007, Day 3

Filed under: AIR, Community, Flash, Flex — jimrobson @ 4:47 pm

Well, I had a three-day weekend right after the conference, and then a very busy week, but I’m finally getting around to posting some of the highlights of day three.

Air Bootcamp

In this 3.5-hour session, Mike Chambers and company walked us through the essential steps for building desktop applications using Flex Builder 3, Flash CS3, Dreamweaver CS3, and the command line compiler. I picked up a number of useful hints and tips, and came away even more impressed with the power and ease of use that Adobe has built into AIR (creating a desktop application from Flash CS3, for example, is insanely simple). However, there are still a couple of weaknesses. For example, Flex Builder 3 still does not support keeping a Web app and its corresponding AIR app in a single project; you need to create a separate project for each application, which can create maintenance headaches. Also, AIR printing is simply Flash printing, so we’re stuck with the accompanying limitations for the time being.

One particularly good piece of news - which was also mentioned in one of the general sessions - is that AIR now ships with database support (SQLite).

Beyond the Basics of LiveCycle Data Services

Jeff Vroom, Adobe’s Principal Scientist, presented a truly brain-filling discussion of LiveCycle Data Services. One useful tidbit is that managed associations are preferred over hierarchical values whenever IDs are available for the referenced objects. I’ll try to write more on this later, because it really merits its own post.

Flex Roadmap

Ely Greenfield blew us all away again. In this discussion of how the Flex team are re-thinking the framework in order to accommodate future innovation, he presented an idea that is simply brilliant. By reducing each component to its essence, and then implementing supplemental features and behaviors as discrete elements (which can often be re-used across multiple components), the framework can become virtually limitless in its potential for extensibility, customization, and innovation. The essence of a button, for example, is a label and a click event. Everything else (e.g. skin) can be left open to modification by the application developer. Using this simple premise, Ely demonstrated how the Flex framework might be changed to enable the application developer (or tool such as Thermo) to create a tremendously engaging UI control from a simple List component. This idea is inspirational not so much because of what it says about the future of Flex, but rather because of the ways we can apply this idea in all of our development work. For more thoughts along these lines, see Anatole Tartakovsky’s post.

October 5, 2007

MAX 2007, Day 2

Filed under: Accessibility, Community, Flash, Flex — jimrobson @ 10:55 pm

I actually wrote the following on Tuesday night, but WordPress was broken so I couldn’t post it. Apparently some files had somehow become corrupt; I re-uploaded them, and now it appears to be working again. Anyway, here are some of the highlights from Tuesday’s sessions.

Building Global Ready Flex Applications

Long-time Adobe employee Craig Rublee gave a solid presentation with plenty of easy-to-follow code samples. He demonstrated the localization process in Flex 2, and then showed two different methods available in Flex 3. In Flex 2, it turns out that you need to compile a separate application swf for each locale (language) that you want to support. This made me sad. :-( However, in Flex 3 you can compile multiple locales into a single application swf, or you can compile locale swfs that have nothing but locale-specific information and load them as modules into your application at runtime. This makes me happy. :-) Of course, the Flash Player still doesn’t support right-to-left text, but as was announced yesterday that will change with the release of version 10 next year. When that happens Flash and Flex will have complete localization capabilities. Meanwhile, I hope to post some code samples illustrating the different options in the near future.

Continuous Integration with Flex, FlexUnit, and Ant

Daniel Rinehart of Allurent provided a good introduction to FlexUnit, Ant, and continuous integration for those who weren’t familiar with them. He then stepped through the process for automating the build, testing, and publishing processes using Antennae. I was pleased to see that the best practices that Daniel (and Allurent) promote via Antennae are consistent with our practices at Eye Street. I also noticed that Daniel does his development work in emacs, which should make Ryan McGeary happy.

Building Rich Internet Applications with Cairngorm and LiveCycle Data Services

This presentation was a real shocker. Peter Martin told us that he and the other members of the Adobe Consulting Team are in the midst of a complete re-thinking of the Cairngorm framework. In their recent work with mfg.com, in fact, they dispensed with the CairngormEvent paradigm altogether, and had the View act directly on the Model instead. Peter went so far as to say that they are considering eliminating the Controller. If you’re familiar at all with Cairngorm, then you know that these are radical changes that are sure to offend Cairngorm religionists. For my part, I’m glad that they are thinking this way, because I have been thinking along the same lines (thanks in part to some prodding from Ryan M). I applaud the Adobe folks for their willingness to re-examine their own assumptions and practices, and change direction when they believe they have discovered a better way of doing things.

Update: Steven Webster has made it clear that the Adobe Consulting Team’s “deep thinking” applies only to applications that use LiveCycle Data Services, and not to applications built with service-oriented architectures. (At MAX Matt Chotin had told me privately that he beleived this to be the case, but now it’s in writing.) This is disappointing, because as noted above Cairngorm could use with some trimming down regardless of what’s being used server-side.

Building Accessible Applications with Flex

Andrew Kirkpatrick and John Bennett provided a comprehensive overview of accessibility, touching upon everything from its importance to why it is often overlooked to suggestions on how to sell it to managers and clients. They also presented some clear and simple code samples to illustrate how to implement Flex’s accessibility features.

Thanks to them I finally know why JAWS has non-Forms Mode. Until today I thought that this mode was nothing but a nuisance, since it seemed to me that it rendered the accessibility features in Flash completely useless. However, Andrew and John explained that this mode is required to read text that cannot receive input focus. So, while it may not be the best way of implementing this functionality, at least it does have a purpose. I also learned of Inspect32, a tool that reads and displays the MSAA data that screen readers use so that you can see how your application looks to the screen readers. This provides a great way of testing accessibility without needing to listen to JAWS.

Andrew and John also indicated that they will soon be posting some tools on Adobe Labs that will help simplify building accessible Flex applications, particularly with respect to video.

General Session / Sneak Peeks

There was way too much cool stuff demonstrated and announced to fit in one blog post, so I’ll write more later. For now, let me simply say this: Thermo will blow you away.

October 2, 2007

MAX 2007, Day 1

Filed under: Community, Flash, Flex — jimrobson @ 3:52 am

As expected, the first day of MAX was full of useful, interesting, and exciting information. Here are some of the highlights from various sessions:

General Session / Keynote

Kevin Lynch announced that an upcoming release of the Flash Player will include support for the H.264 video codec. This was particularly timely for me, because just a couple of hours earlier another attendee told me that he used QuickTime for Web video instead of Flash primarily because QuickTime supported this codec. Along these same lines Flash Player will also support HD video to 1080p.

Emmy Huang and Justin Everett-Church gave a preview of some of the features coming in Flash Player 10, code named “Astro” (don’t you love Adobe’s code names?). Emmy has a video of the talk on her blog, but I’ll just mention the main points here for convenience:

  • Advanced text support, including right-to-left text and columns
  • Out-of-the-box 3D effects
  • Support for custom filters

Customizing the Flex Framework

Deepa Subramaniam did an excellent job on this presentation. There wasn’t a lot of new information for those who are experienced at extending Flex, but I really appreciated her clear and easy to follow style. And I did learn something new: I learned why developers might want to tell the compiler to preserve metadata. I was aware that this compiler option existed, but had no clue as to what it might be used for. Deepa explained that it comes in handy for shops that roll their own testing and / or automation tools.

Flash Player Internals

Jim Corbett and Lee Thomason provided a wealth of useful information about the Player. For one thing, it turns out that the new display list model, which I sort of complained about here, helps to improve performance because it’s array based and doesn’t allow empty layers.

They also pointed out the Flash Player emulates the version of the SWF that is currently playing, so that a Flash 6 SWF still plays like a Flash 6 SWF even if it’s running in Player 9. One consequence of this is that any bugs that existed in Flash 6 will continue to manifest themselves even if the bugs have been fixed in subsequent versions. In order to get rid of the effects of the bugs, the SWF needs to be re-published to a later version.

You may already know that Flash uses retained mode rendering, and that this helps to enhance performance. Well, it turns out that in the case of the Flash player it also precludes multi-threading. That being the case, we won’t be seeing support for multi-threaded Flash apps any time in the foreseeable future. We can, however, look forward to some upcoming improvements to the Player’s performance, including support for multi-core processors and GPU acceleration. There will also be cross-domain caching of the Flex framework code (and perhaps other code signed by Adobe), so that any given client will only need to download the framework once.

Case Study: ESRI Geospatial Application

Mansour Raad of ESRI demonstrated the use of their new Flex API, which is now in Beta. It looks like it will be extremely easy to build geospatial Flex apps with this solution, and the apps are very fast and responsive because they use vector graphics rather than downloading large image files. The only downside I see is that ESRI data does not come cheap, so this solution may remain out of reach for smaller organizations.

BOF: Flex Interface Guidelines

Rob Adams and Narciso Jaramillo introduced a new initiative to raise the bar for Flex UI design and development called Flex Interface Guidelines (FIG). You can read about FIG here. One gem I gained from Rob’s presentation was an acronym for the Windows GUI paradigm: WIMP (I think it stands for Windows Icons Menus and Pointers). For all I know it may be an ancient acronym, but it was new to me, so I enjoyed it.

BOF: Meet the Team: Flex

I didn’t get a lot of new info from this session, but it was really encouraging to see so many members of the Flex team hanging around till 9:30 PM and later to answer our questions. It speaks well of Adobe’s commitment to their user base, and the character of the people on the team.

BOF: Flex Component Panel

I learned (or was reminded?) of a cool site for Flex skins: scalenine. Check it out, if you haven’t already.

Partner Pavilion

I enjoyed talking to some of the Adobe partners at their respective booths, and it was great to learn a little about the cool stuff they’re doing. It was particularly nice to meet folks at Universal Mind who are friends of my friend Harris. They also had a good blues band (didn’t get the name) at the Sponsor Reception.

Free Stuff!

I really liked the free stuff that they gave me. I got several cool things from Adobe and partners, but one item deserves special mention: the green foam hand that I got from HostMySite. It’s not every day that I get one of these babies!

foam hand from HostMySite.com

There’s more that could be said, but it’s wa-a-a-ay past pumpkin time, and I don’t want to sleep through breakfast tomorrow (which reminds me - the food was great).


Powered by WordPress