code ethics on js-java integration

2003-12-23 Thread Marc Portier
Yo people,

after the recent introduction of the WoodyPipelineConfig object, I am 
tempted to change the line 125 in woody2.js

see: 
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/woody2.js?rev=1.3view=auto
for:bizData[woody-form] = this.form;

towards:

bizData[Packages.org.apache.cocoon.woody.transformation.WoodyPipelineConfig.WOODY_FORM] 
= this.form;

this is a natural reflex from pure Java land, but I'm left to doubth now 
it this kind of more tight integration is desirable into the js-area?

conceptually I only see benefits in doing so ATM, but maybe there are 
some other considerations that I'm missing? (e.g. performance penalty? 
lack of cross language refactoring tools? ...)

regards,
-marc=
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
Read my weblog athttp://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]  [EMAIL PROTECTED]


Re: code ethics on js-java integration

2003-12-23 Thread Sylvain Wallez
Marc Portier wrote:

Yo people,

after the recent introduction of the WoodyPipelineConfig object, I am 
tempted to change the line 125 in woody2.js

see: 
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/woody2.js?rev=1.3view=auto 

for:bizData[woody-form] = this.form;

towards:

bizData[Packages.org.apache.cocoon.woody.transformation.WoodyPipelineConfig.WOODY_FORM] 
= this.form;

this is a natural reflex from pure Java land, but I'm left to doubth 
now it this kind of more tight integration is desirable into the js-area?


It *is* desirable, as the JS and Java code will use this string to 
communicate. So it's better to have it defined in a single location.

So +1!

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Re: code ethics on js-java integration

2003-12-23 Thread Marc Portier


Sylvain Wallez wrote:

Marc Portier wrote:

Yo people,

after the recent introduction of the WoodyPipelineConfig object, I am 
tempted to change the line 125 in woody2.js

see: 
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/woody2.js?rev=1.3view=auto 

for:bizData[woody-form] = this.form;

towards:

bizData[Packages.org.apache.cocoon.woody.transformation.WoodyPipelineConfig.WOODY_FORM] 
= this.form;

this is a natural reflex from pure Java land, but I'm left to doubth 
now it this kind of more tight integration is desirable into the js-area?


It *is* desirable, as the JS and Java code will use this string to 
communicate. So it's better to have it defined in a single location.

So +1!

thx for confirming...
change underway...
-marc=
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
Read my weblog athttp://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]  [EMAIL PROTECTED]


Re: code ethics on js-java integration

2003-12-23 Thread Vadim Gritsenko
Marc Portier wrote:

Sylvain Wallez wrote:

Marc Portier wrote:

Yo people,

after the recent introduction of the WoodyPipelineConfig object, I 
am tempted to change the line 125 in woody2.js

see: 
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/woody2.js?rev=1.3view=auto 

for:bizData[woody-form] = this.form;

towards:

bizData[Packages.org.apache.cocoon.woody.transformation.WoodyPipelineConfig.WOODY_FORM] 
= this.form;

this is a natural reflex from pure Java land, but I'm left to doubth 
now it this kind of more tight integration is desirable into the 
js-area?




It *is* desirable, as the JS and Java code will use this string to 
communicate. So it's better to have it defined in a single location.

So +1!

thx for confirming...
change underway...


PS Many tools (read: IDEA) will search in text files for your Java 
identifiers when renaming/deleting.

Vadim




Re: code ethics on js-java integration

2003-12-23 Thread Mats Norén
snip/
PS Many tools (read: IDEA) will search in text files for your Java 
identifiers when renaming/deleting.
A little offtopic but wouldn´t it be possible to use the OpenAPI in IDEA 
to create a flowscript editor with command completion, class lookups etc 
 etc. Is anyone else interested in pursuing this idea?
I may have some spare cycles between christmas and new years... :)

/Mats

ps.
Maybe there already exists such an editor, if so, then ignore this post ;)
ds.