From: Stewart T. <wsr...@ho...> - 2005-02-28 23:55:10
|
Regarding the issue of one versus many XML files for data and rules sets. I'd advise caution in trying to put too much data into a single XML file. I know from experience that as XML files become large, it can become very difficult to edit them or write them accurately - lots of simple mistakes creep in and unless a lot of effort is put into the parsing software, the error messages can bear no relation to the root cause. A lot of J2EE Application Servers are notoriously dififcult to configure because of the decision to create a single XML deployment descriptor containing details for every EJB. Hibernate, which is a more recent attempt at a Java persistence engine has a separate XML descriptor file for every persistent class, and that seems to be a lot less error prone and easier for developers to deal with. Rulesets have to be human readable and modifiable, so XML is a good choice. However, for saving the state of the game, I think that Java Serialization would be a better choice. The volume of data involved is relatively small and the coding for straightforward serialization is simple, certainly several times less effort than mapping all objects in and out of XML. cheers Stewart |