Tagged Questions
82
votes
10answers
33k views
What is MVC, really? [closed]
As a serious programmer, how do you answer the question What is MVC?
In my mind, MVC is sort of a nebulous topic — and because of that, if your audience is a learner, then you're free to ...
41
votes
6answers
30k views
Why should I use an MVC pattern?
It seems everyone doing web applications nowadays wants to use MVC for everything. I find it hard to convince myself to use this pattern, however. I understand the general idea is to separate the ...
16
votes
2answers
5k views
Alternative patterns for web development? (non-MVC)
Recently I've been reading some blog posts regarding MVC and how it doesn't fit the web. I've learned about alternative patterns like the RMR Architecture.
I'm curious what other patterns people are ...
7
votes
2answers
5k views
.NET MVC project architecture / layering
When planning the architecture for a mid-large scale MVC web application how do you implement the layers to be as decoupled as possible and easy to test? (basically follow best practices) Let's say ...
9
votes
4answers
1k views
In MVC, can/should basic data retrieval from the Model be done in the View?
Given the concept of 'skinny controllers, fat models' and the general acceptance that Views can directly call on Models when requiring data for output, should one consider handling the 'get and ...
4
votes
2answers
746 views
How does MVC work with the principle “Tell, Don't ask”?
Procedural code gets information then makes decisions. Object-oriented
code tells objects to do things.
— Alec Sharp
So, when a view wants to display some information that is suppose to be ...
2
votes
1answer
283 views
Do I need JUnit tests for the controller layer on a MVC when I have a database layer
I have a MVC which has this structure:
ui
controller
db
model
Basically the controller doesn't really do much more than connection ui with db layer.
Do I need to provide JUnit tests for the ...
20
votes
6answers
3k views
How much business logic should be allowed to exist in the controller layer?
Sometimes we have some business logic represented in the controller code of our applications. This is usually logic that differentiates what methods to call from the model and/or what arguments to ...
12
votes
7answers
2k views
Does MVC apply only to web
It is almost and instantaneous whenever I talk to developers about Model View Controller (MVC) they say you make a request to a url the server builds a entity (MODEL) and provides you with visual ...
2
votes
7answers
1k views
Architectural patterns for interaction beyond MVC? [closed]
We all know the venerable Model-View-Controller pattern used to design interaction [mostly] with human users. It is the de-facto standard in OOP environment.
What are some other architectural ...
15
votes
6answers
1k views
Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?
So a situation I run into reasonably often is one where my models start to either:
Grow into monsters with tons and tons of methods
OR
Allow you to pass pieces of SQL to them, so that they are ...