cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@dff.st>
Subject RE: [C2] Proposal for cocoon.xconf--Hiding Complexity
Date Sun, 14 Jan 2001 14:25:25 GMT

  -----Original Message-----
  From: Berin Loritsch [mailto:bloritsch@apache.org]
  Sent: Sunday, January 14, 2001 3:16 PM
  To: cocoon-dev@xml.apache.org
  Subject: [C2] Proposal for cocoon.xconf--Hiding Complexity


  I would like to make a change to the way cocoon.xconf defines the
components (but maintain
  backwards compatibility).  Right now, we have two methods for specifying
Components in the
  ComponentManager heirarchy:

  <component role="really.long.role.name.for.avalon.Patterns"
class="fully.qualified.class.name">
    <component-instance name="AnyName" class="fully.qualified.class.name"/>
  </component>

  This is really a mouthful, and has some complexity involved for the
administrator's eyes.
  I would like to add something to org.apache.cocoon.Roles to make it easier
for everyone
  involved--yet not break the Avalon pattern regarding how the Roles are
defined.

  Basically, I would use a read-only HashMap to convert a shorthand Role
name to convert
  it to the internal Role.  The components would be defined in this manner:

  <component role="shorthand-name" class="fully.qualified.class.name">
    <component-instance name="AnyName" class="fully.qualified.class.name"/>
  </component>

  This could be shortened even more in this manner:

  <shorthand-name class="fully.qualified.class.name">
    <component-instance name="AnyName" class="fully.qualified.class.name"/>
  </shorthand-name>

  The Cocoon ComponentManager can easily make the translations with a couple
of
  extra lines used to lookup the real Role based on the shorthand name.
Please note,
  that we still have the old method of specifying components available to
use.
  We have a default CocoonComponentSelector, but by creating more specific
  Selectors, we can even make the <component-instance> a shorthand:

  For DataSourceComponents, you have only one of two Components to choose
  from: JdbcDataSource and J2eeDataSource.  If the ComponentSelector knew
this,
  it could offer the following syntax:

  <datasources class="fully.qualified.class.name">
    <jdbc-datasource name="AnyName"/>
    <j2ee-datasource name="AnyOtherName"/>
  </datasources>

Mime
View raw message