<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8907963\x26blogName\x3dWS-Comments\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://ws-comments.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://ws-comments.blogspot.com/\x26vt\x3d972201484635970681', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe", messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { 'blogger-ping': function() {} } }); } }); </script>

WS-Comments

perspectives on open-source and web services

Saturday, December 11, 2004

php-based J2EE approach?

I was a little puzzled by this, after reading and getting excited about the direction of ActiveGrid, and the concept of lamp5 and Web Services in general. apparently, Simian is attempting to create a J2EE-like server based on php.

the phpBeans (similar to EJB's - Enterprise Java Beans), the phpBeans Object Server, and phpBeans Client API allow php objects to be encapsulated in such a way that they may invoke one another on remote machines and all that jazz.

what I find particularly puzzling is that Web Services enable the same kind of thing. you wrap up your php classes and expose them with WSDL's, and I use SOAP clients to invoke them from anywhere else in the world. but the use of a phpBean and phpBean Object Server takes that cool concept OFF of standardized protocols like SOAP, HTTP, etc and puts it into a client API.

but exposing your php classes/objects as web services means ANY program on ANY platform can use them. exposing your php classes by making them phpBeans and putting them on a phpBeans Object Server means only other php classes that use the phpBeans Client API can use them.

though both ActiveGrid and phpBeans are in their infancy (though they are more mature than lamp5!), I would like to see developers embrace the ActiveGrid approach more than the phpBeans approach. I think web services are being adopted by enterprises in place of approaches like J2EE and CORBA and other language-oriented integration methods.

2 Comments:

At 12/13/2004 11:38 PM, Blogger jbroadway said...

Hi Luke, thanks for the post about my new project (I'm the developer of phpBeans). I thought it might help to clarify a couple of things about the software, which will hopefully dispell a few fears you and others might have about it:

First, phpBeans is meant to fill a space that SOAP and XML-RPC aren't completely appropriate for. This space is much more akin to Java's RMI and OMG's Corba technologies. Figuring that people would compare phpBeans most often to SOAP and XML-RPC, I wrote an article comparing and contrasting it with them, in the hopes of better explaining where each of them is most appropriate:

http://www.phpbeans.com/index/news-app/story.4

Second, what I am trying to do primarily is not to create new software but to create a new standard. While this standard is PHP-oriented, it is not at all PHP-only. In fact, there is already a Ruby client library available, and we hope to offer many more soon:

http://www.phpbeans.com/index/client_for_ruby

So the only way the phpBeans protocol limits you is in the same way that SOAP limits you from using Corba or Java RMI limits you from XML-RPC.

Third, what phpBeans does is different from ActiveGrid as well (as far as I've read about ActiveGrid), since phpBeans is intended to sit behind the publishing layer of the application. phpBeans would contain the business logic of an application, while an HTTP web server would call the business logic layer then compile it into whatever format is requested (HTML, XML, RSS, SOAP, etc.). In MVC terms, phpBeans contains the Model.

We're also planning ways of making phpBeans interoperate better with other standards like SOAP (probably via the idea of "connectors"), but keep in mind that we're trying to do so with the emphasis on creative specifications first, software second. As I said in our press release: in order for PHP to gain acceptance [at the enterprise level] it needs to increase its focus on web standards. When an existing standard doesn't adequately cover a certain area, the axiom "the right tool for the job" would suggest that we create a new standard or a new tool that solves it best. And SOAP is definitely not a one-size-fits-all solution. ;)

I hope this helps clarify where our project is coming from, as I really do think this is one of the things PHP needs in order to be taken seriously.

Cheers,

Lux

 
At 12/14/2004 6:51 AM, Blogger luke said...

thanks for coming by my blog, and thanks for leaving the links and the info. I think there is a place for phpBeans and other RMI-style distributed computing, and the solution would be very beneficial for distributed computing projects that will be written under a controlled architecture.

most of my interest in Web Services is focused on the B2B integration area, where a person may have little or no control over the architecture and language of the systems they'll be interacting with. for example, to process an inbound order, we might have to hit a 3rd party inventory management program, like GAINS, written in Java, and we also need to update our own Informix database, and interact with our custom-built credit checking program written in ColdFusion, then use an online currency converter, etc, etc.

if the interactions between these very heterogenous systems can be standardized using a SOAP client that hits all their WSDL's, it's almost simple to work with them all.

I can see phpBeans architecture being very well suited for, as you say, an enterprise looking to take their php scripts up a notch to get scalability, reliability, redundancy, and all the benefits that come with having a good distributed platform. but I would think they need to have a good deal of control over how their code interacts with the phpBeans, which is not really possible in the kind of environment I described above.

 

Post a Comment

<< Home