XUL Support?

Hi folks :)

Some back behind hours I was watching this project: http://sitefusion.org/

¡Looks amazing!. But I like Yii, I know more or less how to use Yii and I love the CHtml and Zii widgets. So, I was thinking if can be posible make some extension widgets, like Zii, but for work on a thin XUL client, just like SiteFusion.

By this way we will can make more amaizing apps without need of a browser and using just PHP.

What did you think?

Looks great. As is, it should be possible to facilitate Yii from within a sitefusion project. The other way around… I don’t know. I believe somebody would have to write a XUL rendering engine for Yii. Should be very well possible since we’ve already got a rendering engine for Smarty :)

After taking a closer look at it: It’s considerably more work than I initially thought. It won’t be done with a CXULViewRenderer. We’d need a CXULForm and CActiveXULForm class as well. Probably a CXUL helper. It might be benefitial to implement a XSL/T renderer first, so we can get generic valid XML output (I believe that’s been requested somewhere already).

I still believe this is possible and I really like the idea. Perhaps it might be possible to bypass SiteFusion entirely and create a client application based on Mozilla’s XULrunner.

I’ll look closer on it and might even start some work on this in march. I’d say I’ll need a month to come up with useful results. Most widgets will require patching for this as they are producing hardcoded HTML-output.

Any comments by the devs? I think this might be good for my thesis :lol:

@Sourcerer Im following you :) (Or I try, sorry but I have a very Bad english :P)

After a light view to SiteFusion I has make an Idea, but I need see with more time and dedication the SiteFusion code for understand that.

Anyway, I has thinking must be possible take the SiteFusion code on charge of build de Xul and make a Wrapper like you say, some CXUlViewRenderer and other classes around if is needed.

Will be nice if after we take the SiteFusion thin client and, then, offer the option of build Web Application just coding with PHP and get a GUI with native look and feel.

Carry on!!

Oooookay, short update. I’m still evaluating stuff here. Most problems arise from the fact that Yii is really a webframework that focuses around the HTTP request cycle while XUL is intended to describe an entire application. This is turning this endeavour into quite a challenge. But: It’s far from impossible. My initial idea of writing a new renderer for this hasn’t turned out to be such a great idea. it’ll work but things might be unnecessarily complex that way. Instead, it might be possible to take advantage of the existing SOAP/WSDL capabilities of Yii.

My current idea is to create a bootstrap .jar containing all the client goodies (XUL, XBL, JavaScript) in one package. This could be created by a console command. A small shellscript/batchfile on the clientside could then fetch this .jar from the server and let XULrunner run against it. The rest would be left to the SOAP stack.

A word on interactivity/widgets: I found a jQuery fork that is capable to interoperate with XUL. This is opening some interesting options, since already existing widgets can provide output that could be more or less tossed right into XUL. I wouldn’t rely too much on this, though.

Theming: Seems the most elegant way of achieving this is using pure CSS. From all other options it also seems to be the most hassle-free one.

I’ll keep you updated. After all, it’s still a great idea B)

(╯°□°)╯︵ ┻━┻

After some additional research, sample implementation and a lot of thought, I’ll quit this for now. I always end up re-implementing the entire CRUD-code for SOAP again. This is an awful lot of code-duplication, which will always tend to result into spaghetti-code. It is still possible to do this with Yii. But there is no clean way. I see no solution that integrates nicely and simply “feels nice.”

In the meantime: Get SiteFusion and pull in yii as a library. I’ll see if things will go better in Yii 2.

Just found this: http://code.google.com/p/yii-xul-extension/