Jean-Baptiste BRIAUD -- Novlog wrote:
> Hi,
>
> I have certain classes that I want to reuse across various application.
> how would you advice me to package this classes using the python build ?
>
> I had a look at the following URL, but this cool feature has nothing  
> to do with packaging reusable classes.
> http://qooxdoo.org/documentation/0.8/parts_overview
>   

Indeed.

> I also try to introduce some namespaces (like Java package concept) to  
> sort out my classes.
> I don't know where to put all that in term of root and obviously,  
> class folder is not correct since I got that error on build :
> !!! Multi namespaces per library are not supported!
>   

Yep.

> The top root namespace according to 
> http://qooxdoo.org/documentation/0.8/application_structure
> is the application name. OK, this could handle some specific classes  
> like myapp.MyWindow1, ...
> Can I have novlog.myapp.MyWindow1 instead (without having the  
> application name to be novlog of course) ?
> Also, I plan to put all the reusable classes in  
> novlog.fwk.MyAbstractSomething, ...
> Some classes from novlog.myapp.... will inherit from classes in  
> novlog.fwk for example, so a dependency is needed.
> Where can I put this classes ?
>   

You should create separate qooxdoo applications for them. Whenever you 
have a set of classes that go together, and will be used by multiple 
applications, put them in their own application (you might want to think 
of such an application as a "library"; for qooxdoo this doesn't make a 
difference).

In the consuming application, you then just add their entries to the 
"libraries/library" job setting and just use them in your code. This is 
exactly the same way you are using the qooxdoo SDK, or a contrib.

See also this link (which I already recommended to you yesterday):
http://qooxdoo.org/documentation/0.8/generator_config_articles#library_key_and_manifest_files

> I would prefer to embed them into the application so there will not be  
> version issue 
>   

This is not possible. You either want separate name spaces, or 
everything in one place. But I don't see any issue with versions, as you 
can always track the versions of the app and all related libraries (e.g. 
in a common repository). They just have a different path.

> My only problem is how to tell generate.py via config.json to embed  
> all classes under novlog.fwk.* or all classes under <rthis path>
>   

As I said before, it's by adding to "libraries/library" and just using 
the classes in your code.

T.

>   

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to