Hi all!
This is maybe completely off-topic, I just want to share some ideas from
my PHP kitchen.
I'm using qooxdoo together with CakePHP and xajax already - I'm quite
well familiar with those projects, so incorporating of qooxdoo was
matter of few hours for me.
My actual implementation is almost prefect for my needs, basically it
allows from server side:
- invoke any JavaScript code in client browser, so almost all Qx objects
are created from PHP with using of CakePHP cached views (I'm reusing
existed Qx objects, so for example no QxWindow object is created more
then once)
- call createDispatchEvent() or createDispatchDataEvent() on any live Qx
object - it's hashCode and event name is sended to server and from PHP
is sended this javascript:
"new CqxResponse(".$hashCode.",
'".$eventName."').processEvent('".$result."');"
where variable $result is optional - if it is null, then
createDispatchEvent() is invoked by CqxResponse_object.processEvent()
method. Data in result are JSON-like formatted, so I can pass to event
listeners any data I want to.
- call set() on any live QxObject - it's hashCode is sended to server
and from PHP is sended this javascript:
"new CqxResponse(".$hashCode.").processSet('".$result."'));"
where $result if required and it is JSON-like formatted JS object.
If target object with hashCode doesn't exist in time response is
processed, it simply does nothing (except for debug message).
This my solution off course allows more then those simple actions, for
example:
- my CqxRequest object can create decendent of Qxtarget with (optional)
limited time for existency of this object and (optional) limited time in
during response has to arrive (by QxTimer), set it's some object
property, create listener for server response and send hashCode and
event name of new listener to server, so my PHP code could aim response
actions on it - I'm using it for (shall we say) pseudo-synchronous mode
for server-side validators, so I can simply define 'onChangeX' listener
on this decendent of QxTarget and I don't have to handle every response
in object which has some data with server-side validation.
For example: if I have listener for 'input' event on QxTextField which
is validated on server-side, there is
a) created new CqxRequest with decendent of QxTarget - if it doesn't
exist yet, off course
b) checked value of QxTarget property
It is off course more complicated then I am describing here, it allows
lock-up my CqxForm (parent for fieldsets or inputs, which could manage
visibility/enable of submit objects etc), prepare data of inputs for
sending through xajax and more and more.
I hope this post is clear enough, I'm speak English like Tarzan. BTW:
this 'Cqx' in CqxRequest and CqxResponse means CakeQooxdooXajax :)
For those who are talking about XML/XUL in this topic: I'm sorry. I hope
those ideas could be usable for anyone - I'm playing with qooxdoo just
for few days, but Qooxdoo + CakePHP + Xajax looks like very promisingly
marriage to me.
Have a nice day!
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel