« November 2007 | Main | January 2008 »

December 31, 2007

2007 Magazines

This post has been over a year in the making. I first got the idea back in November 2006 when I commented on the number of magazines I found myself accumulating. That observation was a continuation of a May 2005 post in which I documented my unread magazine stack. With the short history lesson out of the way I present this post. For all of 2007 I kept the two piles I talked about in 2006. The result, I read about half of the magazines I got by height.

The pile on the right is the magazines that I read in 2007 while the pile on the left is unread magazines. Both are just shy of the 10 inch mark with the read pile a little shorter. The one thing that surprised me is that unlike in previous years almost all of the magazines that I received I paid for either directly or indirectly. One magazine that I didn't pay for made up about one third of the unread stack even though it was a thin weekly one and they finally stopped sending it about half way through the year. In the fall I didn't renew one subscription for a magazine that predominately ended up in the unread pile and will let my subscription on another magazine that is mostly in the unread pile lapse when it next comes due.

Out of curiosity I also weighed all of the magazines. They came in right around 55 pounds. I'm sure if I did the same thing with physical junk mail and catalogs it would be just as bad. One of the reasons that I'm a big fan of GreenDimes and have been for awhile now. With that said this week's recycling bin is going to HEAVY!

Tags: life magazine

December 29, 2007

Agile Project Management with Scrum

Reading Ken Schwaber's "Agile Project Management with Scrum" has been helpful in reinforcing for me the key benefits and practices that make up Scrum. The numerous real-life scenarios presented in the book help flesh out the essence of Scrum beyond the six and a half pages of rules which comprise the entire Scrum process. As mentioned in the book it is one thing to understand the rules of Scrum but it is very different to understand the purpose of the rules and how they make Scrum such a success.

Allurent has been using Scrum for sometime now and while we have successfully completed many sprints and delivered shippable software with it, after reading this book I've noticed some subtle nuances that could make us even more successful. It was also good to examine the entire Scrum process more from the ScrumMaster perspective, since my experience with Scrum at this point has only been as a member of the team.

Tags: books scrum

December 22, 2007

Automated Visual Testing of Components

I'm happy to relay the announcement of the first public release of a new visual testing framework built on FlexUnit and AIR known as Visual FlexUnit. Some of you may have heard me make reference to this framework at my recent talks on Continuous Integration with Flex, FlexUnit, and Ant. Douglas McCarroll a recent inter at Allurent (the company I work for) developed the release. Here is what he had to say:

Visual FlexUnit (VFU) is a FlexUnit extension that allows you to do automated testing of components’ visual appearance using “visual assertions”. In a nutshell, a visual assertion asserts that a component’s appearance is identical to a stored baseline image file. These visual tests can be run in either a GUI or an Ant-based build process.

Another great tool to help with automating your testing.

Tags: flexunit testing vfu

December 18, 2007

Frankenstart: User Startup Experience

I've been thinking about the startup experience a user sees when launching applications. In particular I've been using a bunch of AJAX and Flex based RIAs recently. This observation is still gestating so I've not compiled a well defined list. It's one of those thoughts that I'm pretty sure is there and I'm just looking for additional evidence.

When browsing the web many HTML pages haphazardly form into the final view. Some of this is due to the order that the images, CSS, and other content pieces are loaded by the browser and some of it is the rendering speed of the browser, which has mostly become a non-issue. This experience is something that I think has fallen into the background consciousness of most people browsing the web. The thinking has become, that's just how HTML sites and web browsing work. Contrast that with how most desktop applications launch. There is still some waiting but aspects of the interface only appear when they are ready to be shown, instead of the half rendered state many a web page is briefly shown in.

Since AJAX RIAs rely on the same raw HTML rendering and loading of content by the browser, complex applications can take time to render and in the process look pretty freaky. I've nicknamed this raw startup experience a Frankenstart. One AJAX example of a Frankenstart experience is meebo.com. If you are a frequent user the problem isn't as pronounced but for first time users (try clearing your browser cache) they are presented with a half rendered interface for a few seconds on speedy cable modem. The effects are much worse on slower connections. A picture of my meebo startup experience is shown below (click for a larger image):

It doesn't take much to provide a cleaner startup experience. Buzzword is a Flex based RIA that provides a nice startup experience. A simple progress bar that fades in the fully rendered interface when loading it complete. A picture of my Buzzword startup experience is shown below (click for a larger image):

While the startup experience is only a brief view into your application, first impressions do count, even if only subconsciously. Many AJAX and Flex RIAs do get it right, but there are plenty that need help. Users may still be used to the HTML browser rendering world, but when RIAs start to look and act more like desktop applications, I can see user expectations changing. Don't make a Frankenstart be the first look someone gets at your application.

Tags: ajax flex frankenstart ria

December 16, 2007

Window Explorer Updated for Beta 3

I've updated Window Explorer to work with AIR beta 3. I think I've also got the new badge install for 9.0.115 working. I don't have my PC with Flash Switcher handy so I'm not 100% sure, will have to double check tomorrow. A quick recap of what Window Explorer is: Utility designed to allow easy exploration of the various Flex Window and Native Window options available in AIR. Code generation for selected options is included.

Updating to beta 3 was mostly painless, primarily I just had to remove stuff from the UI which Adobe took out.

Tags: air flex

Error creating AIR file: 103: ERROR, application.name

Last night I started playing with the public beta 3 drops for Flex 3 and AIR. Using the project creation wizard I created a new Flex based AIR application. After looking at the new application descriptor format which has changed a lot since beta 2 I started to customize it so that I could use it as a template for sample applications I was updating to beta 3. When running the Export Release Build... wizard it got through most of the .air creation process but then erred out at the end with the following message:

Error creating AIR file: 103: ERROR, application.name

A 0 byte .air file existed and a randomly named .tmp file was created.

Turns out the default application descriptor created by the project wizard has a small bug in it. It inserts a commented out <name> element below <filename> at the top of the file. Right before the closing <application> element it inserts an uncommented <name> element. When I uncommented the <name> at the top of the file I was accidentally defining <name> twice and hence causing an error. I would have liked the error message to be more descriptive, but now that I know what it was trying to say (error with <name> in the application descriptor) I should be able to deduce other issues.

Tags: air error flex

December 14, 2007

Headless Linux Automated FlexUnit Testing Idea

When using Antennae or some other tool to run automated FlexUnit tests to Linux, it should be possible to use xvfb to create the display that the standalone Flash needs to run. With this approach you avoid the need to have a full X instance running while still being able to use the standalone Flash player to run the test SWF. I won't claim that this is any great insight, but I found a piece of paper on my desk with xvfb scribbled on it and I figured this was as good a place as any to record it :)

Tags: flex flxunit linux

December 9, 2007

The Paradox of Choice

This afternoon I watched a Google TechTalks entitled The Paradox of Choice - Why More Is Less given by Barry Schwartz on April 27, 2006. The talk does a wonderful job of summarizing the current state of choice and why in most cases it is making us feel worse. Some of the themes echoed what I read in The High Price of Materialism. Below are notes I took to summarize the key points.

Society as a whole believes these to be true: more freedom = more welfare, more choice = more freedom, so more choice - more welfare.
This means that choice and freedom are good. Allows autonomy. However, too much choice is also bad.

Three main ways too much choice can cause problems:

1) Paralysis
Unless people are able to articulate their preferences and then search for the matching product or service, they can become overwhelmed.
Choice isn't bad when everything is in alignable options such as how many of something you want.
Example is in a 401K. For every 10 additional funds offered as investment choices the participation rate drops by 2%. For every 10 additional funds the number of participants putting their money in a money market account goes up by 7%.

2) Decision and Performance Quality
Even if one can articulate preferences, the time to compare fully usually isn't there. This leads to using simplification strategies which then make people less accurate.

3) Satisfaction
When presented with too many choices people feel worse after the choice. Primary reasons: regret and anticipate regret and opportunity costs.
Difference between capability vs. usability or prospect vs. practice.
Everything suffers from comparison.

Need to balance talent, temperament, and time.
People feel time pressure. Feel worse after making a "want to do" lists versus a "have to do" list.

Escalation of expectations. Big difference from zero to subsistence but it levels off quickly after that.

Self blame. Good satiate, bad escalate.

View about amount of choice for a long time suffered from monotonicity assumption. Jump from zero choice to some choices extrapolated to lots of choice. However happiness with number of choices isn't always increasing, it goes down.

Too much choice has a leakage principle. Feelings before choice carry over once a choice has been made, particularly anxiety.

Using an agent can help. The agents separates choice from experience. Effective even when the agent doesn't know much more than the person the choice is being made for.

Best thing to do is create libertarian paternalism. Provide an intelligent default so that when the majority of people don't do anything (which will happen) the default is really what is best for them. Examples: switch to opt-out organ donation or opt-out 401K contribution instead of forcing people to opt-in.

Tags: choice time

December 7, 2007

Flex Camp Boston 2007: Ask the Experts

Rough draft notes

Panel: Dave Gruber, Tim Buntel, Phil Costa, Jeffry Houser, Todd Prekaski, and Paul Reilly

Q: When can Flash be multi-threaded?
A: Not for awhile. Tricky to do. Not in 10.

Q: What more will be in Flex for designer work flow?
A: Thermo is a new designer tool for converting wire frame into an interactive application. Also giving them tools to handle behavior. Improving skinning models and more declarative. Ely gave talk about this, should be up on MAX website.

Q: Best resource for a designer to get up to speed on Flex?
A: The Adobe Developer center. Grouped by background. Flex Cookbook. And watch for Thermo. Programming Flex is a great for an understanding of Flex in general.

Q: Any plans for different LiveCycle polling options?
A: Server side polling channel configuration (requires thread per socket). LCDS 2.5.1 should have examples about how to mimic real time latency. RTMP is best for non-blocking IO.

Q: Any ability to expand HTTP components to support additional REST capabilities beyond GET and POST?
A: Short answer yes. Flash player is limited by Flash and plug-in APIs. Workaround is to use the LCDS proxy.

Q: How best to handle authenticated remoting?
A: Use a session token. Usually rely on cookies with HTTP.

Q: Why use J2EE session ID as opposed to CF token ids?
A: J2EE session ID are superior to CF token ids.

Q: Any plans to include component that can display web pages in Flex?
A: Support is there for AIR. Can use frames to overlay SWF to get the behavior. No current plans since it requires Flash changes. Look at Drumbeat.

Q: Any plans to have .NET AMF tier?
A: No plans for .NET version of LCDS. Adobe is using a 3rd party Midnight Coders to provide similar services.

Q: Updated version of Cairngorm?
A: Run by Adobe Consulting. Best way to find out more is use their mailing list. Announced at MAX a data driven site version.

Q: ColdFusion application with CFCs for Remoting, what needs to change for AIR?
A: Hopefully nothing! Compiling against the services config does require a little tweaking when using AIR since config isn't parameterized in AIR. Pier (one of the sponsors) gave a talk on that behavior.

Q: Any mechanism to provide synchronous event handling?
A: AIR provides both synchronous and asynchronous. Log enhancement request against Player.

Q: Better Flash and Flex component integration?
A: On the radar to make it better. Flash to Flex is there. Flex to Flash isn't there yet. The component model conversion is a problem.

Q: Flex Builder 4?
A: Looking to users for ideas. Broadening audience that uses it. Let them know if you want to be involved in product planning. Put feature requests into open Flex bug system.

Q: How to synchronize SQLite to MySQL?
A: LCDS may do something in the future. ColdFusion at MAX showed some of the online/offline connection data management.

Q: Additional SQLite support for full SQL syntax?
A: Frozen for AIR 1.0.

Q: Status of code coverage tools?
A: Adobe consulting was looking to build an open source project but don't know the status. Plumbing has been added to player. Should be available soon.

Q: Ted Patrick commented about AMF being released?
A: No.

Q: Issues with profiler on 64-bit.
A: Player doesn't work on 64-bit machines, everything runs in 32-bit mode. Does work on Vista and Leopard.

Q: Linux support for Flex Builder?
A: Alpha of Flex Builder for Linux announced and released at MAX. Development ongoing.

Tags: flex flexcampboston2007

Flex Camp Boston 2007: Flex and ColdFusion: Mysteries Revealed!

Rough draft notes

Matt Woodward is talking about Flex and ColdFusion: Mysteries Revealed!

mattwoodward.com/blog

For ColdFusion people why use Flex: Very powerful. Simple. Big wow factor. Fun new technology. Don't limit yourself.

Sample photo gallery application, uses custom Flex components, ActionScript, and Events. ColdFusion back end that with RemoteFacade and DB layer.

Flex Builder needs to see ColdFusion's WEB-INF/flex directory.

Forget about request/response when dealing with Flex development. It's all event-driven and much more stateless. Events can be announced at any time. Request to server can be made but the response will come back at some undetermined time.

Business logic should not care who is talking to it. Can get input from anyone. Allows either ColdFusion or Flex to act as front-end. Facade isolates what Flex is talking about.

ColdFusion Components (CFC) and ActionScript (AS) can be translated between if done right. Must have mirrored properties. Have AS define "[RemoteClass(alias="path.to.cfc")]" and CFC define "<cfcomponent alias="path.to.cfc"/>". To return a collection use "<cffunction returntype="path.to.cfc[]"/>". Has good performance for most applications with reasonably sized collections.

Custom Events let you include your own custom data in the Event.

Accessibility questions about Flex? Doesn't have to worry about them. Member of the audience finds Flex easier to make accessible then HTML sites.

Will be posting sample code to his blog.

Where to do error handling? Has person making the call handle what to do if there is an error. Flex can handle ColdFusion error since it gets the error back.

Tags: coldfusion flex flexcampboston2007

Flex Camp Boston 2007: FlexUnit Testing with Cairngorm

Rough draft notes

Thomas Burleson is talking about FlexUnit Testing with Cairngorm

Looking at StormWatch and TestStorm used to test that information.

Showing demonstration of StormWatch. Loading XML data of stock market information.

Unit Testing: Test all the functionality of a single unit.
Continuous Testing: Test all units each cycle (each commit). Locally.
Continuous Integration: Test all units created by other developers.

Test API server exposed, transformations in Flex, business logic, event processing, and model updates. Not testing UI (hard to do).

Custom extensions to FlexUnit and Cairngorm to aid testing. Should be live on Google code early next year. Universal Mind (UM) Cairngorm.

Traditional testing approach requires extracting stuff. Bad because: Tests performed outside MVC, requires many test shells, and boundary conditions are not tested well. Focus on human issue (functional test) versus tool issue (unit test).

Uses parallel but different base package naming com..commands.* versus tests..commands.*. 1-to-1 for package, classes, functions.

UM Cairngorm adds: view responders, command event dispatching, delegate queues, batch events, command logic aggregation, and FlexUnit support.

Different unit testing frameworks include: ASUnit, FlexUnit, dpUInt, and UM Wrappers (builds on FlexUnit).

Cairgorm Explorer is a handy application.

Showing how the unit tests are constructed and run. Importance of testing with events to mimic what the UI is doing as much as possible.

Have Synchronizer that watches for code changes and creates stubs automatically. May not be opened sourced but good to think about the ideas.

Tags: cairngorm flex flexcampboston2007 flexunit

Flex Camp Boston 2007: Building Buzzword

Rough draft of notes

David Coletta is talking about Building Buzzword.

Jan 2006, started coding in an attic. Oct 2006, public demo at MAX and funding from Adobe. Nov 2006, more people and real offices. May-Aug 2007, monthly preview releases. Fall 2007, open for real use.

Show documents by alphabetically, author, role, last viewed, last modified, # of pages. Custom scroll bar with numbers in it. Able to click on scrollbar to jump to location. Leave comments in document. Also supports tables and advanced formatting capability.

Text on page. Three main pieces: document (content being saved to server), layout (transient position of the content, relay out after every character), and display (Flex/Flash objects on display list). Flow: document to layout. Tries to optimize what changed and handle as few things as possible.

Document internals: Body with one Section has multiple Paragraphs each with multiple Runs. Run has AnchoRun and FontyRun as subclasses. FontyRun has BreakRun, FieldRun, and TextRun and subclasses.

Use custom Tree ITreeDataDescriptor to provide custom tree data providers that can manage any custom data type. Not just XML.

Screen metric - print metrics = micro-spacing to get consistent layout between screen and printing. Very expensive to calculate but vital to getting consistent layout between the two.

Cache of display elements so that only certain objects are shown at once. Buzzword controls what is rendered on screen since the number of text fields for a document would overwhelm the Flash player.

Buzzword back end is .NET and uses low level HTTPService for back end communication. Backend does comment notification, document locking, and other raw CMS features. Login over SSL. Parking HTTP request on the server which then responds when it has data to send to the client.

Testing was vital primarily used FlexUnit. Spent a lot of time developing custom test framework called LiveTest. Focused on document command validity not focused on UI (like QTP). Able to record, debug, train, and playback a test. Generated ActionScript code can be copied back into the platform. Wrote custom framework instead of something like QTP required more constant feeding of unit tests.

Custom skinning scroll bar in Flex 2 was difficult. Hard to get skin to draw text (much improved in Flex 3 with UIComponent skinning model).

Has modular loading. Caches editors, styles, fonts, but if not there is displaying a progress loading bar. Pro: Improves build times, background loading, and good design through information hiding. Con: Can increase overall download, slow overall build, and increased complexity. Debugging across modules is hard, need runtime switching of loading debug versus production. Centralized control of what gets loaded when based on startup mode to prioritize based on startup mode.

Merge user dictionary on a collaborative document into a document dictionary to provide consistent spell checking. Look at gskinner.com for spell checking libraries.

Rich Text Copying is not supported by Flash. Hidden IFRAME or DIV render content from HTML control to allow clipboard content to be rich content. Push focus back to browser so that it picks up copy/paste events.

Off the shelf Flex isn't used much (more for debugging components), leveraging low level components (UITextField). 90% custom AS versus 10% MXML.

David's blog: TheJoyOfFlex.com

Tags: buzzword flex flexcampboston2007

Flex Camp Boston 2007: Rich Commerce on the Desktop with AIR

Rough draft notes

Joe Berkovitz and Tim Walling are speaking about Bringing Rich Commerce to the Desktop with AIR.

Case study and development notebook presentation.

Wanted to provide rich vibrant shopping experience online and/or offline. Utilize local persistence mechanisms for shopper customization. Business users can author experience. Fast local database. Online conduit for checkout.

Showing a demo of the demo application developed with Anthropologie, a canned demo online. System tray notification, scrolling of primary view, continuity of experience with zooming into product details, ability to locally tag items, search by color, with drag and drop image support, and the ability to have the merchant modify the content shown in the application.

Architecture for final product: web server provides updates and AIR application with an existing commerce server and analytics engine. Update manager supplies catalog meta data, media and markup. Content integration merges local files with web server supplied content to provide a uniform interface to the rest of the client. Personalized data persisted locally in the SQLite data.

Demo made everything local, minimal fixed product catalog, and tweaks to make the data work for the demo.

WindowedApplication is the primary application instead of Application. Chromeless window to get complete control over the look and feel. Different application modes are accomplished by command line arguments. These alternative modes much be manually created. Able to have application startup in system tray only mode.

The AIR application descriptor defines how the application startups. Key values are systemChrome, visible, and transparency are used to control the look and feel. Controlling window is through simple calls like minimize() and startMove().

System tray notifications are custom coded. Need to make sure you take into account screen size and multiple monitors.

Able to use "like" query against SQLite for simple text based searches.

Color search requires custom cursor management to provide custom color widget overlay. Color wheel itself was an image versus dragged in image handled the same way. When using drag managers in AIR there is a NativeDragManager that gives you access to the Clipboard format. Different applications supply drag data differently, such as IE giving a URL for an image versus Firefox giving the raw bitmap data. BitmapData.getPixel(x,y) can be used to color sample images.

The navigation strip navigation is about content. Uses goal based animation to provide smooth scrolling to handle rapid changes in what the user wants to see. Setup want you want to change and how it should change over time. Just supply the value you want and the engine maps to that goal.

Database populated for SQLite by using existing database file. Custom AIR application was created that could read in and populate the SQLite database. Some SQLite tools are available on labs to make working with the files easier (run queries, create tables). Rewrote integration to pull form SQLite database instead of a web service.

SQLite usage internals. DAO to isolate database gunk from the rest of the application getProduct(uri:String, handler:Function). Translator handles SQLResult translation into ActionScript objects.

Asynchronous API to keep event loop alive. ConnectoinPool and StatementPool to manage connections and statements to improve performance. Caching statements saves the need to reparse the statement.

Color match requires looking at color wheel. A given RGB value wasn't matched exactly by anything in the database. How to get close. Instead used HSV (hue, saturation, luminescent). See wikipedia for more details. Used color swatches to extract data for every product. Extract all HSV values and then do a linear search. Not that much data to pull into memory. Animate product results by looking at intersection of two result sets. Fade out what went away, fade in what is new, and move anything to its new position.

Goal based animation is about providing seamless animation experience. All about getting to some state. Doesn't use easing or tweans to apply real-time updating of what the goal is. Can work on multiple properties at once (alpha, position, size). Takes the most direct path to get to the target goal.

To get to the pilot: need to have the application download more content, update mechanism to see the new edition, enable offline cart, and additional personalization capabilities.

Tags: air flex flexcampboston2007

Flex Camp Boston 2007: Using ColdFusion with LCDS

Rough draft notes

Tom Jordahl is talking about Using ColdFusion with LifeCycle Data Services.

Why Data Services?

Powerful back end. Talk to ColdFusion. CFML to manage complex data.

LCDS with CF 8 installed by default.

Messaging: Publish & Subscribe, asynchronous communication, message header and body (can contain complex types CF components or ActionScript types), CF can both produce and consume.

Why messaging?
Real-time notification to your Flex application.
Triger long running server side processes
Notify multiple clients at once

messaging-config.xml contains the data along with reasonable defaults.

Easy to have CF both handle and publish messages that will be broadcast to all clients that are listening.

Client can do HTTP pooling to get around RTMP firewall restrictions.

Data Management

Distributed data management, data replication and synchronization, able to manage large data, nested data one-to-one or one-to-many, has some occasionally connected clients.

All clients that are looking at data will get notifications based on updates that are made. The changes are batched up.

Why Data Management?
Easily synchronization data between clients with conflict detection, data replication, and performance optimization (such as data paging and lazy loading).

Assemblers manage the data. Can be written as ColdFusion Components or Java, leverage Hibernate. Four main mehtods: Fill, Get, Sync, Count.

CF 8 extension for Eclipse are freely available. Gives you RDS (Remote Development Service). Includes query builder. Automated creation of ColdFusion Components and ActionScript classes related to database object management including the Assembler.

Special CF channels: cf-polling-amf (work around firewalls), cf-rtmp (off by default).

Possible to have existing Java or CF applications notify clients of data changes using new Event Gateway.

Able to configure that certain data pieces don't trigger changes being published as a way to optimize changes.

JSP tag to compile MXML applications on the server available on Labs.

All data transmitted via binary AMF3 protocol.

www.adobe.com/go/lcds_devguide
www.adobe.com/go/lcds_javadoc

Tags: coldfusion flex flexcampboston2007 lcds

Flex Camp Boston 2007: Using the Flex Profiler

Rough draft notes

Paul Reilly is speaking about Using the Flex Profiler

Memory profiling lets you look at objects being created, take snapshots and compare them. Performance profiling allows snapshots for looking at cumulative and internal time.

Memory profiling is light-weight compared to performance profiling when configuring the settings.

Profiler runs at the end of the frame which is why there maybe delays in getting updates to the profiler in Flex Builder.

Memory leak detection work flow: select app and take memory snapshot, switch to application and perform an operation, then take a second memory snapshot. Select both snapshots and view loitering objects. Can look at back references to determine who is holding onto something. Most common memory issue is strong references with event listeners. Can either remove the listeners manually or in most cases it is possible to use weak references. Best to reset profile information at the start unless you want to focus on initialization phase.

Can profile any external SWF, in general this is done with the standalone Flash player. Filtering of artificial functions isn't there yet (such as reaping, mouse handling, etc.) but you can change what gets shown such as removing the mx.* filter.

With performance profiling you can look at callers and callees to see how a function is being used. Important to remove filters so that mx.* abd flash.* are included in the list unless you want to focus only on your code.

Profiler supports debugging capabilities. mm.cfg file can be used to control settings. flashlog.txt doesn't get created if using a release version, good way to test that you are using a debug version of the player.

ErrorReportingEnable=1
TraceOutputFileEnable=1
PreloadSwf=ProfilerAgent.swf?debug=true

Additional information outputted into flashlog.txt that shows what the profiler is doing.

mm.cfg is only read once so if you are using multiple tabs in a browser it is only read the first time.
Runtime exceptions or infinite loops will cause the profiler to not work very well.
Taking a memory snapshot implicitly makes a garbage collection call.

Internally the player is using a stack trace (once every millisecond) for performance timing, new object samples (every time an object is create), and delete object samples (every time the GC collects an object). flash.sampling package includes way to get at the same information if you want to roll your own profiler.

DisplayObjectContainer and EventDispatcher are classes that are hard to get the internals of and there are back door methods to get access to data useful for profiling.

Profiler is sample based (not trace based), provides quicker profiling but not as detailed.

When is the best time to take snapshots? Look at overall memory chart to see where the issue might be. Try to narrow down operation in application that causes memory increase. Then start taking snapshots before and after performing that application.

Can you programmatically trigger a snapshot? Not at this time but create an enhancement bug and vote for it.

It is possible to profile AIR applications.

Tags: flex flexcampboston2007 profiler

Flex Camp Boston 2007: Config, Debug, Deploy LCDS

Rough draft of notes

Peter Farland is talking about Configuring, Debugging and Deploying LiveCycle Data Services.

Notes from the talk will also be posted to his blog.

Version issues with LCDS

A LCDS version is best used with the version of the Flex SDK that comes with it, in most

Flex 2.0.1/FDS 2.0.1
Flex 2.0.1 HF2/LCDS 2.5
Flex 2.0.1 HF3/LCDS 2.5.1
Flex 3/LCDS 2.5.1

Client side: rpc.swc and fds.swc and services-config.xml are the key pieces to keep synchronized. Don't forget fds_rb.swc.

If you find a bug open up the swc and look in catalog.xml to report the version you are using. The jar file has a similar version in the manifest.

Performance very tied to java version. 1.5.0_07 is very bad for performance. Avoid 1.4.2_02 to 1.4.2_05 and 1.4.2_10. 1.5.0_13 is recommended.

Configuration

Flex compiler knows about services-config.xml. -services compiler flag generates needed AS3 code. -services isn't needed if you want to roll your own ChannelSet management code.

Multiple Channels in a ChannelSet provides failover.
Use a single ChannelSet for all services in the client.
Only authenticate once per client ChannelSet.setCredentials().
Allows runtime determination of secure channel selection.

Programmatically create the ChannelSet to provide a poor man's load balancing. Randomize the order that the Channels are defined is. Still give you fail-over but the random list gives some load balancing (Math.random()).

LCDS messages brokers can create MessageDestinations on start programmatically instead of having to specify everything in a services-config.xml.
Important to optimize your configuration file and get rid of sample pieces and channels that are not used. Can improve compiler performance since it is less data to parse and manipulate. Be sure to remove debugging and redployer watchers from a production configuration file.
Sun's JDK XML parser should be replaced by xalan.jar.

Flex Builder only supports one project in memory at a time. Only the last edited project is retained in memory for incremental builds.

When debugging make sure you have references to data types retrieved from runtime otherwise they won't be linked in. Missing flash.utils.IExternalizable leads to "one of the parameters is incorrect" error which can be solved by referencing the class.

Client side debugging: will dump additional information to flashlog.txt. Paros Proxy, Charles, ServiceCapture are great client side traffic sniffers.

Server side debugging: Can configure debugging levels in services-config.xml. LCDS includes a server side tool sniffer.exe.

Common browser issue is non 200 HTTP status codes.

When doing deployment compile your SWF and simplify your web.xml file. LCDS 2.5.1 allows configuring client point to be secure while server uses HTTP to allow using SSL accelerators. RTMP can use the bind-address and bind-port to allow hooking it up to a load balancer. Resource availability can be problematic on hosted web servers since most are tuned for short lived connections on persistent connections that LCDS uses.

With LCDS express (limited to 1 CPU) 1000 plus users with RTMP should be possible since it is multiple threaded. Other techniques like servlets would block too many threads.

Tags: flex flexcampboston2007 lcds

Flex Camp Boston 2007: Keynote

Rough Draft Notes

Christophe Coenraets is giving the Keynote

Talking about Flex 3 Improvements

Advanced DataGrid: hierarchical data, flexible grouping, custom formatting
Charting Enhancements: data-oriented graphical APIs, per-item labels and fills, region selection
New List and Data Effects: choreograph data

Showing iLog charting example
3D bar and data charts
Organizational chart example with grab and pan

Showing code example with the AdvancedDataGrid

<mx:AdvancedDataGrid>
<mx:GroupingCollection>
<mx:Grouping>
<mx:GroupingField name="category"/>
</mx:Grouping>
</mx:GroupingCollection>
</mx:AdvancedDataGrid>

Need to tell grouping collection to refresh itself.

Persistent Framework Caching
Flash player caches Flex framework across projects and sites.
Size of target SWF can now be as small as 50KB.

Base application size 600KB, removing debugging via compiler flag -compiler.debug=false 380KB, Flex Build path/library path/framework linkage, change that to runtime shared library, 200KB. Has fall back capability to support loading SWF instead of using signed SWF caching.

Memory and profiling and code refactoring are two big improvements in Flex Builder 3. Demonstrating sample application called Salesbuilder as a way to show these two new features. Source code is available off of his blog. Application is AIR based and supports desktop drag and drop to save graphs along with offline data synchronization using the SQLite DB and LCDS. Next talk is about profiler so this he isn't talking about it. Showing find references and rename variable support.

Designer and developer workflow is improved through skin asset importing and CS3 Flex component support in Flash. Showing Fireworks example of show to easily skin a button, export the asset and pull it into the Flex CSS file. Once in Flex Builder one can use the new CSS Design view to manipulate the file. Ability to graphically assign Scale 9 parameters that it updates the CSS file with. Can also export style information from Flash.

Flex Builder 3 now supports wizards for working with data and web services. Will generate both client side and server side code in PHP and some other languages for data access. Can introspect a web service through a wizard, select desired methods, and generate stub code on the fly that is strongly typed.

Flex 3 has enhanced JavaScript/AJAX wrappers and improves the deep linking support from Flex 2. Showing deep linking support in Buzzword. All about anchor management. Can leverage the existing URLKit.

Showing new Flex pricing and packaging. Flex 3 SDK, free, Flex Builder 3 standard is $249, there is other pricing.

bugs.adobe.com/flex
www.flex.org/community


Tags: flex flexcampboston2007