-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove loading and saving from the Player class #164
Comments
The problem that I'm having with stuff like this (Item vs ItemRepository) is the fact that there is a TON of abstraction and splitting up of classes. However, since progether projects are supposed to be a collaboration of multiple contributors often many who are new to coding or Java specifically, this can quickly become confusing. So while it may be best practice, there needs to be a way to make it easier for people to understand the code if we go through with things like this. For example, there really isn't any documentation explaining why certain classes are implemented the way they are. Most things are pretty self-explanatory (monsterFactory, Items, Backpack) but for stuff like Item and ItemRepository, it can become very confusing without a proper explanation (rather than having to go through and look up all the pull requests). Also, why Repository? That work doesn't really have anything to do with loading and saving. Is that just a standard? Because a name like PlayerInit, PlayerSetup, PlayerLoad or something similar would be a lot more readable. |
The splitting comes from Clean Code applied. For Item the following rules could be applied
The below text comes from Domain Driven Design - A Step by Step Guide (part 1)
As a learning project for others, it would be good to show / teach how things are done in the best way possible we can come up with. With that in mind, I think, we should apply Clean Code and Domain Driven Design. Related Books |
Separation of Concerns
Loading and saving should go to something like a PlayerRepository, similar to Item and ItemRepositry
The text was updated successfully, but these errors were encountered: