The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern.
0
votes
1answer
405 views
MVC or Extract Service Layer
we have an application that is built with .Net MVC. We are now tasked with exposing API's to third parties. Members on our team want to just continue down our current path and just use more ...
0
votes
2answers
76 views
How do I split out a service layer
I currently have four projects in my website's solution:
Project.Data
This holds the EntityFramework DbContext object and also the Repositories that interact with it. It references Project.Models.
...
3
votes
1answer
55 views
MVC URL formatting/design
In refactoring a lot of MVC code, I have run into an issue with my URL design. For example, let's say we have a Venue object
public class Venue
{
public long ID { get; set; }
public ...
3
votes
2answers
350 views
What .NET objects should I use to create a cookie based session in MVC?
I'm writing a custom password reset application that uses a validation technique that doesn't fit cleanly with ASP.NET Membership Provider's challenge questions.
Namely I need to invoke a workflow ...
3
votes
3answers
117 views
Versioning an API
I'm starting a side project, the first stage will be a building a web application with MVC, in later stages we will be adding clients for mobile platforms. My thought was to create one API that all of ...
1
vote
2answers
119 views
MVC : Does Code to save data in cache or session belongs in controller?
I'm a bit confused if saving the information to session code below, belongs in the controller action as shown below or should it be part of my Model?
I would add that I have other controller methods ...
2
votes
2answers
463 views
Is this the correct way to implement .NET MVC website structure?
I have recently seen a .NET MVC solution in which the markup in the .aspx views which appear to have a Controller as their model i.e the controller seems to be providing the data for the view, and the ...
-2
votes
0answers
157 views
Regarding future of Silverlight and MVC4 and Mobile Apps and IBM Worklight [closed]
My background is in ASP.NET. I would like to learn something new. Which of these three should I study?
Silverlight
ASP.NET MVC4.0 (seems to have cool functionality of web API)
some mobile ...
-2
votes
0answers
82 views
How to prevent download video online for website learning online? [closed]
As over question, i'm building website with asp.net mvc. i can't make my site when get this problem. Please, some body give me solution for over problem.
Thank very so much.
4
votes
6answers
234 views
Is MVC ever considered/applied system-wide?
I was having a discussion with a colleague and he bought up the topic of MVC and the use of ViewModels in ASP.NET MVC.
The discussion was that, in an n-layer architecture, the UI, Business Layer and ...
0
votes
0answers
37 views
Why is DefaultModelBinder ignoring custom prefix specified by Bind attribute? [migrated]
In next example DefaultModelBinder will look for any data item called travels and create an array that contains those items:
[HttpPost]
public ActionResult Index(string[] travels)
{
...
4
votes
6answers
304 views
How do I make my ASP.NET application take an action based on time?
I have an ASP.NET MVC4 application. Suppose that I wanted to execute some code (such as emailing a user) 2 days after a user has signed up.
One way is to have code executed on every request which ...
2
votes
4answers
222 views
Querystring Advanced Search where there are about 20 search fields
I am creating an advanced search page where there are about 20 search fields for a user to filter their search. My question deals with the query string, Is it standard web development practice to have ...
0
votes
0answers
7 views
what is the correct way to pass a range of values using “routing table” url format [migrated]
I am learning ASP.NET MVC and it is easy to pass a single value to a view,
using the following url format:
controller/view/id
and in the controller's code, I can simply define the interger id ...
8
votes
4answers
365 views
In Unit Testing, why would I create a Repository twice?
The other day I was reading a little about Unit Testing and I saw some examples where people create a repository interface (i.e. IExampleRepository) and then create the real repository (public class ...
-3
votes
2answers
94 views
Automapper Navigation Properties [closed]
I'm working on a MVC4 project using automapper to bind Entity/DTO/Domain Model and view Model.
I have some challenges with getting the navigation properties working.
I find several examples but ...
6
votes
2answers
289 views
Why is using named routes for generating outbound URLs a violation of Separation of Concerns?
What is separation of concerns?
In computer science, separation of concerns (SoC) is the process of
breaking a computer program into distinct features that overlap in
functionality as little ...
1
vote
2answers
270 views
Why should I use List<T> over IEnumerable<T>?
In my ASP.net MVC4 web application I use IEnumerables, trying to follow the mantra to program to the interface, not the implementation.
Return IEnumerable(Of Student)
vs
Return New List(Of ...
8
votes
4answers
633 views
What's the best practice for naming uploaded images?
Suppose I have a form in my web application where users can upload a profile picture.
I've got few requirements about file size, dimensions etc, but when the user uploads the image, how should I name ...
1
vote
0answers
138 views
Reusing values for segment variables when generating outbound URLs
When routes are matched to the outbound URLs, the routing system will try to find values for each of the segment variables in route's URL pattern by also looking at the values from the current ...
1
vote
2answers
209 views
Reuse MVC4 codebase / deploy MVC4 as standalone desktop application?
We have an MVC4 application that we would also need to distribute as a standalone (no network connectivity) desktop application. Rather than rebuild the HTML/JS front-end we would like to reuse that ...
18
votes
4answers
6k views
Why shouldn't I use the repository pattern with Entity Framework?
During a job interview, I was asked to explain why the repository pattern isn't a good pattern to work with ORMs like Entity Framework. Why is this the case?
1
vote
2answers
206 views
Asp MVC section and partial views
I have a question regarding ASP sections and partial views.
What ser the benefit of using one over another?
Because if I have a menu, i guest that it could be both as a section, but also as a ...
1
vote
2answers
107 views
Streamlining ASP.Net MVC deployment?
I own a VPS with Windows Server 2012 on it. I can install whatever I want on it.
In the past when deploying an ASP.Net MVC project, I would right click the project in the solution and Publish it.
I ...
12
votes
3answers
380 views
Is there any real value in unit testing a controller in ASP.NET MVC?
I hope this question gives some interesting answers because it's one that's bugged me for a while.
Is there any real value in unit testing a controller in ASP.NET MVC?
What I mean by that is, most ...
-2
votes
1answer
43 views
Does Glimpse support ajax requests? [closed]
Is it possible to get Glimpse to reveal the execution of AJAX requests out of the box? If so, how? I can only see the execution for the initial web page but none of the subsequent ajax requests that ...
1
vote
1answer
138 views
UTF-16 Pitfalls, Chinese
I'm going to be writing an application that is pure HTML5 and JS and MVC.net back-end.
We have .resx files that are getting compiled to .js files for resources in the html5 application. The ...
4
votes
2answers
468 views
How do I handle having so many SQL queries?
I have an MVC3 project that uses SQL Server.
I use data from the SQL database all the time and I often find that I'm reusing/duplicating some SQL queries. I thought I'd solve this problem by creating ...
0
votes
3answers
404 views
How to build MVC Views that work with polymorphic domain model design?
This is more of a "how would you do it" type of question.
The application I'm working on is an ASP.NET MVC4 app using Razor syntax.
I've got a nice domain model which has a few polymorphic classes, ...
0
votes
3answers
145 views
Re-engineering an ASP.NET AJAX project as ASP MVC
I have been asked to investigate the possibility of re-engineering an existing ASP.NET AJAX Web Application as under MVC.
The project, as it stands ATM, is very heavily relient on Telerik's ASP.NET ...
0
votes
2answers
163 views
Which asp.net technology fits this situation best?
I think I can count WebAPI out, but WebForms, WebPages, and MVC are all possibilities.
I want to create an asp.net web site that is primarily static content and links to other sites. The only ...
0
votes
1answer
284 views
Implementing a Service Layer with MVC4 while honoring Single Responsibility
I'm trying to learn some best practices while I ramp up on MVC4. I have a solution with three projects:
Web: MVC stuff
Core: Data Model
Tests: Testing classes
I'm now trying to add:
Services: ...
29
votes
1answer
1k views
Why does the .Net world seem to embrace magic strings instead of staticly typed alternatives?
So, I work in .Net. I make open source projects in .Net. One of my biggest problems with it isn't necessariyl with .Net, but with the community and frameworks around it. It seems everywhere that ...
4
votes
2answers
710 views
How to make an ASP.NET MVC site modular
I'm in the planning stage for an employee intranet system to be built with ASP.NET MVC 4. We'd like the site to consist of separate "modules", each of which provides a different feature: messaging, ...
2
votes
5answers
524 views
MVC exposes database primary keys?
I'm going through a MVC tutorial, and I notice that convention seems to be to expose a tables primary key on detail pages/urls (ie. /Movies/Details/5 as an example from the tutorial).
It's obviously ...
2
votes
2answers
171 views
Different Project Type in a Single Website
I have developed a website in asp.net and I have some additional tasks, improvements to develop. In order to get experience in asp.net/mvc, I want to create an admin panel using asp.net mvc.
Is this ...
1
vote
1answer
265 views
MVC 3 Page design; split pages into Many partials?
I am currently working on an MVC 3 Web app project where I need to display a lot of information on the front page. I am relatively new at web page layout and design so I have hit a wall in terms of ...
2
votes
1answer
318 views
Newbie ASP.NET developer being forced into MVC4 with WebForms
I recently got hired on as a new ASP.NET developer (C# code behind). When I arrived, I was told that they were moving to MVC 4, and so I bought two books on that. However, the other day I learned ...
2
votes
4answers
447 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
6k 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
216 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 ...
8
votes
5answers
10k 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
213 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
440 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 ...
2
votes
2answers
370 views
Different database for Membership and our web data or use just one?
Is better to keep our Membership stuff on the DefaultConnection and create another connection (another database) for our data? Or just one database for all?
If I have a MyAppContext and I want ...
0
votes
1answer
235 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
390 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 ...
0
votes
0answers
138 views
Admin Panel like Custom Framework [closed]
I want to Create a Framework , like Admin panel , which can rule almost all the aspects of what is shown on the frontend.
For an (most basic) example: If suppose the links which are to be shown in a ...
2
votes
1answer
151 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
170 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 ...


