[omniORB] Re: omniorb-list-digest V1 #250

Ronan Heffernan ronan@stonewatersoftware.com
Tue, 24 Oct 2000 15:42:10 -0400


> 
> 
> AFAIK, there already is an ORBit-module for PHP4
> (see http://freshmeat.net/appindex/2000/08/03/965334535.html):
> 
>   PHP-ORBit is a PHP4 module which can be used to easily access services
>   that communicate via CORBA. This is achieved by wrapping the lightweight
>   CORBA ORB "ORBit" used in GNOME.


I had the same problem.  My solution is to use omniORBpy in conjunction 
with Python and PMZ (Poor Man's Zope).  PMZ lets you embed Python code 
into an HTML page in the same fashion that PHP embeds its own language.  
The advantage is that you have all of the power and flexibility of 
Python (including the use of omniORBpy) instead of being trapped in the 
specialized (contrived) PHP language.  The disadvantages are that PHP 
has built-in support for many web functions (ie setting cookies), and 
PHP *might* have better database-connection functionality (though if you 
are using CORBA, then I assume that all of your database access is 
implemented in a server object anyway).

I looked at using the PHP-Orbit library, but because PHP cannot build a 
collection of structs (objects), you have to fetch one item from a 
sequence at a time, and use cracking functions to get at the internals.  
If your IDL returns a sequence of structs, omniORBpy builds a Python 
*list* data type, containing the structs (as objects?).

Please don't flame me for my criticism of PHP.  I have used PHP for 
three years, and will continue to use it for small, quick projects.  
Most of my projects have outgrown PHP (as defined by needing good CORBA 
support :-)

--Ronan Heffernan,   Stonewater Software, Inc.