This project is read-only.

Replace single DataManager with a single one?

Jun 5, 2013 at 8:24 PM
Ok, while developing I noticed that many models have references to each other. E.g the guilds have a reference to the colours and the matches to the guilds.
So I thought: Wouldn't it be better to replace all the managers with a single big one? This would enable us to let the user create one manager and be done with it. Furthermore it would be helpful if we want to replace – say the guild id in the matches with a actual guild object.

Thoughts on this?
Jun 5, 2013 at 8:35 PM
Yes! There are dependencies right now that we will either have to deal with by duplicating data (i.e. storing world names in both the WvW manager and the World manager), or by going back to using singletons (yuck!). I don't like either approach, so I've sort of come to a standstill.

It would greatly improve the object model if we have one single top-level class that the caller instantiates instead of a different manager for each little piece. With this approach, the different pieces can easily find each other when there is a dependency. The top level class can instantiate each dependency as needed.
Jun 5, 2013 at 10:31 PM
Ok, I have something to do in the next few days. Both off-line and for this project. This means you are responsible for the implementation and I'll do minor fixing.

Are you up to it?

Btw: It would be a good point to branch that off, don't you think?
Jun 5, 2013 at 10:45 PM
Yep, I can do the implementation.

I'm not sure how to create a new branch with this system. I've only done that in Git before.
Jun 5, 2013 at 10:55 PM
Edited Jun 5, 2013 at 10:59 PM
Here is a very quick tutorial. I'll have to get into that myself, but I think for a change that big a branch is definitely the right way.
Jun 6, 2013 at 1:17 AM
Did you do another partial check-in? Once again I can't build because of missing stuff, this time in the test project:

Jun 6, 2013 at 5:02 AM
Well anyway, I nuked those two files from the project and built it. The initial implementation of the new object model is checked in to the new Dev branch.
Jun 10, 2013 at 1:27 PM
So how's it going with the implementation, can you give me a heads up?
Jun 10, 2013 at 4:05 PM
I think it's done. I haven't had a chance to get back to it since the middle of last week, but as I recall the only thing up in the air was the caching implementation on ItemData.
Jun 10, 2013 at 4:28 PM
Ok, I'll look over it and merge it into the main tree. I'll also look into the cache to file thing in ItemData.