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: , ,