Generating XUL with PHP

Share this article

Couple of interesting PHP / XUL projects I ran into recently, experimenting with XUL generation from PHP.

First there’s a PEAR package going through the process of approval (here): PEAR::XML_XUL. This provides a DOM-like PHP API for generating XUL. Not sure how much mileage there is in that approach through; will it add much value over simply generating the XUL using strings (or templating), as is common with HTML.

Fascinating is HV WDDX Metadata, over on phpclasses (you’ll need your own account to view the code). This seems like a more promising approach. If I’ve understood it correctly, uses WDDX (a widely XML format for serializing data) to define the “widgets” which appear in an XUL form, as well as the JavaScript used to validate them on the client side. Generation is being done with XSLT in the provided example. In other words you’d just need to modify the original WDDX document to add further fields / validation to an XUL form.

Nice to see XUL being explored by PHP developers. Any more projects out there?

Other XUL news is XULPlanet now has a PHP-manual-like comment system for some of the online references and tutorials.

Harry FuecksHarry Fuecks
View Author

Harry Fuecks is the Engineering Project Lead at Tamedia and formerly the Head of Engineering at Squirro. He is a data-driven facilitator, leader, coach and specializes in line management, hiring software engineers, analytics, mobile, and marketing. Harry also enjoys writing and you can read his articles on SitePoint and Medium.

Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week