The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern.

learn more… | top users | synonyms

3
votes
4answers
4k views

What does this mean: Expression<Func<TModel, TValue>>

In ASP.Net MVC, in the razor view, you can type this kind of code: @Html.EditorFor(model => model.Name) (in this case, it creates a textbox for the field Name of the object which is defined as ...
13
votes
3answers
8k views

ASP.NET MVC vs WCF for REST API + Webpage usage

I think the discussion for programmatic service oriented usage vs human interaction is clear. But if I were to create an application that makes use of both a programmatic API and a website that makes ...
1
vote
2answers
402 views

Want some architecture input to help with current requirements and future (unknown) requirements :-)

BACKGROUND: I am starting to architect a web project using asp.net mvc. I'm going to use a very common architecture where I have the following layers: Service Biz Data Domain The Service layer ...
19
votes
5answers
22k views

Should we use Entity Framework?

We currently have the following stack : VS 2005 Web forms SQL Server 2005 IIS 6 We are planning on transitioning to this : VS 2010 MVC and Web Forms SQL Server 2008 IIS 7 My question is, when ...
3
votes
1answer
850 views

How to create view models - Constructor, Factory Method, …?

I'm trying to lead a charge for re factoring our rather bloated controllers. We currently have a BaseModel from which all our other models inherit. The BaseModel contains things common to all pages, ...
5
votes
1answer
1k views

Project/DLL separation of concerns in ASP.NET MVC

I'm coming from a web forms n-tier background into ASP.NET MVC projects, and I'm wondering what the best practices are for separation of the components of MVC into different libraries (or not to) in ...
0
votes
1answer
342 views

Get/Post Controller Logic Best Practice

In an ASP.NET MVC project (Razor), I have a Get request, which loads two properties on a model, dependent on the property passed into the action method. So if the parameter has a value, the Group ...
1
vote
2answers
681 views

Implement service layer in MVC

We have a defined service layer hosted in WCF. We are now building a website that will need to use the services functionality. The website is being written in ASP.NET MVC 4 and I'm trying to decide ...
2
votes
1answer
191 views

Is passing the Model around in this way considered bad practice?

If I have a view called, for example, ViewDetails that displays user information in labels and has a Model called ViewDetailsModel and if I want to allow the user to click a button to edit some of ...
1
vote
1answer
243 views

Unit test: How best to provide an XML input?

I need to write a unit test which validates the serialization of two attributes of an XML(size ~ 30 KB) file. What is the best way to provide an input for this test? Here are the options I have ...
0
votes
2answers
375 views

Generic Handler vs Direct Reference

In a project where I'm working on the data access layer I'm trying to make a decision how to send data and objects to the next layer (and programmer). Is it better to tell him to reference my dll, ...
7
votes
3answers
1k views

IValidatableObject vs Single Responsibility

I like the extnesibility point of MVC, allowing view models to implement IValidatableObject, and add custom validation. I try to keep my Controllers lean, having this code be the only validation ...
3
votes
1answer
2k views

ASP.NET MVC Portable Areas - Can they communicate and be used as a plugin-like architecture?

I'll get straight to the point: I was wondering if there is a common pattern to use portable areas as a components of a plugin-like architecture. Example: We've got 3 plugins (portable areas) ...
9
votes
3answers
3k views

How should I implement the repository pattern for complex object models?

Our data model has almost 200 classes that can be separated out into about a dozen functional areas. It would have been nice to use domains, but the separation isn't that clean and we can't change it. ...
2
votes
1answer
2k views

Modular enterprise architecture using MVC and Orchard CMS

I'm making a large scale MVC application using Orchard. And I'm going to be separating my logic into modules. I'm also trying to heavily decouple the application for maximum extensibility and ...
2
votes
1answer
501 views

ASP.Net MVC 3: multiple versions of the site without changing of URL, is it possible?

Our website is written in ASP.NET MVC 3 and we want to change a feature in the core functionality of the site. The problem is not every client can be moved to this new version/format (because of ...
1
vote
1answer
1k views

Using WebStorm for Razor Syntax MVC

I am building a lot of client-side heavy SPA-like apps with VS2010 and MVC3/4. VS2010 Javascript/HTML/CSS editing (mostly javascript) is interminably slow and sluggish. I'd love to use something ...
1
vote
2answers
220 views

Is it better to define all routes in the Global.asax than to define separately in the areas?

I am working on a MVC 4 project that will serve as an API layer of a larger application. The developers that came before me set up separate Areas to separate different API requests (i.e Search, ...
3
votes
3answers
376 views

Does a method to check the file type being uploaded belong in the controller?

If I create a controller that has a method ActionResult UploadFile(HttpPostedFileBase file) Where is the best place to add the code that will verify that this is a good and useable file? The reason ...
4
votes
2answers
588 views

Is ASP.NET MVC completely (and exclusively) based on conventions?

--TL;DR Is there a "Hello World!" ASP.NET MVC tutorial out there that doesn't rely on conventions and "stock" projects? Is it even possible to take advantage of the technology without reusing the ...
7
votes
4answers
727 views

Unit testing and Test Driven Development questions

I'm working on an ASP.NET MVC website which performs relatively complex calculations as one of its functions. This functionality was developed some time ago (before I started working on the ...
-2
votes
2answers
763 views

ASP.NET MVC Controller separation best practices [closed]

I am very new in ASP.NET MVC and Web stuff. I want to know how I should separate my page logic into different controllers. Like for example should I use Home\BuyProduct or Product\Buy. When there is a ...
1
vote
1answer
430 views

Webservice Return Generic Result Type or Purposed Result Type

I'm building a webservice which returns JSON / XML / SOAP at the moment.. and I'm not entirely sure which approach for returning results is best. The Client Consuming the Services will generally be ...
2
votes
1answer
519 views

What benefits can I get upgrading my ASP.NET (Webform) + DAL(EF) + Repository + BLL structure to MVC?

I'm in the process of defining an approach that may best fit our needs for a big web application development. For now, I'm thinking going with an ASP.NET Architecture with a DAL using Entity ...
0
votes
2answers
847 views

Wrapping REST based Web Service

I am designing a system that will be running online under Microsoft Windows Azure. One component is a REST based web service which will really be a wrapper (using proxy pattern) which calls the REST ...
2
votes
2answers
602 views

Sending an email with attachment from server side

I have to create a word document in a specific format and send it as attachment to some email addresses. I have a preview screen for the report which on approval has to be send in email. This is an ...
2
votes
2answers
565 views

MVC, when to separate controllers?

I'm starting with MVC and have a newbie question. What would be the logic criteria to define what a controller should encompass? For example, say a website has a 'help' section. In there, there are ...
11
votes
3answers
1k views

Question on design of current pagination implementations

I have checked pagination implementations on asp.net mvc specifically and i really feel that there is something less efficient in implementations. First of all all implementations use pagination ...
2
votes
1answer
2k views

Port numbers in Visual Studio projects and IIS

I have a few questions about localhost and port numbers as this is an area where I do not have a lot of knowledge, and because I recently had to work with setting up Visual Studio projects and IIS and ...
5
votes
3answers
247 views

What exactly do I have to pay attention for when choosing Windows Hosting Provider?

This is my first time choosing a hosting company. It is for a web site made in asp.net mvc3. So I was thinking choosing a provider would be easy since I found this page ...
-2
votes
2answers
4k views

What is dependency of ASP.NET MVC on .NET Framework and how to use it with .NET 2.0?

When you download and install asp.net MVC, does it just add code to the .net framework class library? Or does it also modify the installed Visual Studio editions? Another question: If it is just ...
3
votes
2answers
1k views

What are the differences between Castle Monorail 3 over ASP.Net MVC?

I have been using Castle Monorail for some years now with great success, although I haven't bothered to update the version I'm using (2 or 3 year old). Now I'm making a decision on go to ASP.Net MVC 3 ...
4
votes
4answers
2k views

How do you deploy your ASP.Net MVC3 application to the production server?

I just want to find out the best practice to deploy your MVC3 application and what tool you use to get the job done. I am using Visual Studio 2010. I publish my web site, then manually backup whats ...
14
votes
5answers
30k views

What's the difference between stateful and stateless?

The books and documentation on the MVC just heap on using the Stateful and Stateless terms. To be honest, i am just unable to grab the idea of it, what the books are talking about. They don't give an ...
0
votes
1answer
936 views

Database Driven Web Application, C# Front-End and F# Back-End meaning

Hi I am an intern working with ASP.NET. My current task is to make a website which will incorporate some jquery viewing features. This project seems to me will be primarily dealing with reading data ...
4
votes
3answers
208 views

Bringing in New Architecture During Maintenance on Legacy Systems

I have been tasked with adding some new features to a legacy ASP.NET MVC2 project. The codebase is a disaster and I want to write these new features with some thought behind the implementation and not ...
1
vote
1answer
768 views

Flash messages in ASP.NET MVC without sessions

I'm developing a web application for Windows Azure using ASP.NET MVC 4. I would like to enforce one restriction in the architecture: do not use Session. To achieve availability on Azure, and since ...
4
votes
2answers
2k views

ASP.NET vs ASP.NET MVC

I just started learning the ASP.NET MVC framework and it's very different in architecture from regular ASP.NET development. Transitioning from windows forms to WPF was nice, and seemed a way forward ...
7
votes
3answers
5k views

In ASP.NET MVC3 controllers, where do you instantiate your DataContext?

In your ASP.NET MVC 3 applications that use a DataContext or DbContext, where do you instantiate your data access object? Here is a non-exhaustive list of where I've seen it done: Individually ...
10
votes
1answer
1k views

Is there a need for a factory class for creating viewmodels?

A colleague of mine suggested using a factory class for creating viewmodel objects in our ASP.NET MVC solutions. The idea being that it can help with the design, and maintainability, of the way ...
3
votes
3answers
2k views

DDD + POCO does this makes sense?

DDD promotes rich domain models with behavior in it, POCO naked objects without any objects in it. Is it possible to have them both combined? I have a Multi Layer Solution Core - has POCO ...
1
vote
1answer
483 views

What is the future for ASP.NET Membership Providers? [closed]

While working on a new project with MVC3, a DI framework (Ninject), and unit tests (NUnit) paired with mocks (Moq), I found setting up the Membership Provider felt a bit "awkward". I've run into tasks ...
1
vote
2answers
237 views

What are some useful things you can do with Mvc Modelbinders?

It occurs to me that the ModelBinder mechanism in ASP MVC public interface IModelBinder { object BindModel(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext ...
4
votes
1answer
348 views

Workflow design for multi-step edits on a webapp

I have a web app (ASP MVC2) where some forms can be accessed via multiple routes, initially once a form was complete a user was kicked back to a default page for that form rather than the page they ...
9
votes
1answer
2k views

How to build a good service layer in ASP.NET?

I have looked through some questions, technologies for building a good service layer but I have some questions regarding this that I need help with. First some information of what I have for ...
2
votes
2answers
678 views

Storing images in file system and returning URLs or virtually resizing and returning byte arrays?

I need to create a REST web service to manage user submitted images and displaying them all in a website. There are multiple websites that are going to use this service to manage and display images. ...
1
vote
3answers
769 views

Can you/should you develop components for ASP.NET MVC?

Following from the previous question I've started to wonder - is it possible to implement "Components" in ASP.NET MVC (latest version)? And should you? Let's clarify what I mean with a "component". ...
0
votes
3answers
427 views

Need recommendation for transferring ASP.NET MVC skills to PHP [closed]

I am looking to translate my skills in .NET to PHP - specifically in regards to ASP.NET MVC. At work I am currently using .NET MVC 2.0 on a variety of projects and thoroughly enjoy the platform. ...
1
vote
2answers
1k views

What programming language would be the best fit for small browser games? [closed]

I want to make small web apps containing little games (multi-user dungeons, tower defense games, and roguelikes) or talent calculators for MMOs etc. After some research I have had people say that ...
0
votes
1answer
582 views

Caching Business Objects in MVC application

I figured this was more of an architectural question, so I chose to post it here rather than Stack Overflow. So I'm building an MVC web application and have just finished writing the code that wraps ...