Thanks for those who offered to help, we could try to race to complete the file once it's online <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="
" border="0" alt="smile.gif" />
Thanks for your feedback McHaggis, this is exactly the kind of thorough input I need!
<!--quoteo(post=1928217:date=Apr 22 2009, 02:45 AM:name=McHaggis)--><div class='quotetop'>QUOTE(McHaggis @ Apr 22 2009, 02:45 AM) <a href="index.php?act=findpost&pid=1928217"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->isn't it a bit redundant downloading a database of 500+ games when you only have 20 on your hard drive? We're not all pirates <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid="
" border="0" alt="wink.gif" />
...
One of the main advantages of XML is that it's human readible, so tidyness is a major issue when creating XML documents. Using a different tag name for each country code isn't a great idea, that's what attributes are for.
...
Like I said, not meaning to sandbag you or anything, just speaking as someone who deals with XML every day.<!--QuoteEnd--></div><!--QuoteEEnd-->Nobody really needs a list of 500+ games, but anyone can have a need for 10 different games from this list, that's the purpose of a general list, to suit anyone,
pirates included, they have a hard life at sea as it is to deprived them of such a feature.
Readable and tidiness, I'm all for it <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="
" border="0" alt="smile.gif" />
I did not add identation in the example but the file will have it.
No offense taken at all, your input is appreciated and the final draft will most likely use more child elements,
I will try to explain why I proposed a simplistic schema so that people can view both sides of the coin.
I understand adding attributes and child nodes is generally a good habit if not a necessity, especially for a web developer, and how such a minimal structure can be seen as flawed, but for simplicity's sake I thought this particular case may warrant an exception.
In this particular case, it's more important that anyone can edit the structure without messing it up than it is to have a flexible/elegant design.
The needs are so simple that I fear anything more complex than the minimum is not worth the added complexity.
This database purpose is to load information about a game with a known set of categories, not really process unknown data or categories.
- i placed accessories as element names because "nunchuck" is not the data that will be directly used, "true" is, and in hope to avoid people adding wrong elements by thinking they can add anything. when a new accessory is released it can be added.
- true/false or 0/1 is faster to type than "balanceboard" and less prone to error if edited by hand.
- minimal structure means less possibility of someone forgetting a quote somewhere
- minimal structure is more humanly readable in my opinion (but maybe I'm just thinking like a frakkin' machine?)
That is why I was leaning towards the "minimal XML" approach as described here <a href="http://xml.coverpages.org/minxmlspec20000413.html" target="_blank">http://xml.coverpages.org/minxmlspec20000413.html</a>
from <a href="http://www.w3schools.com/DTD/dtd_el_vs_attr.asp" target="_blank">http://www.w3schools.com/DTD/dtd_el_vs_attr.asp</a>
"
There are no rules about when to use attributes, and when to use child elements. My experience is that attributes are handy in HTML, but in XML you should try to avoid them. Use child elements if the information feels like data.
"
from <a href="http://www.ibm.com/developerworks/xml/library/x-eleatt.html" target="_blank">http://www.ibm.com/developerworks/xml/library/x-eleatt.html</a>
"
- If you consider the information in question to be part of the essential material that is being expressed or communicated in the XML, put it in an element. For human-readable documents this generally means the core content that is being communicated to the reader.
- data goes in elements, metadata in attributes
- If the information is intended to be read and understood by a person, use elements. In general this guideline places prose in element content.
"
The format used by Offlinelist also seems to favor simplicity, and was chosen for the same kind of purpose which is to be a simple game list.
The goal here is slightly different because it is not about cataloging every scene release, but about game information (name, checksum) and ultimately preservation, like Goodtools/No-Intro.
offlinelist:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><game>
ÂÂÂÂ<imageNumber>1332</imageNumber>
ÂÂÂÂ<releaseNumber>1337</releaseNumber>
ÂÂÂÂ<title>Sonic & The Black Knight</title>
ÂÂÂÂ<publisher>Sega</publisher>
ÂÂÂÂ<location>0</location>
ÂÂÂÂ<sourceRom>WiiERD</sourceRom>
ÂÂÂÂ<language>4291</language>
ÂÂÂÂ<files>
ÂÂÂÂÂÂÂÂ<romCRC extension=".iso">0328DB2E</romCRC>
ÂÂÂÂ</files>
ÂÂÂÂ<im1CRC>3DFA8720</im1CRC>
ÂÂÂÂ<im2CRC>838E00D2</im2CRC>
ÂÂÂÂ<comment/>
ÂÂÂÂ<duplicateID>1332</duplicateID>
</game><!--c2--></div><!--ec2-->
for Goodtools and No-Intro images are managed in separate dats, because this is not official data for the game, the same goes for release group and release number.
<!--quoteo(post=1928217:date=Apr 22 2009, 02:45 AM:name=McHaggis)--><div class='quotetop'>QUOTE(McHaggis @ Apr 22 2009, 02:45 AM) <a href="index.php?act=findpost&pid=1928217"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Another thing - it's much easier to code a loop through a specific set of nodes (for example <accessory>) than manually checking the existence of many nodes (<balanceboard>, <motionplus>) not to mention the redundancy of specifying the text of those nodes as false.<!--QuoteEnd--></div><!--QuoteEEnd-->There is only a single type of main element, which is <game>, and there is no need to load accessories only so it is really one pass to load all data about a game.
The need is to load true/false status for known accessories, not load an unknown list of accessories that's why I put them as elements.
But you're right, adding categories makes perfect sense, even if it is only to have a more organized structure.
You're right about redundancy, accessories should only be mentioned if they are supported, and the required="true" attribute is absolutely necessary.
Not so sure about this one though: <rating esrb="E" pegi="12+" />, it's not like there are more rating systems and the GUI should load both and be able to display the one matching a game's setting or user preference.
All of this being said, I do think a couple child elements will not hurt, it's just that I started with the minimum to see what was really necessary to add.
<!--quoteo(post=1928249:date=Apr 22 2009, 02:54 AM:name=AlexDP)--><div class='quotetop'>QUOTE(AlexDP @ Apr 22 2009, 02:54 AM) <a href="index.php?act=findpost&pid=1928249"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'm definitely willing to provide support for this idea in the next version of WBFS Manager (3.0) whether it's CSV files or XML (preferable) files. By support I mean using the XML files as input for copying over to WBFS drives as well as generating the XML from someone's WBFS drive (so they can just export it and post it quickly).
XML files are obviously preferable and I agree with McHaggis, the XML document layout needs to be nice and clean and most importantly standard and unified.<!--QuoteEnd--></div><!--QuoteEEnd-->Thanks for your support, I think those will be great features! It could also be used to verify iso checksums before games are sent to WBFS (and even to check games on WBFS with another checksum)
Yes, XML is the obvious choice and that's why I added preliminary support for it already <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="
" border="0" alt="smile.gif" />
The file can look nice and clean even with a simple and not so elegant structure because it will be formatted with identation, but I agree that maybe adding a slight level of complexity by introducing child elements is probably not a luxury.
Don't worry the file will be perfectly valid XML.
To make it standard and unified it's up to us to quickly decide on a draft and add support.
If people download several USB Loaders and see they can enjoy the benefit of this database, they will expect it in other loaders and it will be a unified standard.
It's only when support is added to the loaders that people can start contributing to improve the database and make it a standard.
<!--quoteo(post=1929060:date=Apr 22 2009, 08:51 AM:name=oggzee)--><div class='quotetop'>QUOTE(oggzee @ Apr 22 2009, 08:51 AM) <a href="index.php?act=findpost&pid=1929060"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Sounds good.
If this takes off, I will include it in a future release of cfg usb loader.<!--QuoteEnd--></div><!--QuoteEEnd-->Thanks, you'll be glad to know it's in the final stages of ignition <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid="
" border="0" alt="wink.gif" />
I think the reactions have been encouraging, and I hope it will only take until the end of next week to take more feedback, and prepare support for the various loaders.
<b>Summary of what needs to be done:</b>
- decide on a good structure that can be understood by anyone, what level of complexity is a good balance?
- add support for the XML file in the loaders (I've done that for the first draft for Configurable Loader, easy to improve when the final schema is decided)
- load the file in other programs such as WBFS managers, to easily rename all files on WBFS and verify iso checksums (AlexDP offered to add support to his manager)
- fill the XML with data <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="
" border="0" alt="smile.gif" />