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

Thursday, September 28, 2006

WebORB for PHP 1.2 release

New point release (v.1.2) of WebORB for PHP became available earlier today. The release contains several important fixes listed below:
  1. Added support for platform independent path resolution. WebORB now uses DIRECTORY_SEPARATOR in the paths when loading user classes.

  2. Added support for user-driven Flex destination source. Flex applications can configure RemoteObject instances to use a special catch-all - GenericDestination. You can set the 'source' field in the client-side RemoteObject instance to contain PHP classname as shown below (thanks to Renaun Erickson for figuring out how to do this in the WebORB code):

    remoteObject = new RemoteObject();
    remoteObject.destination = "GenericDestination";
    // YourPHPClassName.PHP must be deployed in the /Services folder
    remoteObject.source = "YourPHPClassName";
    remoteObject.helloWorld.addEventListener("result", helloWorldResult);
    remoteObject.helloWorld();

  3. Added WebOrbServicesPath constant to simplify service class dependency resolution. Service classes can load other class using the following format:

    require_once( WebOrbServicesPath . "foo/bar/MyClass.php");
    // where foo/bar/MyClass.php is deployed into the /Services/foo/bar folder

  4. Fixed complex type serialization bug preventing objects with non-public fields from being properly serialized to the client.
The latest release can be downloaded from here, however if you have not tried WebORB for PHP, you should start with the Quick Start guide.

Thursday, September 21, 2006

WebORB for PHP Example in the PHP SDK by Adobe

Pete Mackie from Seaquest created an excellent example demonstrating remoting between Flex 2 clients and PHP Web server performing MySQL database I/O. The example is now a part of the open source PHP SDK by Adobe. You can read more about the example and get installation instructions here.
Here's an interesting conclusion Pete arrived at while working on the example:
"So far as I can tell, WebORB for PHP is the only Object Request Broker that properly handles and returns PHP exceptions properly. AMFPHP does return [object:Object] without a clue on how to handle the data"
If anyone runs into any difficulties with the example or the product, feel free to post about it on the WebORB for PHP discussion forum.

Tuesday, September 19, 2006

WebORB product line summary

Now that we have an offering for every major development environment, it may get very confusing to figure out what licensing terms and pricing options apply. We put together a summary demonstrating functional and licensing differences between various WebORB editions. The table is available on the WebORB Licensing page, but for your convenience I am including a copy below.

Some important points to note:
  • There are commercial counterparts for our open-source offerings. This should work for anyone who cannot use WebORB Open Source Edition because of any restrictions in GPL
  • WebORB Enterprise Edition will offer an implementation of Adobe's Flex Data Services-like functionality for .NET, Ruby on Rails and PHP
  • Pricing may change, make sure to visit WebORB licensing page to get the most current pricing information


WebORB Open Source Edition WebORB Standard Edition WebORB Professional Edition WebORB Enterprise Edition
Java
x x
.NET
x x x
Ruby on Rails x
x x
PHP x
x x
Flash Remoting (AMF0) x x x x
Flex Remoting (AMF3) x
x
(except Java)
x
Flex Data Management


x
Flex Messaging (RTMP)


x
Management Console

x x
Class-level security

x x
Method-level security

x x
Custom serializers

x x
Session-scoped services

x x
Arguments as abstract types

x x
Argument object factories

x x
Data paging

x x
Professional Support Not available Not available Available (see below) Available (see below)
License fee Free Free $799/logical
CPU
.NET -$10,000/ physical CPU
RoR, PHP - TBA
License GPL WebORB Standard
License
WebORB Prof. License TBA
Availability Now Now .NET, Java -Now
RoR - Q4'06
PHP - Q4'06
.NET - Q4'06
RoR - Q1'07
PHP - Q1'07

Monday, September 11, 2006

WebORB for PHP 1.1 (now with database query result serialization)

We just released a new build of WebORB for PHP (v 1.1). The release includes:
  • Support for multiple logging channels
  • Ability to configure client/server type mappings
  • Replaced HTTP_RAW_POST_DATA with php://input
  • Fixed warnings caused by allow_call_time_pass_reference = Off. Now the setting can be On or Off
  • Support for database result serialization for AMF0 and AMF3 clients
  • A test for database result serialization (/Services/weborb/tests/DatabaseTestMySql.php).
Before you run the database test in the included Flex client application, make sure to run northwind.sql to setup the database. The database script is located in /Services/weborb/tests

Thursday, September 07, 2006

Active Record Associations in Flex with WebORB on Rails

We've recently added a new feature to WebORB that allows native serialization of associations within active record models. This has been requested several times and now allows you to do things like (from the Rails documentation):

Person.find(1, :include => [ :account, :friends ])

...in your rails remote service and then in your Flex client you can very naturally peel off account or friends information directly from the person object that is returned.

var person:Object = event.result;
...person.name
...person.account.balance
...person.friends //(this will point to an array of friend objects)

This is something that has been needed since our first release and we are glad to get this out; now developers won't have to roll this data into a Hash in a unnatural way. Thanks to Brian Hogan for pointing me to the script/console feature of Rails to look under the hood and figure this out. I had heard about how cool this was at RailsConf, but never really appreciated it until solving this problem.

If you are interested in how it works, WebORB now inspects the instance variables of active record models; these objects always contain a set of "attributes", but also contain other properties if associative data was included in the find call. WebORB uses this knowledge to dig deep within a model object in order to reconstruct the entire result set and send it over the wire. Of course if you don't want this then simply don't "include" associations in your query.

Enjoy.

~harris

Friday, September 01, 2006

WebORB for PHP is released! Enjoy AMF0 and AMF3 support for PHP

We finally did it! WebORB for PHP is available for download. The product provides a full implementation of AMF0 and AMF3 protocols, so your Flex and Flash Remoting clients can access any PHP class. The product is free and open-source. The product's home page is available at:

http://www.themidnightcoders.com/weborb/php

We tested it with the standard PHP5 distribution as well as Zend Platform v.2.2.0, and all the tests pass. If you run into any problems, please report them to the product's forum at:

http://www.themidnightcoders.com/forum/default.aspx?g=forum&c=2

I need to note that Midnight Coders now supports both AMF0 and AMF3 for .NET, Ruby on Rails and PHP. The next frontier is support for Data Management Services and Messaging!

And now we're SO ready for the Labor Day weekend... Happy coding, guys!