How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

totty
How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

thanks
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

Daniel Wagner
Administrator
Hi,

that depends on what you want to achieve. If your goal is to use
qooxdoo's toolchain e.g. for dependency analysis and code optimization,
you could wrap the non-qx code in a qx class and expose the methods you
need. For example, qx.dev.unit.Sinon wraps Sinon.js, while
qx.bom.Template wraps mustache.js.


Regards,
Daniel

On 03/26/2012 01:30 PM, totty wrote:

> How to integrate qooxdoo with another framework that doesn't use the qooxdoo
> class system?
>
> thanks
>
> --
> View this message in context: http://qooxdoo.678.n2.nabble.com/How-to-integrate-qooxdoo-with-another-framework-that-doesn-t-use-the-qooxdoo-class-system-tp7405576p7405576.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

totty
And how about http://paperjs.org in this case, what would be the best practice to do?
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

Tristan Koch
Hi Totty,

from glancing over the docs I would assume you need to wrap a canvas element using the page object provided by paper.js [1, 2]. The canvas element needs to be attached to the DOM. One way to accomplish this in a RIA-style application is to use qx.ui.embed.Canvas [3]. Note that DOM elements are generally only available after the "appear" event of the widget has fired.

Speaking of integrating into paper.js, I don't think it worthwhile to wrap paper.js into qooxdoo classes. Or are you planning to do heavy sub-classing, or write interfaces? Of course you can (and probably should) still use qx.Class for organizing code that relies on paper.js.

Are you using qx.application.Standalone? Depending on your use-case it might be less complex to use qx.application.Inline instead.

What do you want to accomplish on a higher level?

[1] http://paperjs.org/tutorials/getting-started/using-javascript-directly/
[2] http://paperjs.org/reference/global#paper
[3] http://demo.qooxdoo.org/current/apiviewer/#qx.ui.embed.Canvas

Regards
Tristan

Am 26.03.2012 um 18:20 schrieb totty:

> And how about http://paperjs.org in this case, what would be the best
> practice to do?
>
> --
> View this message in context: http://qooxdoo.678.n2.nabble.com/How-to-integrate-qooxdoo-with-another-framework-that-doesn-t-use-the-qooxdoo-class-system-tp7405576p7406496.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

totty
First of all thanks for your detailed answer.

The objective is to make a game, in a 1300x800 screen where UI takes 25% and a canvas/display takes 75% there will be around 50 to 100 objects on the screen, it's a top-down game with little animation initially. I need to interact with the UI from events and data from the canvas and viceversa.

Yes I'm planing to use the qooxdoo class management but about maintaining the paper.js framework I don't know:

If I make changes to the framework then I can have problems when future versions of the frameworks comes out as I have to do the same work for each new version I plan to use. If there is little work, or automatized in some way then it's quite fine to integrate the framework in the qooxdoo class system.
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

Tristan Koch
Hi Totty,

> If I make changes to the framework then I can have problems when future
> versions of the frameworks comes out as I have to do the same work for each
> new version I plan to use. If there is little work, or automatized in some
> way then it's quite fine to integrate the framework in the qooxdoo class
> system.

Wrapping the paper.js objects into qooxdoo classes is one thing, but you will also need to translate paper.js events to qooxdoo events. I suggest to leave paper.js as it is and introduce some kind of a mediator that connects both worlds. You can fire qooxdoo events in the UI, and have the mediator respond to them, delegating to paper.js.

Regards
Tristan
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

Lance Boyle
In reply to this post by totty
Were you ever able to get anything working  between paper and qooxdoo without the use of a complex mediator?
Thank you
- Lance
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate qooxdoo with another framework that doesn't use the qooxdoo class system?

totty
This action is in stand-by as in the last month I've done some unrelated work and I've been very busy. I will begin again in a week, but I'm rethinking the whole project. Do I really need qooxdoo for a game?
The parts that I would need were the class system (inheritance, mixin...), models and stores. But as I don't know how to handle very well the stores, and I don't really like this way to work, but I accept it, I'm rethinking about the using or not of qooxdoo in our project.