RE: [PHP] wxWidget/.NET like framework for PHP ?
- From: edward@xxxxxxxxxx ("Edward Kay")
- Date: Thu, 15 Mar 2007 09:56:24 -0000
Hello,
I am currently thinking about a php framework dedicated to web
applications
with rich client interfaces using AJAX.
The goal of this framework is to provide the possibility to write
rich web
applications using a syntax similar to wxWidgets or .NET.
An example is better than a long story :
<?
require_once('widget.php');
class myForm extends Form {
public function __construct(){
$this->Title = 'Main Window';
$button = new Button();
$button->Title = 'A test Button';
$button->OnClick = 'buttonOnClick';
$this->AddControl($button);
}
public function buttonOnClick(){
MessageBox::Show('Hello, World !'); }
}
Application::$Title = 'Widget Demo';
Application::Run(new myForm());
?>
With this example, you can have an idea of how this would work.
In this case, Application::Run() creates a context on the client (IE,
Firefox...) where AJAX is easily useable. It also renders the interface,
using xhtml/css code specific to the navigator used by the client
(Specific
code for IE incompatibilities, for example).
Button->OnClick is a public member of a class Button. It is similar to a
delegate (or function pointer). Its job is to write code into the onClick
javascript event of the button.
When the button is clicked, an AJAX call is performed on the server,
requesting the execution of the handled code, in this case :
myForm->buttonOnClick().
MessageBox::Show() is defined in the php framework and calls a
javascript on
the client that draws a messagebox containing a message.
As you can see, the idea is pretty simple : imitating wxWidgets/.NET to
delegate xhtml/css and AJAX to the framework. So the programmer
can totally
focus on his work.
I was wondering if such a framework already existed and also was
wondering
about the real usefulness of something like this.
Hi David,
Take a look at Qcodo (http://www.qcodo.com) as this does exactly what you're
looking for.
Edward
.
- Follow-Ups:
- Re: [PHP] wxWidget/.NET like framework for PHP ?
- From: "David CHATEL"
- Re: [PHP] wxWidget/.NET like framework for PHP ?
- References:
- wxWidget/.NET like framework for PHP ?
- From: "David CHATEL"
- wxWidget/.NET like framework for PHP ?
- Prev by Date: Re: [PHP] 北京超品锐智技术有限责任公司招聘启示 [AD]
- Next by Date: ftruncate
- Previous by thread: wxWidget/.NET like framework for PHP ?
- Next by thread: Re: [PHP] wxWidget/.NET like framework for PHP ?
- Index(es):