I have created a very tiny framework to be able to get away from all the clutter while developing. The point of the framework is not to replace any library of choice but simply segregate the code to it’s correct logic.
You can see the source on github along with a few code examples: https://github.com/erik-landvall/shift
While I try to describe the pattern I’m using I’m starting to wonder how this should be defined. And that’s my question for you. What would you say the following chart symbolizes?
I like to think of it as an MVP pattern, but would like to hear your opinion.
Also, if you feel that the flowchart poorly resampling the code, give me a comment about it and I will attempt to fix it.
2
MVP. In classic MVC, both the view and controller can access the model. In your case you have a coordinating object logical layer (the Presenter in your case, see diagram below) with knowledge of both the model and view, keeping those two isolated.
An additional comment to this. Fowler retired MVP from his catalog of patterns and split it into two: Supervising Controller and Passive View. I haven’t looked into your code, but it’s worth reading about them.
1