Archive for April, 2007
The evolution of Delphi for PHP
By Justin Silverton
Recently, CodeGear announced the latest addition to their product line called Delphi for PHP. It is a great new tool that allows developers to easily create php applications with a drag-and-drop GUI interface. What many people do not know is that a few of the components are actually based on open source projects. I feel that this is a a good thing, because many of these projects have been in use for awhile, thoroughly bug tested, and full of many great features.
Here is a list of the open source projects:
1) Qooxdoo framework

Qooxdoo is the basis for many of the VCL controls. And not all of the properties of the qooxdoo controls that are used are available to the IDE Object Inspector. Learning the API can help you discover the other properties that you can set using JavaScript.
information about the API can be found here
2) VCL4PHP
This project is a class library of PHP components which replicate VCL for Win32. VCL for PHP is PHP framework to develop web applications, it’s OpenSource and it’s licensed using LGPL. It is the basis for the majority of the libraries within Delphi for PHP.
Features
- Fully OO applications
- Complete MVC model
- Properties, Methods and Events>
- I18N functionality
- Template Engines
- Ajax abstraction
- Database abstraction and data-aware components
- Input filtering using objects
- Webservices integration
Project available here
3) walterzorn vector graphics library
This JavaScript VectorGraphics library provides graphics capabilities for JavaScript: functions to draw circles, ellipses (ovals), oblique lines, polylines and polygons (for instance triangles, rectangles) dynamically into a webpage. Usage of this Vector Graphics library should be easy even if you don’t have JavaScript experience. Another goal during development of this JavaScript Draw Shapes Vector Graphics Library was to achieve optimized performance and cleanly arranged pixel stair-step patterns (pixel-optimization).
This library is available for download here
a nice animation example here
4) xajax - ajax library
The xajax PHP object generates JavaScript wrapper functions for the PHP functions you want to be able to call asynchronously from your application. When called, these wrapper functions use JavaScript’s XMLHttpRequest object to asynchronously communicate with the xajax object on the server which calls the corresponding PHP functions. Upon completion, an xajax XML response is returned from the PHP functions, which xajax passes back to the application. The XML response contains instructions and data that are parsed by xajax’s JavaScript message pump and used to update the content of your application.
Features
- xajax’s unique XML response / javascript message-pump system does the work for you, automatically handling the data returned from your functions and updating your content or state according to the instructions you return from your PHP functions. Because xajax does the work, you don’t have to write javascript callback handler functions.
- xajax is object oriented to maintain tighter relationships between the code and data, and to keep the xajax code separate from other code. Because it is object oriented, you can add your own custom functionality to xajax by extending the xajaxResponse class and using the addScript() method.
- xajax works in Firefox, Mozilla, probably other Mozilla based browsers, Internet Explorer, and Safari.
- In addition to updating element values and innerHTML, xajax can be used to update styles, css classes, checkbox and radio button selection, or nearly any other element attribute.
- xajax supports passing single and multidimensional arrays and associative arrays from javascript to PHP as parameters to your xajax functions. Additionally, if you pass a javascript object into an xajax function, the PHP function will receive an associative array representing the properties of the object.
- xajax provides easy asynchronous Form processing. By using the xajax.getFormValues() javascript method, you can easily submit an array representing the values in a form as a parameter to a xajax asynchronous function:
xajax_processForm(xajax.getFormValues(’formId’);
. It even works with complex input names like “checkbox[][]” and “name[first]” to produce multidimensional and associative arrays, just as if you had submitted the form and used the PHP $_GET array
Non-open source software worth mentioning
Qstudio

CodeGear partnered with qadram software to jointly develop Delphi for PHP. qadram software, the development team behind VCL for PHP, had been working on a pre-beta project called Qstudio that became the foundation of Delphi for PHP.Development of Delphi for PHP is being done by CodeGear and qadram software at CodeGear headquarters in Scotts Valley, CA.
Interested in Delphi for PHP? a free, 14-day trial (as opposed to the 1-day trial when it was first released) can be found here
No commentsConverting PHP scripts to dlls
By Justin Silverton
I came across this great open source project that allows you to convert your php scripts to a fast/cgi executable that can be executed by any web server that supports it (including apache and IIS).
From the site:
“Roadsend Compiler is an open source, native compiler for the PHP language. It compiles PHP source code to stand alone, native binaries which do not require an interpreter. Roadsend Compiler can build online web applications with Fast/CGI, offline web applications with an embedded web server (MicroServer), desktop GUI applications with PHP-GTK, and console applications. It is known to build on Linux, Windows (using mingw), and FreeBSD.”
Benefits of using the roadsend compiler
- Faster execution time, because your php script is now a native binary and does not have to be interpreted each time it is accessed.
- Better than a solution such as zend encoder or ion cube because it does not require the server to have any extra extensions (besides fast/cgi support installed). It also provides a good obfuscation solution.
- The ability to create stand-alone web applications. These applications include a built-in webserver that allows the execution of php scripts as if they were a local application.
Issues to consider
- Because this is an executable, it needs to be re-compiled for any operating system that you would like to support (freebsd, linux, windows, etc.)
more information can be found at the main roadsend website here
5 commentsMicrosoft’s PHP initiative
by Justin Silverton

Microsoft has recently released the second technical preview release of FastCGI for IIS, a new component for Microsoft’s Web server platform. This release is available immediately for download to Windows Vista, IIS including IIS 6.0 in Windows 2003 Server and IIS 5.1 in Windows XP.
The FastCGI component is part of the collaboration between Microsoft and Zend to improve performance and stability of PHP on the Windows platform. This effort aims to help PHP developers achieve improved performance on the Windows platform by leveraging the new IIS FastCGI feature together with Zend’s on-going work to improve the PHP engine on Windows.
Installing
This is just a technical release, so it is not recommended that you install this on a production server.
To install this on your server, go through the following steps:
- Download the beta here
- Extract the downloaded files
- within a command prompt, execute the following command in the same directory as the extracted files:
fgisetup.exe /install /add c:\php\php.exe php (This should point to your php installation)
New features of IIS 7
- The IIS7 output cache is a new feature in IIS7 which will make it possible to cache script responses in memory (including dynamic content). It is much smarter than the current caching system IIS offers because it can be configured to cache different copies of responses for the same page based on a query string value
- another interesting feature is kernel mode driver caching, allowing for very fast and improved performance. It will work with any content type, and can significantly speed up performance for applications where the underlying data doesn’t change.
security update for wordpress released
by Justin Silverton
Wordpress 2.1.3 and Wordpress 2.0.10 have been released.
About this release:
“These releases include fixes for several publicly known minor XSS issues, one major XML-RPC issue, and a proactive full sweep of the WordPress codebase to protect against future problems.”
also,
“As an update to the systems issue we had last month, we have taken dozens of additional precautions with the servers and systems that run WordPress.org and they appear to be working well, despite hundreds of hack attempts after we publicly disclosed there had been a problem. We are also now aggressively monitoring all downloads for any changes or modifications, and we are confident the same type of problem won’t happen again”
Downloads
2.1.3 can be found Here
2.0.10 can be found Here





