Bennett McElwee recently published an article titled “Vespa: A Better MVC“. As the title suggests, he presents his observations of the traditional understanding of an MVC structure and provides his own suggestions for how it might be improved. If this sounds interesting to you, I’d recommend you read the article.
Given it’s relevance to the work I’ve been doing recently, I was particularly interested in Bennett’s improvements to the controller component of the traditional MVC pattern. He distinguishes between two types of controllers, calling them “actors” and “presenters”.
In the context of web applications, this clarification makes great sense to those of us who have implemented the Post-Redirect-Get pattern as a means of fixing the back button in our user’s browser and allowing them to bookmark resources throughout our application. The “presenters” that Bennett speaks of correspond to the controllers that handle GET requests. The “actors” correspond to the controllers that handle POST requests and then redirect to another GET request.
That being said, this improvement really stands on it’s own as a single improvement the controller component of the MVC design pattern. However, Bennett has coupled it together with another model-and-view related improvement which, great as it may be, is less obvious and relevant to me, and I may or may not want to use.
Both improvements may be valuable. I’m confident one is and I’m thankful Bennett has taken the time to document it. But in the end they stand or fall individually. If our purpose is to build a shared vocabulary, why not decouple the two improvements and name them individually?
Thanks again, Bennett!
Leave a Reply
You must be logged in to post a comment.