Why PHP Users should be Serious about SOA?

Tuesday, January 15, 2008

PHP is a scripting language, as we all know. The initial purpose was to help Web programmers to build the dynamic web pages, to ease the mess of programming for the dynamic content. Then PHP nicely hooked up with Apache Web server and MySQL. With the rise of Linux, came LAMP, tough P may be said to represent Perl, Python as well as Ruby - the new kind on the block (well, actually then it should be called LAMR), for many, the first thing that comes to mind with P in LAMP is PHP. (The same is true for WAMP as well). The lighting of LAMP gave rise to a new era of applications. PHP gradually evolved form the scripting language that used to ease the generation of dynamic Web pages to a programming language that runs enterprise applications.

Gradually, PHP became a main contender in the enterprise space, playing a role side by side with Java and Microsoft .NET technologies. In addition to the open source presence in many fronts, starting form the php.net downloads to packaged solutions like XAMPP and WampServer, companies like Zend offering enterprise grade products and support, has further strengthened the position of PHP in enterprise applications.

If you look at most of the applications few years ago, and even today, there is a database component. Hence the M in LAMP. The interesting question is, would M hold on to its position in LAMP for the long run, or would it have to let S in SOA to come to that place?

SOA has been a buzz word a few years ago, may be two to three years ago. That was the peak of hype on SOA - in my feeling Ruby and to some extent REST is at the top of the hype right now. By now, hype on SOA has dies down. And many software architects would agree that SOA as an architectural style that is here to stay. It is a fact that, because SOA simplifies connecting systems though loose coupling, almost all enterprise applications would have at lease some elements of SOA within them.

SOA, as a principle, has been there for many years. Hence there have been many traditional technologies, as an example some custom messaging systems, that could be used to realize SOA. However, the rise of Web services brought the SOA term into light and injected new life into it. Both SOAP (or WS-* as some call it) as well as REST could be used to realize SOA with relative eaze. I would not jump into that heated argument on SOAP vs. REST here. However, I must mention that neither WS-* nor REST should be completely ignored, when you think about enterprise applications.

PHP users used to be closely working with Databases. However, looking at the trends, it looks like, more often than not, we would have to talk to services rather than to databases in the future applications. SOA is not full fledged in terms of adoption as of yet. But it is happening. Many businesses and many enterprise applications are in the process of laying out the infrastructure for SOA. Hence, PHP being a programming language increasingly used for enterprise applications would have to consume and provide more services more often than it used to.

It used to be LAMP or WAMP; It is only a matter of time before they become LASP or WASP, where S is for Services. Are you ready to change gears?

9 comments:

Unknown said...

Hm, I would say, SOA is about communication and transportation of data... it has still to be saved somewhere, but perhabs not directly in your application.

So, SOA does not replace the database, it is something additional.

LAMPS ;)

Jonathan Street said...

LARP? Why would Ruby replace the database? Should it not be LAMR?

Samisa said...

Yes, LARP is a typo. Should be LAMR. Thanks for pointing out.

Samisa said...

Sure, someone will need to access the DB at some point. However, that would be done only by those core services IMHO. Higher level services that build on core services may not need to talk to the databases directly.

Unknown said...

For those who are interested in PHP for SOA go to http://www.osoa.org/display/PHP/SOA+PHP+Homepage

Jane B said...

You opened my eyes... I appreciate your views...

dot net web services

helghareeb said...

Well, My question now (and I really hope you can answer me)

Can I consume Web services using PHP? I am sorry I am no expert at PHP. I keep hearing the (question; which I really believe a stupid one): Can I write Web services using PHP? And I keep answering (NO) because PHP is a scripting language; not a programming language.

Then comes the next question: Can we consume Web services using PHP? and I can't answer.

Would you please answer this question for me?

Anonymous said...

helghareeb

You can do both with PHP. Even if PHP is not a compiled language it can still be used to publich WebServices. Please read http://www.osoa.org/display/PHP/SOA+PHP+Homepage to find more about this.

As far as consuming existing WebServices that depends on what type of protocol is used! There are a few like JSON-RPC, XML-RPC and SOAP. As far as SOAP is concerned give a look at NuSOAP for a quick and simple introduction to WebServices in PHP.

I hope I helped ;)

Dimuthu said...

Hi neguinho,
Yea NuSOAP will provide some basic functionality to implement SOA, But if you want go further, when you are implementing SOA in your enterprise, you have to think about Security, Reliability, MTOM attachments. WSF/PHP fulfill both the basic functionality and these advanced functionality. Check this article for more information, WSF/PHP: Creating Business-Conscious IT Solutions


Thanks
Dimuthu