好久没关注新闻组了,最近新东西特多,又一个使用PHP开发WINDOWS应用程序的环境出来了,而且是100%的哦,牛人真多。
What is WinBinder?
WinBinder is a new development platform that uses PHP to build Windows programs in a straightforward and simple way. Even short scripts with a few dozen lines can build a useful program, thanks to the power and flexibility of PHP. WinBinder is easy to use and produces very fast and rewarding results with minimum effort.
How does it work?
The WinBinder technology benefits from the new CLI SAPI (Command Line Interface / Server Application Programming Interface) that was officially introduced in PHP 4.3.0 plus a custom DLL (a Windows library) as the key elements to build a flexible and powerful Windows development platform. A callback mechanism is created so the application script can easily process the events generated by the Windows controls. A simple RC parser allows Windows resource files to be used directly and avoids the need for a separate compilation step. It is also easy to include any existing PHP code library and even use preexistent template-based PHP code to create Windows applications that behave as their web counterparts. This arrangement is compliant to the PHP guidelines.
Simple examples
Here is the minimum code required for a Windows application:
<?php
// Code sample: A Windows application with only three PHP lines
include("../../php/inc/winbinder.php"); // Include WinBinder library
wb_create_window(NULL, PopupWindow, "Hello world!", 480, 320); // Create application window
wb_main_loop(); // Enter message loop
?>
The code above will produce a normal application window with a system menu, a minimize button and a close button like the one below.