Are we doing MVC wrong?
withouttheloop.com
Are we doing MVC wrong?
1–10 of 25 posts
Re: Are we doing MVC wrong?
#2Re: Are we doing MVC wrong?
#3Re: Are we doing MVC wrong?
#4All too often in my experience I see code that has the model rolled into the controller. Controllers and UI are structurally supported better in frameworks. We get lazy and put model code into controllers. It is the way we make spaghetti code today.
Re: Are we doing MVC wrong?
#5Re: Are we doing MVC wrong?
#6MVC is not a dogma, it is a no-brainer instruction to make 90% of programming fruits less miserable. I usually end up with something like Views-Composers-Handlers-Routes-Libs etc. And this can vary from project to project.
The right way is the way that works for you and your business requirements.
Re: Are we doing MVC wrong?
#7I agree that the interactors make rather odd-looking OO classes, but I suppose the imperative nature of most requests to perform some logic make them less objects in that sense. This has the added benefit of seeing what the system does, just by looking the class names in the interactors folder/namespace.
Re: Are we doing MVC wrong?
#8Sounds similar to my understanding of what a monad is. If you have many cases of this, it might simplify the switch statement and improve maintainability.
http://devtalk.net/csharp/chained-null-checks-and-the-maybe-...
http://stackoverflow.com/questions/674855/help-a-c-sharp-dev...
Re: Are we doing MVC wrong?
#9The controller is always the ugly part, because it's the piece that's responsible for interfacing between transaction-specific logic and your general backend interface. The article is right that it's easy to put too much business logic in the controller, but fails to recognize that "MVC" isn't supposed to be your whole application - just the UI side. The functionality of this BorrowABook class doesn't belong in the U…
Could you recommend any references for back-end patterns?