[Opensource] 4.2 Discussion - Configuration Files

Michael Rimov rimovm at centercomp.com
Sun Jun 23 03:30:49 PDT 2002


Hey All,

I've been thinking about various aspects of expresso and thought about how 
I'd very much like to see Schema files simply become XML files.  We could 
keep the Schema class for people that need the flexibility, but most 
schemas are simply read-only glue that could be easily defined in an xml 
file with something like so:

<expresso-component active="true" title="MyTitle" 
messages="/com/jcorporate/expresso/core">
	<dbobjects>
		<dbobj class="blah blah"/>
                        .....
	</dbobjects>
	<controllers>
		<controller class="blah blah"/>
	</controllers>
</expresso-component>

Notice that I didn't call it a schema?  That's because in reality, Schema's 
are really 'webapp components' and more than a schema, and I think the 
title would be better suited.

So I'm all happy with this idea... I know that I'd derive a class from 
Schema called XMLSchema, and then modify schema list to accept a path name 
as well as a classname, and if it's a pathname, then I know to instantiate 
an XMLSchema instead... you get the idea.

But then it occurred to me... why don't we merge all these configuration 
files for components into single per-component xml files?  So instead of 
the above idea we had something like:

<expresso-component>
	<objects>
		[Put same definitions above here]
	</objects>
	<control>
		[Put the equiv of the struts-config file here]
	</control>
	<logging>
		[Put the contents of your ****Logging.xml files here]
	</logging>
</expresso-component>

Here's why I'm thinking this:

-With that we could get rid of the configuration directory all 
together.  Each configuration file would be neatly bundled with the 
expresso add-on component.

This further simplifies dealing with app servers that don't allow real 
paths within the webApp anyway.  All configuration data would be neatly 
stored in the jar files.

Anyway, as I said, I'm looking for something backwards compatible for now, 
but I really want to come up with a better plan to be able to add 
components to an Expresso Framework in a 'neater' way than we currently are 
doing.

Any thoughts?  Any other suggestions to make a better way of using web 
components without requiring separate webapps?

Thanks!
						-Mike




More information about the Opensource mailing list