Hi Leandro,

> In the classes namespaces, {project_name} is the root namespace. I've
> never seen ay project with another directory in source/class (in fact
> I've never seen much qooxdoo projects :-)). Is this directory unless?

In fact, for the time being the generator prohibits multiple
subdirectories under source/class. This decision was made quite some
while ago, when the project decided to put "convention over
configuration" (as the RoR folks say). But I wouldn't call it useless.

Many parts of the generator in particular, and qooxdoo in general treat
elements of an application under their "resource id" (let's include
class id's into this for the course of this discussion). This resource
id starts with the name space (which might be complex!), together with
the resource path beneath that. This resource id has to be unique
throughout the whole application, also when you mix in other contribs
and libraries!

Therefore, 'foo/bar/ClassA.js' is a different resource than
'baz/bar/ClassA.js'. You see you cannot just leave out the root element,
otherwise the uniqueness would be lost.

> 
> On the other hand, there are projects like qxtransformer which transform
> a non-qooxdoo file (xml, in qxtransformer's case) in a qooxdoo.js file.
> 
> For example, if I have a file named project_name/admin/MainWindow.xml,
> qxtransformer will transform it in project_name/admin/MainWindow.js. But
> this file is unless to the programmer, because only the MainWindow.xml
> is important. MainWindow.js is a temporary file, a junk.

Well, maybe to the qxtransformer developer, but certainly not to qooxdoo
:). I'm not that familiar with qxtransformer, but if qxtransformer
shields you from the underlying qooxdoo file structure, why then would
you care?

> 
> My idea is create multiple-roots to the application. Why? In
> qxtransformer case, when you "transform" the file
> source/class/project_name/admin/MainWindow.xml, it will be created a
> file source/class/{qxtransformer_generated}/admin/MainWindow.js.
> 
> In the config.json you put a new var with the roots:
> PROJECT_ROOT: ["project_name","qxtransformer_generated"]

What would that bring, if project_name/* only contains .xml files?! Or
am I missing a point?

> 
> If there are two files named
> source/class/{project_name}/admin/MainWindow.js and
> source/class/{qxtransformer_generated}/admin/MainWindow.js, qooxdoo will
> choice the first to represent the class "project_name.admin.MainWindow",
> because "project_name" has a higher priority over "qxtransformer_generated".

Now I'm lost. Didn't you say that {project_name}/admin would only
contain MainWindow.xml, and MainWindow.js would be generated into
{qxtransformer_generated}/admin?! Why is there suddenly a MainWindow.js
in both paths?!

> 
> I don't know if the idea is good, but it can allow new frameworks over
> qooxdoo. For example, If a want to create a new declarative language
> which creates qooxdoo code (based on json, for example), it will be easier.

Mh, I don't know. So you have declarative files on the one side, and
generated .js files on the other. As you are not interested in the .js
files (as they are "junk" as you say, and can be re-generated at any
time), why make such an effort of having both input and output files
under the same source/class root? The input files could be somewhere
else on the file system, entirely detached from the qooxdoo project
structure. Or the qooxdoo structure a separate sub-tree of the framework
project. I would consider that a feature of any framework on top of qooxdoo.

And if a framework would want to be "close" to the qooxdoo files it
generates, you could just as well have a

    source/xml

or similar root for the qxtransformer files, which will not collide with
anything. This makes much more sense to me then putting non-class files
under "source/class".

Cheers,
T.


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to