Blog to discuss Midnight Coders products features, ideas and trends in development of Rich Internet Applications

Thursday, August 31, 2006

WebORB for PHP update [AMF3PHP :)]

We're entering the final stage of the WebORB for PHP release. If all goes well, the release should be available later today (or some time tomorrow at the latest). WebORB for PHP is going to be a free and open-source project. The most important thing it will offer is the Flex RPC integration (AMF3 support). As a result, WebORB for PHP will appear to Flex Builder developers as an FDS server. Deployed PHP classes would have to be registered as Flex destinations (we plan to automate that part in one of the subsequent releases) Flash Remoting (AMF0) is supported as well. Currently we target only PHP5, but if the demand for PHP4 is big, we'll seriously look into porting the product to that environment as well. Stay tuned for further announcements....

Tuesday, August 29, 2006

WebORB for Ruby on Rails buzz

It has been a week since we released WebORB for Rails. It is fantastic to see the buzz generated by the product release and the community embracing the product. Here's a list of blog posts mentioning the product:

http://weblog.rubyonrails.com/2006/8/28/power-flash-and-flex-from-rails
http://www.flex888.com/2006/08/28/flex-is-on-rails-weborb.html
http://www.crowdedweb.com/articles/2006/08/28/.................
http://blog.xsive.co.nz/archives/134
http://blog.vixiom.com/2006/08/23/flash-remoting-for-rails/
http://blog.vixiom.com/2006/08/23/flash-remoting-for-rails-tutorial/
http://blog.vixiom.com/2006/08/26/flash-remoting-for-rails-tutorial.........
http://grahamglass.blogs.com/main/2006/08/flashflex_to_ru.html
http://codeintensity.blogspot.com/2006/08/weborb-for-rails-connec............
http://www.simb.net/client/index.cfm/2006/8/22/Flash-Remoting..........
http://ria.richtechmedia.com/2006/08/24/weborb-for-ruby-on-rails/
http://blog.danielyuen.hk/articles/2006/08/24/amf-support-on-ruby........
http://blog.shawnborton.info/article/294/flash-remoting-for-rails
http://www.cduv.org/2006/08/24/weborb-para-ruby-on-rails-disponible/
http://www.novemberain.com/blog/?p=910
http://rubyblog.de/index.php/2006/08/24/weborb-verbindet-flex..............

Wednesday, August 23, 2006

Flash Remoting for Ruby on Rails tutorial

The Vixiom Axioms blog published an awesome tutorial covering Flash Remoting integration with Ruby on Rails using WebORB. The tutorial describes the code for a Flash MP3 player with a Rails back-end.

Unknown destination - Flex Builder caching bug?

I keep hearing about a problem with Flex applications using RemoteObject. The problem is manifested via an error saying "Unknown destination 'XXX'":



As you know, RemoteObject destinations must be defined in remoting-config.xml. Flex Builder loads the file to get a list of valid destinations. However, it appears Flex Builder does not load the file every time the project is compiled, so the config file must be cached. As a result, if you add a new destination after Flex Builder creates or loads your project, the destination remains to be invalid unless the config file is reloaded.

I found two ways to force Flex Builder to reload remoting-config.xml. One is obviously a plain restart of the IDE. The other approach is quite simple too: open project properties, select Flex Compiler panel and click 'Apply'.

By the way, these are just my observations. If someone knows for sure what's going on (presumably someone from the Flex Builder development team), I'd be interested to know how far off I am from the truth. :)

UPDATE: Check out this post on the flexcoders user group. There is a nice little workaround described to avoid the problem.

Tuesday, August 22, 2006

Flex RPC and Flash Remoting for Ruby on Rails

Much anticipated release of WebORB for Ruby on Rails is here and it is beautiful! The product is free and open-source and does really wonderful things for integrating Flex and/or Flash Remoting applications with Rails. We implemented both AMF0 and AMF3 protocols as well as added support for service deployment via standard Flex configuration file (remoting-config.xml).

From a Flex developer's perspective, WebORB for Rails looks like an FDS server - you create a Flex project, point it to an installation of WebORB and all registered Ruby destinations can be invoked from Flex. Flash Remoting apps will see WebORB for Rails as remoting gateway.

Ruby developers will enjoy the same ease-of-use and convenience they are already accustomed to with Rails. You do not need to do anything special with your classes to expose them to Flex and Flash - WebORB automatically locates classes and adapts client side types to their Ruby counterparts.

There are some resources to get you going:

Thursday, August 17, 2006

Online countdown timer as a Flex RPC application

If you noticed I used a Flex countdown timer in my previous post. Before I wrote the post, I searched for a reusable online countdown component and could not find anything decent looking. So I decided to create one on my own. Now anyone can create a custom countdown timer using this page. Once set up, one can generate HTML markup for importing the timer into any web page. The generation process uses Flex RPC and WebORB for .NET to save data in a database and to assign a unique ID for the timer. The ID is used to load the timer's config data when it is imported (like we did with the previous post)

In overall it was a very enjoyable experience. It took about 3 hours to complete the project (both client and server side). Flex Builder simply rocks, I cannot get enough of the tool. The only unresolved caveat is using a mx:Panel inside of another mx:Panel. The one on top somehow gets some extra transparency (see the 'timer preview' panel).

This little example goes to show how much faster development is with Flex. Had I used AJAX, I'd still be debugging the JS differences between IE and FF. In fact, if someone is up for the challenge and want to try to create something similar (hopefully something identical) with AJAX, I am very curious how fast you can do that. Please post about your experience here...

On the other hand, if you would like to improve the example, you can get the code from the page linked above. Feel free to contact me with any code updates. One thing I would like to see changed is some additional styling and perhaps resizing ability of the timer panel. Perhaps a drop down with various styles would offer the best user experience.

WebORB for Rails preview release countdown

Good news for anyone anticipating our release of WebORB for Rails. A preview release of the product will be available as early as August 22nd. The release will include the following features:
  • Full AMF0 support - (primitives, strings, dates, arrays, complex types as arguments or return values)
  • Full AMF3 support (same capacity as AMF0)
  • Ability to invoke any function on the ruby classes deployed in a designated folder
  • Declaration of deployed services using standard Flex configuration file (remoting-config.xml)
We're so excited about it, we created a little (fully reusable) Flex countdown component for the event (Click the 'powered by' link to create your own free countdown timer):

Tuesday, August 15, 2006

Back home from Flex Seminar

Just got back to Dallas from a one-day Flex Seminar in New York. From our perspective the seminar was quite interesting and very productive. The booth traffic was constant as we were demonstrating our implementation of the Flex Data Services functionality for .NET and Ruby on Rails. I plan to do another post describing the demo.

There were six vendors in the 'vendor demonstration area'. Only three companies (Adobe, Straker and us [Midnight Coders]) develop products, others are consulting/professional services organizations. I think this is due to the fact that Flex is still a relatively new technology. I bet a year from now, a similar event will be drawing a lot more product vendors.

The speaker line-up, IMHO, was okay. Personally, I would've been more interested to see and hear not only what people do with Flex, but also how they got there. I was curious to know what sort of challenges they had to overcome, what type of technology decisions had to be made and finally what are the best practices they could share.

I was asked to do a presentation on Flex Data Services, but, unfortunately in the end I didn't get a chance to present. You can still download my presentation here.

Friday, August 11, 2006

WebORB datasheets just arrived

Just got the order of WebORB datasheets delivered. We're almost set for the conference. Now working on some last minute fine-tuning for the demos and we're ready to rock.

Btw, if you would like to see what the datasheet looks like, you can download it here:

In New York City for Flex Seminar

I arrived to New York last night. Travel was not as bad as I expected given the circumstances with all the new security precautions (flight was delayed by 2 hours). I wish American Airlines would get our of habit of getting everyone boarded on time and then keeping the plane on the tarmac for 2 hours.

The weather this morning is fantastic - can't beat 74 degrees compare to 102 in Dallas. It has been a long time since I visited NYC last time (close to 5 years) and it is fun to be emerged in the city. I am staying at my cousin's place in Brooklyn. Here's a very typical view from a Brooklyn apartment (unless you live in one of those new, overpriced hi-rises):

Friday, August 04, 2006

WebORB for Rails (now with Flex RPC integration!)

When you are the very first person on the planet to try something really, really cool, it feels absolutely phenomenal!! Today is one of those days when after a streak of countless hours the team held is breath and Harris pushed a button in his Flex client and flawlessly invoked a method in a Ruby object using the following AS3 code:

var remoteObject = new RemoteObject();
remoteObject.destination = "FlexRemotingTest";
remoteObject.echoInt.addEventListener("result", onEchoInt);
remoteObject.addEventListener("fault", onFault);
remoteObject.echoInt( 1 );

Super small step for our little (but extremely mighty) development team - a HUGE step for the worldwide Flex and Ruby on Rails development community. Ladies and gentlemen, I am proud to be the first to announce: Midnight Coders has done the very first successful invocation of Ruby from Flex using AMF3! (I feel like I just came from a space flight..)

Here are a few supporting screenshots:

Flex client source code:


Flex client running:


Source of the ruby class:


p.s. Wish you very here to share the excitement.... :)

WebORB for PHP update (Flex Data Services for PHP)

Some really cool stuff is happening around WebORB for PHP. The product is going to be a direct port from WebORB for .NET and thus far we already have basic remoting working. The product is going to be free and open source for the most part (that includes support for Flash Remoting/AMF0, Flex RPC/AMF3, custom serializers, client/server type mapping, security, etc). The commercial part will include support for Flex Data Management Services and a few other cool things we're working on.
One of the goals I have set for the product is the ease-of-use. Starting from installation and deployment of the user application classes to management and configuration of the product, I want the developers to have a very pleasant and enjoyable experience. The deployment model should be as simple as dropping a PHP class into the designated folder and it will automatically be available to all supported clients (Flash and Flex for now). If you want to secure it - no problem, open management console and set your security restrictions.
I hope to have a preview version of the product by the end of this month. One thing that's not entirely clear is the licensing enforcement for the commercial part of the product. I wonder if there is a precedent in the PHP world for a free, open-source product that has a commercial upgrade path. If you know of anything like that, please submit in the comments.

Visit us at the Flex seminar in New York

We are going to have a booth in the vendor demonstration area at the Flex seminar in NYC on August 14th. Make sure to come by and say hello. There will be cool product demonstrations and we're also hoping to showcase WebORB for Ruby on Rails!