> Reinhard Poetz wrote:
Andre Juffer wrote:
Hi all,

Would it make more sense to have a separate block ('classes-resources-block') for all Java classes
instead of distributing them over the various blocks?

yes but I would want to find a better name that reflects the classes that it contains. Too general names usually mean that the architecture needs some refinement.

Apart from that, having a block doesn't necessarily require a Cocoon web application with configured servlet services being part of it. It's also a valid use case to have blocks that only contain Java resources and Spring beans (e.g. for domain specific logic).


If this block would contain only classes and relevant resources pertinent to these classes that otherwise have absolutely no knowledge at all of cocoon, it should not even be required to create a cocoon block. Such a set of classes could be contained in a standard maven project, which can be created like

mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

(see http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)

One would simply use the standard install goal to create a jar upon which the webapp would depend. The only problem I can see at this point is an application-context.xml that is possibly contained in that jar. The cocoon-based webapp only needs to be made aware of that file. But this could possible handled by an import statement in the cocoon application.context.xml (see for instance http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-instantiation)

Andre.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to