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

Tuesday, September 20, 2005

Flash/AJAX Message Server for .NET (beta 3 progress)

We finished porting all the recent changes for Message Server from the Java to the .NET edition of the product. We also added a new executable to make it easy to start an instance of the message server. So far the results have been great. The same chat clients (Flash and AJAX) we created to communicate via Java Message Server work just fine with the one for .NET. The product is very fast, but we still need to test it with large number of clients. The Beta 3 release is getting close, it should be another week to 10 days before the release is available.

Friday, September 16, 2005

Flash Remoting and AJAX tutorial

As soon as we release Beta 3, I plan to start a tutorial right on this blog dedicated to the development of an AJAX and then later on Flash Remoting based online application. I am thinking about creating a reusable and configurable polling application and walk through all the stages of development starting from the analysis and design to the delivery. With the application a user will be able to configure his own poll and generate a view which can be imported into any web page on the web. If you have ideas for any other application, feel free to post them here.

Server push for AJAX and Flash in Beta 3

Just wanted to give everyone an update on our progress with the Beta 3 release. As you may know we are focusing on delivering the 'interactive messaging' features in the next beta release. We finished all the development in WebORB for Java and it works great! The examples we have tried demonstrate broadcast of private delivery of messages from JavaScript/AJAX or Flash clients to any other connect client (or all for broadcast). The API to send a message is very flexible, you can send any JS or AS object or primitive and the product will convert it to the corresponding type in the receiving environment. That means a Flash client can send an ActionScript object or an array to any JavaScript client. The same goes for the server. You can take any POJO and deliver it via a broadcast to all connection Flash or AJAX clients.

Currently we're porting the functionality to WebORB for .NET. Once it is done the remaining tasks will be doc and examples. Stay tunes, some exciting features are coming down the pipe.

Tuesday, September 13, 2005

Problems with Flash / JavaScript Integration kit

We have been experimenting with the Flash / JavaScript Integration Kit. In overall it is a fairly decent implementation, but we ran into several issues with it:

  • The page that describes how to invoke an ActionScript function from JavaScript shows the following example:
    var tag = new FlashTag('flashContent.swf',300,300,'7,0,14,0');
    // the addFlashVar cannot be found
    tag.addFlashVar('lcId', uid);
    tag.setId('myFlashContent');
    tag.write(document);


    The problem is that the addFlasVar function is not even available in the FlashTag class. Neither is the 'version' argument of the constructor. The proper way to register the lcId variable is:

    tag.setFlashvars( "lcId=" + uid );

  • The way the kit invokes ActionScript functions is by loading the 'gateway' flash movie and passing a query string with the name of the function and all encoded arguments in the flashvars. The problem with that approach, of course, is if JavaScript makes subsequent ActionScript calls back-to-back, only the last one is executed. It is similar to the issue #6 in the list of Known Issues. The root cause of the problem is FlashProxy.js:

    if(!document.getElementById(divName))
    {
    var newTarget = document.createElement("div");
    newTarget.id = divName;
    document.body.appendChild(newTarget);
    }
    // multiple consecutive calls will be modifying the same DIV
    var target = document.getElementById(divName);
    var ft = new FlashTag(this.proxySwfName, 1, 1);
    ft.setVersion('6,0,65,0');
    ft.setFlashvars(qs);
    target.innerHTML = ft.toString();


    One possible workaround is to push JS-to-AS invocations onto a stack and have a timer that checks the stack and then invokes all the functions on from it one by one. If someone has a simpler solution, please let us know.

Friday, September 09, 2005

WebORB Standard Edition

The Standard edition is available at no charge for most commercial uses. Unless you need to bundle WebORB with your product you can use the Standard edition without paying a dime (still subject to the license agreement).

Currently one has to contact our Sales to arrange a license key for WebORB Standard. It is a hassle as developers generally do not enjoy dealing with sales people. To make everyone's life easier we will be opening up WebORB Standard for direct download beginning with Beta3. The Standard edition will be available for both Java and .NET environments. Here's what the edition includes:

WebORB for Java Standard Edition
  • AJAX and Flash Remoting messaging
  • Support for POJOs and Web Services
  • Client applications can invoke any public method.
  • Product supports all arguments and return types (primitives, strings, dates, arrays, complex types, etc.)
WebORB for .NET Standard Edition
  • AJAX messaging (no Flash Remoting)
  • Support for any .NET object and Web Services
  • Client applications can invoke any public method.
  • Product supports all arguments and return types (primitives, strings, dates, arrays, complex types, etc.)

WebORB Beta 3 status update

There has been a lot of work on the Beta 3 release. As mentioned before the primary focus of Beta 3 is interactive messaging. The new features will let both Flash and AJAX clients do the following:
  • Subscribe to messaging 'channels' and broadcast and receive messages
  • Send messages which can be strings, primitives, dates, complex types
  • Send private messages to individual clients
  • AJAX clients can send messages to Flash apps and vice versa
  • Client apps can receive automatic updates when new users/apps join/leave their channels
  • Client apps can receive events from the server side, that is Java or .NET program's can broadcast or send point-to-point messages to AJAX or Flash clients

Neither Flash nor AJAX implementation uses polling. Rich Client System and WebORB implement push technology. We're also thinking about adding support for shared objects, but that may slip into Beta4.

RSS feed is available

Thanks to feedburner.com we now have an RSS feed for this blog. The feed is available at: http://feeds.feedburner.com/WeborbBlog