Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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?

Flowchart of the shift framework

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.

share|improve this question

closed as primarily opinion-based by durron597, Snowman, MichaelT, Bart van Ingen Schenau, GlenH7 Sep 23 '15 at 21:26

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

Based on your examples it's not MVC that's for sure, the views have too much logic and the controllers are more of presenters indeed. I think MVP is probably the right choice. – Benjamin Gruenbaum Feb 4 '13 at 12:51
My question also involves if this could be considered a different pattern then mvc or mvp I re-write the title and explain a bit better – Erik Landvall Feb 4 '13 at 14:40
up vote 3 down vote accepted

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.


share|improve this answer
thanks for your answer and the links, will look them over... – Erik Landvall Feb 4 '13 at 14:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.