Skip to main content

Posts

Showing posts from November 23, 2008

Using PHP 4's DOM XML functions to create XML files from SQL data

Intended Audience This tutorial is intended for developers who wish to extract data from a database and insert it into XML files so that it can be processed in some way, usually by transforming it into HTML using an XSL file. This method completely splits the presentation layer (i.e. the generation of HTML documents) from the business layer (the application of business rules using a language such as PHP) so that any one of these layers can be modified without affecting the other. In the samples below the code is generic in that no column names are ever hard coded. Data is retrieved from the database as an associative array (a series of 'name=value' pairs), and every element of the array is extracted and transferred to the XML file. The contents of the associative array are therefore governed entirely by the SQL 'select' statement. In the samples below I will show how to deal with data from a single table, and then data from two tables with a one-to-many relation...

Quercus for PHP

Quercus is Caucho Technology's 100% Java implementation of PHP 5 released under the Open Source GPL license. Quercus comes with many PHP modules and extensions like PDF, PDO, MySQL, and JSON. Quercus allows for tight integration of Java services with PHP scripts, so using PHP with JMS or Grails is a quick and painless endeavor. With Quercus, PHP applications automatically take advantage of Java application server features just as connection pooling and clustered sessions. Quercus implements PHP 5 and a growing list of PHP extensions including APC, iconv, GD, gettext, JSON, MySQL, Oracle, PDF, and Postgres. Many popular PHP application will run as well as, if not better, than the standard PHP interpreter straight out of the box. The growing list of PHP software certified running on Quercus includes DokuWiki, Drupal, Gallery2, Joomla, Mambo, Mantis, MediaWiki, Phorum, phpBB, phpMyAdmin, PHP-Nuke, Wordpress and XOOPS. Quercus presents a new mixed Java/PHP approach to web ...

Private cloud networks are the future of corporate IT

The future of corporate IT is in private clouds, flexible computing networks modeled after public providers such as Google and Amazon yet built and managed internally for each business's users, the analyst firm Gartner says. Cloud computing hype centers largely around the outsourcing of IT needs to cloud services available over the Internet. While this trend is expected to accelerate, Gartner predicts it will also become standard for large companies to build their own highly automated private cloud networks in which all resources can be managed from a single point and assigned to applications or services as needed. "Our belief is the future of internal IT is very much a private cloud," says Gartner analyst Thomas Bittman."Our clients want to know 'what is Google's secret? What is Microsoft's secret ?' There is huge interest in being able to get learnings from the cloud." Bittman discussed Gartner's predictions in an interview with Network ...