2.13.2009

Flight

Just a quick plug for Jacob Wright et al's Flight Framework. I've been using it for some time on a couple of projects; it's a very useful, dependable project. Thanks guys!

Labels:

12.11.2008

Why you need analytics in your Flash/Flex content

I've had the chance to get a lot deeper into the web analytics world these past few months. I took a class taught by Clint Rogers where we explored analytics in general and its possible applications to online education. It was a paradigm-shifting experience.

To be simple and direct: web analytics is powerful, powerful stuff. I knew of analytics before; heck, I'd even used Google Analytics a time or two. But once you start to understand the power behind using data to drive your content and design, it's hard to imagine why you ever wouldn't put analytics tracking in your content.

A caveat: obviously for a lot of our client work it may not be feasible (or even legal) to put analytics tracking into someone else's stuff.

But, if you make content that's your own, or if you work for a company that produces its own content, or even if your consulting company can get access to do it for your clients, then you absolutely should do it. Really, you can't afford not do.

Here's why:

1. Make Smarter Decisions
How many times have you sat in meetings where decisions, even very important decisions, were made because of how people "felt" about things? "I really feel the user will ..." or "I'm sure that they won't look at that," or "Here's how our user experience should feel."

Think about how ridiculous this is. One person, or even a group of people, can never determine how their end users will use, view, navigate, or treat their products without observation or testing. Unless there are some really sweet marketing techniques I don't know about, it's impossible!

You need data to drive your decisions. Here's a great example. In the Elearning world, we've built content for organizations that had tight constraints on the amount of rich media involved. They told us they had to assume that we were dealing with an older demographic of users with dialup connections. A major decision about the quality of content was decided without any recently-obtained supporting data. If we'd had analytics in front of us for their content we could have said "You're absolutely right," or "You're crazy, 95% of your users have DSL or better!"
If you are publishing your own content, how much more important is it, then, to know your personal return on investment? Can you say with confidence that the addition of that Flash banner on your homepage increased sales by 17%? Not without analytics.

2. Prove Your Worth

Is this ever more applicable? Your boss calls a meeting of all developers and announces that there are going to be some cutbacks. You've worked your butt off for this company. You've made some really cool stuff. You might just get canned.

Enter analytics. Don't just plead your case to your higher-ups, prove to them that your content has made a difference. Show them the increase in sales conversions because you knew it would be a good idea to place a search in the top corner. Show them how more usable your RIA is than the old system. Show them how much money it made them. Show them the data that proves Flash is more valuable than a cheaper alternative.

Or, if your economy happens to be jumping through the roof at the time of reading this, then you be the one to call the meeting. Show your company how much you have made them, and how much you think you're worth. Again, this is powerful stuff.

3. The Future
Web analytics is growing. More and more companies are relying on web analytics to make their online content stronger and more effective. Analytics will become, faster, smarter, better, and yes, cheaper. You and your company will need to be as efficient as possible. You need to be sure your content is optimized, that its useful, engaging--that it works. You simply can't do it to the extent necessary without web analytics. Not only that, but in a few years, you'll be looking like a dinosaur amidst your competitors.

Getting Started

Google Analytics
If you're just getting started, think about using Google Analytics. It's free, super easy to use, and getting more powerful all the time. Here are some resources:
Omniture
If you or your company already have access to Omniture, it's a fantastic resource. Here are some resources for Flash/Flex integration with Omniture:

Labels: , , ,

11.02.2008

What would you say to a Flex beginner?

Below is the Google Docs presentation part of the class discussion I'm leading tomorrow in the "Advanced Topics in Flex" course at Utah Valley University.

I struggled with trying to figure out what to talk about in such a short time with folks who are just getting started.

See what you think. Let me know what you would have done differently.

Labels:

10.27.2008

Bug with RichTextEditor/TextArea htmlText

Found an annoying bug that corrupts the htmlText inside a TextArea when using RichTextEditor in Flex.
Basically, if you apply bulleted formats in a not-so-hard-to-imagine way, you'll end up with a TextArea that bullets (gives <LI> tags) to every line with a line break. Pretty annoying.

Check it out, and vote on it if you get a chance.

Labels: ,

10.23.2008

Between a Rock and Hard Place with Flex/AIR


I've been working on a really cool Flex/AIR app over the past year. The application is called eBuilder, probably been the most complicated/expansive Flex project I've worked on to date.

eBuilder is an Elearning authoring tool based completely in Flex and AIR. It builds an XML representation of visual assets (Text, Video, Audio, Images, Flash) and then converts that XML to an MXML file that is then compiled by a server and returned as a standalone SWF file (still waiting for command line abilities in AIR to not have to depend on an external server to use mxmlc).

My problem has surfaced with an interesting dilemma we found ourselves in when we tried to push the boundaries of the application and make some really cool additions.

The feature that got us was dynamic, external components.

To make a long story [a little] shorter, we wanted to build the application in such a way so that if someone wanted to add a new component to the library, say a Drag-n-Drop component, we would be able to load that component and use it at runtime, rather than change the source of the application.

Maybe a great idea, but it proved to be a little difficult for two reasons:
  1. Adobe's/Vista's security model. Vista is very picky about who can write to the program files directory. Adobe and AIR respect this, which became a problem because of the second reason.
  2. Adobe AIR only allows module loading from exactly the same directory as the application (See http://livedocs.adobe.com/flex/3/html/help.html?content=modular_5.html, right after bullets). Basically, any module to be loaded in a Flex application has to reside in the same folder as the AIR application (in the Program Files directory).
In order to achieve these external components, we had to download the module .swf's in binary format, use a hack (sorry, probably shouldn't condone this and thus won't advertise the hack itself, although it's relatively easy to find) to write them to the Program Files directory, and finally load them in as modules with the ModuleManager.

Since Vista has effectively broken our little writing-to-Program-Files hack, eBuilder can no longer function with external components on Windows Vista. And, if Adobe ever decides to fix the hack that allows writing to Program Files, we're hosed altogether.

Anyone ran to a similar issue?

Can you think of a more efficient way to load external components? (I'm not stupid enough to believe there isn't a better way)?

Labels: , , , ,

2.12.2008

BlazeDS = AMF/LiveCycle?

I've been lucky over the years to always have someone that can build the back-end data structure for a project. But, as a result, I've let myself become less knowledgeable as I should be on what technologies to use and work best in certain situations. So lately I've been trying to get up to speed in this area and have been playing around with RubyAMF, AMF PHP, and SWX PHP as solutions for Flash/Flex to server communication.

I've been the most impressed with technologies that use AMF (Action Message Format). AMF is a binary format for exchanging data. It's mostly used to transfer data between Flash/Flex applications and a database via a remoting request. In a remoting call, the external elements being called would be application tier services, which would likely be running on an application server such as Adobe ColdFusion, Java, PHP, or .NET.

The major benefits of using AMF for remoting requests are speed and packet size. The use of a AMF binary data transfer format increases performance, allowing applications to load data up to 10 times faster than with text-based formats such as XML or SOAP.

Adobe evangelist James Ward has a Flex application on his site that enables you to run some AMF benchmark tests. Census RIA Benchmark demonstrates various methods of loading data in RIAs and determines how those methods affect performance, bandwidth, and client memory usage.

So, where am I going with this? Well, Adobe released source code for its remoting and messaging technologies under a new open source product named BlazeDS.

An open source Java implementation of AMF, BlazeDS includes technologies that were previously available only as part of LiveCycle Data Services (LCDS) . With BlazeDS, developers can easily connect to back-end distributed data, as well as push data in real time to Flex and AIR applications, for more responsive RIA experiences.

According to Adobe, the company plans to contribute the proven technologies from LCDS to the community through BlazeDS. The two LCDS technologies included in the first release are the Messaging Service and the Remote Procedure Call (RPC) Services:

  • Messaging Service: The Messaging Service provides publish and subscribe messaging for Flex and Ajax applications. Messaging uses the Java Message Service (JMS) to provide real-time communication between connected clients and JMS-compatible application servers, such as ColdFusion. This enables you to create scalable, reliable applications for collaboration and data push, such as chat applications or real-time stock quote applications.
  • RPC Services: The RPC Services (aka Flash Remoting) are designed for applications in which the request/response model is the best choice for accessing data. It enables the use of HTTP services, SOAP-based web services, and Plain Old Java Objects (POJOs) with the efficient AMF 3 protocol. The biggest benefit of using RPC Services in LCDS is the ability to call Java services directly without needing to configure them as SOAP-compliant web services.
It keeps getting less and less expensive to develop Flex applications. The Flex SDK is free and includes a command-line compiler and the entire library of Flex framework class files. BlazeDS will be free and includes some of the functionality from LiveCycle. Its a good time to be a Flash/Flex developer.

Labels: , , , , ,

2.06.2008

Passing ...rest arrays to another function

Quick tip on how to pass ...rest arrays to another function. I ran into this on my current project at work and wasted a good half hour or so before I figured it out. Duh!

private function myFunction1(strVar1:String, objVar2:Object, ... rest):void {
myFunction2.apply(null, [strVar1, objVar2].concat(rest));
}

Labels: , ,

2.05.2008

Yahoo! releases Flash CS3/Flex components

Yahoo! Developer Network releases ASTRA, the ActionScript Toolkit for Rich Applications. A collection of Flash and Flex components, code libraries, toolkits and utilties developed by Yahoo! for ActionScript developers.

ASTRA Flash components comes with the Tree, Menu, TabBar, AutoComplete, Charts, AlertManager, AudioPlayback, and MenuBar components for Flash CS3.

ASTRA Flex components include AutoCompleteManager, ColorPlaneAndSliderPicker, ColorSliderPicker, DropDownColorPicker, IPv4AddressInput, TimeInput, and TimeStepper components for Flex.

Labels: , , ,

1.08.2008

Flex (Now LiveCycle) Data Services: A Beginner's Perspective


I got the chance over the last few months to work on a very cool project that required some pretty advanced (well, complex at least) architecture and abilities. I thought of LiveCycle Data Services and decided to look a little more into what it could do.


First, LiveCycle Data Services is really powerful. It includes four basic services that run as "middleware" (i.e. between the server and client sides). The services are Proxy Service, Messaging Service, Data Management Service, and Remote Object Service. My project only required the Messaging and Remote Object services, and believe me, I really only scratched the surface on these technologies. There are many, many cool things you can do with LCDS.


That being said, I wanted to record here a few thoughts and pieces of advice for others who are just starting to get to know this technology.


First, and probably the most daunting for me, was that you're going to have to get to know Java servers. My experience up until this point had been strictly limited to Windows or Linux running Apache, and even in those areas I was practically a beginner. Believe me, it was quite the task to get to learn Java servers. LCDS comes with an installation of Adobe's integrated Jrun server, which I ended up using, although you can use a number of Java servers (JBoss, Jrun, etc).


Second, and you might have seen this coming, but you'll need to get to know Java itself to a degree. I would say this largely depends on the requirements of the project, but for mine luckily it wasn't too bad. Also lucky was the fact that learning to write basic Java classes really wasn't that bad either. ActionScript 3.0 is a great prep :)


Finally, get to know Google. This is kind of tongue-in-cheek, but there were more than a bunch of times that I ran into a wall with either the server, LCDS or Java in general and I spent a lot of time trying to search for answers. One extremely helpful resource that I referred to a lot was David Gassner's Lynda.com series on Flex Data Services. It's slightly outdated, but still contains a lot of relative and extremely helpful tips on building your LCDS project in Flex. Here's a few things I saved for future reference, maybe they can help you out:


  • If you're getting an error with the server with loading MessageBrokerServlet, try this page

  • If you're having some problems with your server not loading classes, you may want to check your jrm variables on your server

  • For the Messaging service, check this page if you're having trouble with RTMP running on port 2038

  • A common error trying to use MySQL involving a "handshake error" is resolved here

  • When configuring your remote object services (remoting-config.xml), be sure to use different names for a channel and service (i.e. channel = "products" and service = "Products")



Hopefully this helps if you're just getting started with LiveCycle Data Services. Again, I really had a blast with this technology overall and hope to be able to use it again in the future. Feel free to post any useful thoughts or pieces of advice you've come across as well!

Labels: , ,

10.01.2007

Astro, Hydra, Moxie, and more: MAX Day 1

Adobe is definitely all about the experience. I must say they did a pretty swell job with the keynote experience this morning. Seemed a little Apple-esque (in a good way) and maybe even a little more rockin'. Here are some really cool things introduced at the keynote:

  • Astro. Code name for Flash player 10. They did a simple HD demo with H.264 in Flash on the big screens, it looked great. They're also adding in some elementary native 3D support in the player. Rotation and position on x, y, and z axis. Smaller stuff included Flex framework caching and bidirectional text support (along with a lot better text support in general). Pretty good post on Astro here.

  • Hyrda. Code name of application for creating custom filters. Adobe figured instead of making custom filters at the request of the community they could just turn it over to the community completely. Great idea. This one's available on labs via Adobe Image Foundation Toolkit.

  • Moxie. Code name for Flex Builder 3. Some cool features coming up, including profiling performance of your Flex app and refactoring for easy updates to code. Some more on that here. Plus, Flex 3 Beta 2 now available.

  • Other stuff (not cause it's less important). They showed off Adobe Media Player, some really cool and innovative AIR applications, Adobe Premiere Express, and talked about how the internet experience coupled with technology is changing.



It's been a great conference so far. I'd go into some of my sessions, but I am dang tired.

Labels: , , , ,

3.13.2007

RIA Development = Software Development?

If you're like me, you are sick and tired of people treating web application development like the redheaded stepchild of website building. If you're like me, you've been handed too many projects that lack a defined scope, have inadequate analysis, exhibit poor implementation, and too often completely skip the process of evaluation and testing ("The client will test the product, right?").

It seems to me that rich application development, regardless of whether it's web-based (Flash, Flex, AJAX, server-side, etc.), needs to follow the same steps that any (efficient) software company would follow to develop its product, even if it's on a smaller scale. Too many clients that I work with think that because it's easy to use, it's easy to build. Or sometimes clients think that just because it's been done before, it should be easy to replicate quickly. Or, and this happens far too frequently, they think they can have a sweet product that is cheap and developed in two weeks. As a result, deadlines are set to allow for minimal development (not including other phases of the process), products are buggy at best, and expectations are high in contrast to the final output. Disappointment ensues, and business relationships suffer.

I'm no computer scientist, and I don't understand completely all the possible patterns and facets of software development, but I do know enough about the process of development to know when the developers are in for it because whoever is managing the project doesn't understand the process they're over.

Shouldn't web development, especially RIA development, be considered software, in a very true sense? And if that's the case, we as developers/project managers/clients should expect that some method be applied to the madness that too often is the process of throwing assets together in a Cowboy Coding fashion. Although the title works for the blog and for me personally, this absolutely is not the way we should approach a project. Use any approach you feel adequate (Waterfall, Top-Down/Bottom-Up, SDLC), but please use something.

Otherwise we'll all be Cowboy Coders.

Labels: , ,