background preloader

Mvc

Facebook Twitter

Mvp

Aspnetmvc. Caliburn. 13 ASP.NET MVC extensibility points you have to know. One of the main design principles ASP.NET MVC has been designed with is extensibility. Everything (or most of) in the processing pipeline is replaceable so, if you don’t like the conventions (or lack of them) that ASP.NET MVC uses, you can create your own services to support your conventions and inject them into the main pipeline. In this post I’m going to show 13 extensibility points that every ASP.NET MVC developer should know, starting from the beginning of the pipeline and going forward till the rendering of the view. 1. RouteConstraint Usually you could put some constrains on url parameters using regular expressions, but if your constrains depend on something that is not only about the single parameter, you can implement the IRouteConstrains’s method and put your validation logic in it.

One example of this is the validation of a date: imagine an url that has year, month and date on different url tokens, and you want to be able to validate that the three parts make a valid date. 2. 3. Andrew Peters’ Blog » Blog Archive » Introducing NHaml - An ASP. How we do MVC - Jimmy Bogard - Our team has been using the ASP.NET MVC framework on a production application for about 9 months now, and in that time, we’ve crafted a number of opinions on how we want to design MVC applications. Much of this design is inspired by the concepts from FubuMVC, and in particular, Jeremy’s post on their MVC opinions. Our approach is rather similar, but deviates in a few places. I’ll elaborate on many of these concepts in future posts, but for now, in no particular order, our opinions: Controllers are thin and light, only responsible for communicating an action result back to the MVC pipeline.

All major request-handling belongs in application-level services, that communicate operation results back up to the UI layer (controller), that then decides what to do with that result. In many cases, the “service layer” is a simple repository call.Strongly-typed views, and discouraging the dictionary part of ViewData. I can’t stress enough that last point. Smart model binding. Rhino Igloo – MVC Framework for Web Forms. How many times have the documentation of a product told you that you really should use another product? Well, this is one such case. Rhino Igloo is an attempt to make an application that was mandated to Web Forms more palatable to work with. As such, it is heavily influenced by MonoRail and its ideas. I speak as the creator of this framework, if at all possible, prefer (mandate!)

The use of MonoRail, it will be far easier, all around. Model View Controller is a problematic subject in Web Forms, because of the importance placed on the view (ASPX page) in the Web Forms framework. When coming to build an MVC framework on top of Web Forms, we need to consider this limitation in our design. Along with the MVC framework, Rhino Igloo has tight integration to the Windsor IoC container, and make extensive use of it in its internal operations. I took to liberty of flat out ignoring implementation details that are not necessary to understanding how things flow. The Views get { return controller; } if (! Our “Opinions” on the ASP.NET MVC (Introducing the Thunderdome P. I’ve got my asbestos underwear on, so flame away… So many of us are so thrilled at seeing an official Front Controller / MVC framework for ASP.NET development that I think we’ve forgotten to ask ourselves “Is this thing any good?”

In *my* opinion, if you look at the ASP.NET MVC framework as a complete framework to be used out of the box, the MVC framework isn’t very good at all. However, as a set of fairly loosely coupled classes that you can use to build a highly productive, specialized MVC stack for your specific application needs, the ASP.NET MVC framework is perfectly fine. Basically, my issue with the MVC framework is that I think it falls far short of Ruby on Rails in terms of productivity enhancing features and testability.

Specifically, I think the MVC framework – out of the box – has failed by not embracing the Rails mantras of Opinionated Software, Convention over Configuration, the DRY Principle, and Testability support. Opinions Other Stuff We’re Doing [TestFixture] [Test] Testplan Checklist for Asp.Net - Asp.Net QA Team. A.k.a. The “I didn’t know I had to test that” checklist. Each tester is responsible for ensuring that his/her feature integrates correctly with the rest of Asp.Net, which is a challenge because Asp.Net is a very big product and almost no one can keep all the different features in their head.

To address this, our team maintains a "checklist" of integration points that each tester must investigate while creating his/her testplan. Each item links to a page with more information and resource links (which I omit here due to space), and the idea is for the tester to do research on each area and discuss with their feature crew if any interesting tests can be done with each point. Federico Silva Armas Asp.Net QA Team Areas that are interesting to both controls and runtime features: Output Caching(Page & User Control) Trust levels Async pages Precompilation NoCompile pages Virtual Path Provider Debugging Languages: VB and C# Impersonation Perf counters Browser dependencies Custom errors.

PRG Pattern in the ASP.NET MVC Framework - Tim Barcz. Have you ever been traveling through the "internets" and have been presented with the following? As web developers we know what this means; a form was posted to the page and now you're trying to refresh that same page. I'm not sure if there's been any significant usability study on the subject but I would imagine my Grandmother wouldn't know what to do here. Enter the PRG pattern. What is the PRG Pattern? While the PRG pattern isn't knew, there isn't much out there on it for the .NET community. PRG stands for "Post/Redirect/Get", I'll let Wikipedia explain the rest: instead of returning an HTML page directly, the POST operation returns a redirection command (using the HTTP 303 response code (sometimes 302) together with the HTTP "Location" response header), instructing the browser to load a different page using an HTTP GET request.

But How? I'm going to use an Login function as an example. 1: /// <summary> 2: /// Displays the login view (the form to enter credentials) 3: /// </summary> FileHelpers Library 2.0 - Marcos Meli. Application Block - ASP.NET Website Maintenance - The Code Proje. Introduction ASP.NET websites would eventually be deployed on a production server. The deployment has been fine tuned to deploy a single page with a single page assembly which has already been incorporated since VS2005. As the application grows, so too the number of web pages. Invariably, bugs or crashes occur. After deployment, there should be ways to gracefully maintain this website.

Background While there are other crude ways to maintain an ASP.NET website, I felt this needs to be more structured. This article addresses this issue, and is primarily meant for architects, technical leads, and configuration managers who care for graceful maintenance of the Web application. This article uses an HttpModule to perform this task along with custom web.config configuration settings. Using the Code This has to be used only on Live (Production) or Quality Assurance (Testing) environments, and never on a Development environment.

Website Watcher Module Configuration Settings Maintenance Pages History.