cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Ezkovich <g...@hard-bop.com>
Subject Re: Blocks, Flow and Dependencies [was RE: Splitting xconf files step 2: the sitemap]
Date Mon, 10 Jan 2005 15:28:50 GMT
I've been thinking about why one would want to isolate a blocks 
flowscripts from other blocks. So far I see two reasons:
	1.) some flowscript functions are simply helper functions and should 
not be directly callled.
	2.) a block may use its own classloader and therefore possibly use 
different versions of a class then the calling block.

If you have other reasons please let me know.

I think the simplest way to handle 1, is to put "private" functions in 
different files and use the blocks configuration file to distinguish 
between public and private flowscript files.

2 is obviously a more difficult problem. But this is a problem that is 
introduced by the dependancy between two blocks whether flow is 
involved or not. The only way around this is to have the two blocks use 
the same class versions.

The fact that a block provides a service doesn't mean that it does so 
only through its sitemap. The service may be provided in many ways. 
Such as avalon components, sitemap components, VirtualComponents and 
just POJOs. Blocks are much more about modularization, configuration 
and deployment then they are about providing isolated services. Once 
deployed the blocks are part of a web application. If you want to 
isolate each service then I suggest you look at web services in general 
and SOAP in particular. You can look to Jini and RMI as well. The 
problem of independent discoverable services has been solved in several 
ways. I don't think its necessary to reinvent the wheel to achieve the 
results you desire.

Glen Ezkovich
HardBop Consulting
glen at hard-bop.com
http://www.hard-bop.com



A Proverb for Paranoids:
"If they can get you asking the wrong questions, they don't have to 
worry about answers."
- Thomas Pynchon Gravity's Rainbow


Mime
View raw message