Hi Yuri,

> I also have a love and hate relationship with XML 
> configuration files. The 
> key, IMO, is to understand what configurations are really going to be 
> performed by the operations people and externalize only that into XML 
> (or in some cases a properties file). 

I'm on the exact same line:

1) Applications -> developed by Java coders -> no need for XML, even for
descriptors (name, required connectors, etc.)

2) Containers -> applications deployed to them by:
 - Java coders, for example in embedded cases -> no need for XML here (pure
Java, maybe fluent builders)
 - Administrators -> need for XML here (similar to Apache HTTP server
configuration)

> I have seen many examples of people (I have done it in the 
> past too) moving 
> to XML configuration files for things that are really part of 
> the app design 
>  and would only be changed by the programmer in a new release 
> cycle. In some 
>  extreme cases it gets to a point where people are almost 
> pseudo coding in XML 
>  loosing all the static typing that comes naturally with Java 
> and introducing 
>  additional layers of complexity. 

Agreed, we don't want to code in XML :-)

> However, more to the point, I will second Sean in reserving 
> my judgement 
> until I see the proposed XML based configuration. 

Here is a sample Container XML configuration that I'm planning to support in
beta 20:

<container>
    <!-- Server connectors -->
    <server address="123.456.789" protocol="HTTP"/>
    <server protocol="SMTP"/>

    <!-- Virtual hosts -->
    <virtualHost addresses="*" ports="80, 8888" protocols="HTTP, HTTPS"/>
        <application="demo"    uriPattern="/appA"/>
        <application="manager" uriPattern="/appB"/>
    </virtualHost>

    <!-- Client connectors -->
    <client protocols="HTTP,HTTPS"/>
    <client protocol="SMTP"/>
    <client protocol="JDBC"/>
</container>


Now, here is the planned hierarchy for an installed NRE's container:

$containerRootDir$
 + config.xml (see format above)
 + bin/
 + lib/
 + temp/
 + webapps/
      + demo.war
      + manager/
           + META-INF/
                + MANIFEST.MF (with "org.restlet.application" property)
           + WEB-INF/
                 + lib/
                 + classes/
                 + templates/
           + images/
           + index.html

Best regards,
Jerome

Reply via email to