The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Storing app's XML files

Posting this after a search of the archives.

I have a few dozen XML files in my .NET app, mainly DataTable data & schema files plus some vector graphics. This zoo is organized into folders/subfolders within a parent folder in the app's root directory. I want to prevent/check_for accidental modification of these files. At the moment my solution is to zip the lot up with a password & do a CRC32. A cryptographic horror no doubt, but it serves my purpose and offers compression as well. Note: the zip archive can be explored to see the directory structure.

What is the generally accepted technique to handle such an issue? I looked at isolated storage but I'm not sure if that's what I want.
230 Volts Send private email
Saturday, September 16, 2006
 
 
I've seen a number of apps that do a checksum of each individual file and compare against a known "good" version.  If this is an occassional process (like a version update), I would shift to this strategy as it could be an expensive process depending on the size of your tree.  If this is a more regular process (like hourly), I think taking a snapshot of a single file will be faster but it may not always be an accurate representation of the actual tree...
KC Send private email
Saturday, September 16, 2006
 
 
I thought you can put your read-only files & folders into a resource assembly dll. Please someone correct me if I'm wrong.
hobit Send private email
Saturday, September 16, 2006
 
 
+1 for resource assembly
Mike S. Send private email
Sunday, September 17, 2006
 
 
What is the point of even having xml files if you are just going to put them in a resource assembly? The point of having xml files in the first place is so that they can be easily changed. The end user can't change a resource assembly. If you aren't going to allow the application settings to be changed, just hard code them. But I don't think that is what the OP originally intended.
dood mcdoogle
Tuesday, September 19, 2006
 
 
Ignore my last comments.

I didn't read the original post closely enough. It seems that the OP was indeed wanting to keep these xml files from being changed by the end user.

It's not the first time that I have been wrong today and it certainly won't be the last!
dood mcdoogle
Tuesday, September 19, 2006
 
 
Thanks all. I will read up on resource assemblies and post any useful links that I find.
230 Volts Send private email
Tuesday, September 19, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz