[OJB-developers] Kill the mapping files
Brought to you by:
thma
From: <ll...@li...> - 2002-02-26 22:41:46
|
This might be a controversial suggestion. But it is an idea I got and I would like to get some feedback on it. Wouldn't it be possible to just drop the XML mapping files. The way I see it XML files contain data. And data should be persisted in a database. The way it is now the XML files are marshaled to OJB mapping objects which OJB then uses to figure out how to map the objects to tables. If we didn't have the mapping files it would be a easier to write the mapping-tool since it wouldn't require you to invent a tool to marshal and unmarshal mapping objects to xml files. Of course for this to be possible, there would have to be some kind of "bootstrapping" mapping objects that map the mapping objects to database tables. That could be handled with a simple factory pattern that returns hardcoded prebuild mapping objects. One might argue that the current XML files are pretty simple to edit in a text-editor. But I cannot see that it is significantly easier to edit XML files than SQL scripts. And in the end the goal must be to build a visual (or better fully automatic) mapping tool. I hope my suggestion is clear enough. Would this be a possible way to go ? /Lasse |