Abstract ViewController, Implementations, Documentation.#13
Open
Smithor wants to merge 4 commits intoreportmill:masterfrom
Open
Abstract ViewController, Implementations, Documentation.#13Smithor wants to merge 4 commits intoreportmill:masterfrom
Smithor wants to merge 4 commits intoreportmill:masterfrom
Conversation
…sting functionality, and made ViewOwner an extension of DefaultViewController to complete the process. Lots of documentation.
…efault implementation of DefaultViewController.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have created an alternate proposal to #9, and I would prefer this one over that one. I had this idea when we were first discussing it, but didn't want to propose it due to the refactoring it would require on your end. But, when I saw that you had decided to create the ViewController class, that provided the perfect opportunity to raise this pull-request.
The idea is to make ViewController an abstract class that makes the core methods that are expected to be overriden more transparent. To keep the ease of use though, it also adds two new implementations, SimpleViewController and DefaultViewController (We could shorten the names to something like SimpleController and DefaultController if that is more preferential. I have no attachment to the names themselves).
SimpleViewController acts as a gateway into the simple use of the library. Right now, it adds the default createUI() implementation, but we could also add a default void implementation for resetUI() as I don't think it is necessarily used in most simple cases. This means that in order to use the library, a user only needs to implement two methods (or 3 right now), and they will be able to use it. It is also more clear, and follows regular Java inheritance expectations (unlike proposal #9, which subverts them by adding the abstract version of the class as a child rather than as the parent).
DefaultViewController is the exact same implementation as what is currently in ViewController, with everything implemented requiring overriding to utilize.
All in all I think this is a much friendlier implementation for newcomers, and makes it much easier to start using the library. I've also tried to add lots of friendly documentation to assist a new user in figuring out the flow path, as its not a normal path to see outside of game design.