Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 1204

MVC (Model-View-Controller) is a software architecture pattern that enforces separation of concerns.

1
vote
Your data structure should be recursive, like this: public class Node { public string Value { get; set; } public List<Node> Children { get; set; } public override string GetString() …
answered Nov 27 '13 by Robert Harvey
1
vote
In all likelihood, you should be doing this so that the add button doesn't get enabled again until there is something to add. That means you need client-side validation, which occurs in the View.
answered Jan 30 '15 by Robert Harvey
7
votes
to coordinate the display of the data. The model is not necessarily a database. In MVC, the Model is both the data and the business logic needed to manipulate the data in the application. …
answered Apr 12 '12 by Robert Harvey
7
votes
being concerned about how that interaction might pollute the domain objects and their logic, or vice versa. It is the layer of separation that Fowler describes. See Also The View Model Pattern Isn't MVC Anti-OOP? …
answered Aug 13 '13 by Robert Harvey
1
vote
If you're calling the controller from the User screen, use the UserController. If you're calling the controller from the Contracts screen, use the Contracts controller. And if you're displaying a li …
answered Nov 3 '16 by Robert Harvey
3
votes
MVC is primarily a User Interface paradigm. Part of the benefit derived from its modularity is that it shouldn't matter what your data repository looks like. Just add a Service Layer to access …
answered Jan 10 '14 by Robert Harvey
16
votes
In my experience, a web application would have to be trivially small to not benefit from the organization and decoupling that MVC provides. Perhaps a bit of explanation about the MV* family of … specifically with data binding. Model-View-Controller is primarily associated with web applications. In MVC, commands aren't routinely exchanged between the Model and the View. Instead, the View is POSTed …
answered Apr 28 '15 by Robert Harvey
4
votes
Obtain the external data in the controller method, and pass the data to the view there. If you need more finesse, write a repository, service layer or data context that contains the needed data retri …
answered Mar 24 '15 by Robert Harvey
8
votes
It is perfectly acceptable to put security/permissions logic in the controller method. The purpose of the controller method is to coordinate service calls to the service layer or business logic layer …
answered Nov 11 '14 by Robert Harvey
2
votes
Consider a custom type called TimeInterval that is stored as a double, but is displayed as hh.mm.ss.ffffff where ffffff is fractional seconds. With custom binding, it is possible to show the binder h …
answered Apr 12 '12 by Robert Harvey
1
vote
The ViewModel object is not what gets stored in a database table, generally. It's the individual items in the ViewModel object that get stored. Each of those items already has an ID. For example: …
answered Oct 16 '14 by Robert Harvey
6
votes
You're going to have to embrace ASP.NET MVC in its own right. There is no server code-behind. There are no drag-and-drop widgets, no plugins, and no leaky page life-cycle. There is no almost … -wysiwyg: instead there is total, actual, complete wysiwyg. There is no SESSION; you'll have to live without it. There's no weird, busted markup. Best of all, there's no lies or deception: ASP.NET MVC
answered Sep 16 '16 by Robert Harvey
3
votes
Unless you come up with some specific code that changes my mind, I'm going to say that MVCS is just a slight variation on MVC that makes it clearer that the Business Domain lives in the Model, and is … technically separate from the data Store. MVC just includes S (the data store) as part of the Model, but the business domain always lives there. …
answered Jul 24 '15 by Robert Harvey
2
votes
Model methods don't have to be all CRUD. What you probably need is a Service Layer. The Service Layer provides an abstraction between your database persistence operations and your business operat …
answered May 6 '14 by Robert Harvey
3
votes
Having a Model and a ViewModel promotes separation of concerns by allowing your Model to work independently from the rest of your system. Have a look at the following architecture: {Database} --> {D …
answered Mar 24 by Robert Harvey

15 30 50 per page