User blog comment:Reversion/What do you think of this?/@comment-25968376-20160107194219/@comment-25968376-20160108150813

Here's an attempt to explain it in simple terms.

On the wiki you can see that each article has their contents and a history associated with them. We can see what the article looked like at any moment in time.

When programmers do big projects, they also want to keep track of what their project looks like. By using a version control system, they know the history of the files and folders without having to copy and paste them. This helps when debugging or when you have started working on a new feature for the project but decided to revert the changes later on, without having to redo the whole project.

Git is an example of such version control system. When you use git, you will create a local timeline of your files and their changes. But if you want other developers or people around the world to access your files, you have to upload them somewhere. Github is generally used for this, it is a site which manages your git projects. But not only others can see your files, they can also contribute to their project (that's what open source is about). But they can't just edit and ruin everything, instead, when someone does any changes, the developers can review them. If they accept the changes, they can merge them into the project.

We don't have to use github for this as the wiki already works as a version control system. But it would be nice if I could have the data file in the same project as the app, since there will be changes to the treasures in the future so the app will always have the latest data (provided by users).

The other thing I mentioned is JSON. JSON stands for Javascript Object Notation and is a compact but readable way of storing data. The data is structured in key-value pairs. Let me show an example of what I mean by that:

Anything you see between squiggly brackets { } is an object. Here we have one main object, describing a person. The person has many key-value pairs. For example the keys are firstName, lastName, age and so on. The values are John, Smith, 25 and so on. The angle brackets [ ] denote an array, which is basically a list that can contain other objects or values.

I think we should use this format if we're going to make such a database. The question is how we're going to structure the data. For example, we could have a huge array with all of the treasures, and let one of the keys represent its effects. Or, we could do it the other way around by having one key for each effect type, and the value is an array of all the treasures that have the effect. Both ways have their pros and cons.