On 25.11.2007 10:32 Uhr, Grzegorz Kossakowski wrote:

I added an issue with a new input module which returns the full file
path location of the base dir/resource of a block.

https://issues.apache.org/jira/browse/COCOON-2145

Can I apply the patch?
Sorry but I've no idea - I'm not clear yet on blockcontext thing myself!
:) Reinhardt? Grzegorz? Can new expression stuff be of help here?

I'd like to see better name though... 'blockpath', may be? Or
'blockcontext'.

I'm quite reluctant to accept this patch because I believe that one should 
never rely on block's
directory location

Why? It might be necessary when communicating with other systems. There is no difference than with WAR and servlet context directory.

However, I don't have time to really evaluate Thorsten's use-case now.

Isn't that what we have a list for instead of single people :-) If he has not done so far Thorsten can provide a short summary of his use case. Otherwise please point out the mail in the archives.

I would say that I'm ok to add this input
module but with fat warning that it should be used only if there is no other 
way and we are *not*
going to support compatibility of blockpath module in future versions.

I consider this bad idea. This creates just uncertainty for the user. Either add and support it - or not. We still could point to that issue and say: If you really need it get it from there.

My concerns go into a different direction. It might be necessary to know about the actual file system path as mentioned above. But it should not be necessary for the code running in a block to be aware that it is running in a block. The block is a way of encapsulating functionality, a web app is another one. This should be an abstraction and not known "inside". Why don't we reuse context:? This would make the code independent from the way its packaged.

Joerg

Reply via email to