Board Thread:General Discussion/@comment-667748-20130515090233/@comment-667748-20130517121046

Posting back on the correct thread: Happypal wrote: My experience is that it all on a single page brings the same problems as having it on different pages, but also adds a lot of code complexity. The final page is a huge clusterfuck: User:Happypal/Sandbox/ArmorDatabase.

Also, it MASSIVELLY burdens the servers: For starters, the entire wiki gets refreshed every time the code gets touched. Second, it requires parsing a single page which is thousands of K big, as opposed to selectivelly parsing only the page(s) of interest.

It is possible, I just don't think it is the best approach.

I just threw together a "same page db". Look at this code: User:Happypal/Paladin Helm. As you can see, intrusion is "minimal". Users can edit it without even realizing it it is part of a database. It isn't quite perfect yet, and there is some "duplication" with the existing fields, but nothing that can't be smoothed out. Proof that it works is here in this code section User:Happypal/Sandbox.

Daifukkatsu wrote: i was wondering what you meant by that note in the code next to the image that says you "can't use it as is".? why not just pull it from the "name-image" parameter?

with regards to one database being too large, maybe it could be broken up into pieces, e.g. Head Armor DB, Chest Armor DB etc.

Happypal wrote: Yeah, but that would be a "two-pass" job: First, insert the new parameter in ALL the pages, change the template, then remove the old parameter.

One of the problems with having more than "1 item", in a page is that that page will require code to select which item needs to be loaded. This is the kind of thing you or I can deal with, but not anons. It breaks incredibly easilly. Plus, the problem remains that the value related to an item wouldn't be on the same page as said item, so if someone wants to fix a value, it will not be immediately obvious where to change the value...