YOUR FEEDBACK
Java Application Development wrote: Take advantage of to add AJAX behaviors to your Spring-based Java Web applicatio...


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP LINKS YOU MUST CLICK ON


PHP 5: Open Source Scripting for the Heterogeneous Enterprise
Existing Java and J2EE application development tools are complex and sophisticated

Here is a short example. Consider the following short XML file (people.xml):

<people>
<person gender="male">Joe</person>
<person gender="female">Judy</person>
</people>

This is the PHP code that accesses and prints the contents of the file (print_people.php):

<?php

$people
= simplexml_load_file("people.xml");
foreach ($people->person as $person) {
print $person . " is " . $person["gender"] . "\n";
}

?>

The resulting output of this code is:

Joe is male
Judy is female

The PHP code simply exposes the contents of the XML file as if they were elements in a standard PHP array. By iterating through the array with a simple loop, the content of the XML file is read and the output is created without any need to further parse the XML file.

There has never been an easier way to access and manipulate XML data. If there is some special XML manipulation that needs to be done in DOM, most of the basic work can be done in SimpleXML, and then the result converted to DOM and additional manipulations run without having to write and reread the XML data to some kind of temporary or permanent storage.

Web Services Support
The term Web services describes a standardized way of integrating applications using the XML, SOAP, WSDL, and UDDI open standards over an Internet protocol backbone. Web services allow different applications from different sources to communicate with each other without time-consuming custom coding, and because all communication is in XML, Web services are not tied to any one operating system or programming language. For example, Java can talk with Perl, and Windows applications can talk with UNIX applications.

PHP 5 features new native support for SOAP and WSDL making it incredibly easy to create and consume Web services within the enterprise or on the Internet. For example, all that is required to access a Web service is to point to a relevant WSDL file describing that service and then simply invoke a function exposed in that Web service interface. Only two lines of code are required!

Here is a specific example of the PHP code required to access a Web service exposed on the Internet to print the current stock quote for Microsoft:

<?php

$client =
new
SoapClient("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");

print($client->getQuote("MSFT"));

?>

All that was required was to create an object by passing in the relevant WSDL, and then access a function in the Web service by invoking a method within the object.

It's similarly easy to publish Web services. The services are implemented as PHP-based classes, and then described in a WSDL file. PHP 5 has built-in capabilities to publish that service, provide the WSDL on request, and execute the functionality and return a result (if needed) when invoked.

Rapid Prototyping and Assembly Using Web Services
The seamless XML and Web services support in PHP 5 enable a developer to quickly prototype and deliver applications that assemble together capabilities exposed via Web services. The developer doesn't need to focus on the details of parsing XML files and piecing together SOAP messages. Rather, the developer can focus on the business needs being addressed by the application. This results in rapid development, early prototyping and feedback, frequent iteration, and a robust resulting application.

PHP Integration with Existing Code and Data
In addition to support for emerging standards like XML and Web services, PHP provides a comprehensive set of interfaces with existing code libraries and databases that may exist within an enterprise. This makes PHP ideally suited to exploit functionality and data in these various environments, and to expose them to other applications or enterprises using Web services. PHP provides integration with C/C++, COM/.NET, Java, Perl, and SQL databases.

C/C++ and COM/.NET
PHP is written in C, and has a powerful extension interface allowing new capabilities to be added to the language using C and C++. It has equally powerful capabilities to allow PHP code to connect with existing libraries written in C/C++, as well as COM and .NET on the Microsoft Windows platform.

Microsoft COM (Component Object Model) defines a common calling convention that enables code written in any language to call and interoperate with code written in any other language. Microsoft .NET is an overall strategy for providing individuals and businesses with a seamlessly interoperable and Web-enabled interface for applications and computing devices based on XML and Web services. It supports over 20 programming languages and allows for interoperability between these languages. Microsoft intends to offer a range of Web-based services and application building blocks via .NET.

COM and .NET access are built in to PHP 5 and are available to any PHP code running on the Microsoft Windows platform. The COM class in PHP allows you to instantiate a COM object, call its methods, and access its properties. The DOTNET class allows you to instantiate a class from a .NET assembly, call its methods, and access its properties. PHP does this via the COM interoperability layer for .NET. In implementation terms, PHP sees .NET objects as though they were COM objects.

Java
Zend Technologies is working with Sun Microsystems on JSR 223, a specification to describe how to write portable Java classes that can be invoked from a page written in any scripting language, with PHP serving as the reference scripting language implementation. Through this specification and reference implementation, it's very straightforward to invoke Java code directly from PHP, enabling existing Java code libraries and application functionality to be incorporated into PHP applications.

About Rick Fleischman
Rick Fleischman is director of product marketing, Zend Technologies, Inc.

YOUR FEEDBACK
Casper Bang wrote: For a company which claims to always have had a RIA platform, applet's were surprisingly sucky and JavaFX is remarkably vapourwareish. I find it ironic you can claim Java as a success in this, when it's Java's scripted sibling language JavaScript who now dominates the web experience here 10 years after.
NN wrote: Yes Java has fail our time and time. SUN has fail in so many ways that unimaginable in terms of making money and consolidating as of the top 3 software maker. 1. BEA made lot of money 2. Adobe Flex base has more demand compare to Java base anything i.e. JavaFx or JSF. Even Flex latest version is somewhat better but created more penetration compare to Java base plug-in or similar. 4. AIR again from Adobe can give Flex to desktop transition with ease. Swing fail in so much and SUN never ever care to address that. Yeah Java Web start if you care more. 5. still more
Richard Monson-Haefel wrote: Jonathan Schwartz is right (mostly). Java has always been a RIA. In fact, I would say that Java pioneered this market. That said, Java didn't succeed as a RIA for a couple of reasons. First was speed - not just speed of the applet plug-ins but also speed in downloading. Broadband was not common in 1995 - 2000 and its hard to be successful with a RIA technology when everyone one is sporting 14.4 - 56k modems. Another big reason Java was not successful as a RIA platform was that the Java plug-ins were very inconsistent across browsers. I believe that Sun has learned that lesson and now provides the plug-ins for nearly all browsers themselves. I suspect that the new plug-ins that support JavaFX will all be built by Sun. Before there was Adobe Flex or Ajax there was Java. There was also Curl which was released as product in 1998. DHTML also had a run at the RIA market but failed for m...
LATEST LINUX STORIES
Microsoft is going to pump up to $100 million more into Novell for additional certificates that it will sell or give to customers to redeem for SUSE Linux support. Novell should get the money on November 1 right before the second anniversary of the widely loathed Microsoft-Novell pact ...
Red Hat CTO Brian Stevens, Citrix CTO Simon Crosby, Egenera CTO Pete Manca, Allen Stewart, Group Manager, Windows Virtualization at Microsoft, and Brian Duckering, Sr. Director of Products and Alliances at Symantec were the top industry executives who joined Jeremy Geelan in the 4th Fl...
IBM introduced a series of new products, services and initiatives that further expand IBM's commitment to Linux and open source by enabling the next generation of Linux. As the company marks ten years of support for Linux, IBM announced a number of cross-company initiatives to driv...
Two of the biggest launches in Rich Internet Application history took place in 2007/2008 when Adobe launched AIR 1.0 in February '08 and Microsoft launched Silverlight (September '07). At the 6th International AJAXWorld RIA Conference & Expo in October SYS-CON Events is delighted to be...
VMware, which seems to be as far from open source as you can get these days, has joined the Linux Foundation, promising to make more contributions to the Linux community. It's cultivating the Linux crowd as adoption of Linux expands as a result of its position as a platform for cloud c...
IBM, Canonical, Novell, Red Hat and the distributions’ hardware partners are ganging up on Microsoft, intending to push a Microsoft-free desktop alternative involving Linux, Lotus Notes and Lotus Symphony. They think they see an auspicious constellation of stars in the sky – like P...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE