background preloader

Architecture

Facebook Twitter

PHP Tutorial Video - Peeling the Onion Architecture of an N-Tier Application. 101 LINQ Samples in C# Asp.net mvc 4 - MVC Areas, MvcCodeRouting, both, or some other architecture. 5 reasons why you should use MvcCodeRouting. MvcCodeRouting v1.0 is out, this post highlights the library's most important features and why I believe is a must have for all ASP.NET MVC developers. 1.

5 reasons why you should use MvcCodeRouting

Convention over configuration Getting started with MvcCodeRouting in a new project, or integrating with an existing codebase, requires very little configuration, and many times no configuration at all. This is because the library recognizes that most of the time you follow the {controller}/{action} or {controller}/{action}/{id} convention. For example, let's take the MvcMusicStore application and use MvcCodeRouting on it: Calling MapCodeRoutes is the only change required. Routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute(null, "{action}", new { controller = @"Home", action = @"Index" }, new { action = @"Index" }, new[] { "MvcMusicStore.Controllers" }); routes.MapRoute(null, "StoreManager/{action}/{id}", new { controller = @"StoreManager" }, new { action = @"Delete|Details|Edit", id = @"0|-? ASP.NET MVC Plugins. There aren't many plugin solutions available for ASP.NET MVC, if you google asp.net mvc plugins you'll find many proof-of-concept on how to load views embedded as assembly resources, but few established projects.

ASP.NET MVC Plugins

Loading embedded views is only one part of the puzzle, first we should focus on routing. Routing MvcContrib Portable Areas solution to routing for plugins is a very simple one: Plugin = Area. And it works. All you have to do is: Add a reference to the portable area assembly (or copy to 'bin').Call AreaRegistration.RegisterAllAreas() on Application_Start. The problem with this solution is you are not in control of the URL space used by the plugin. With MvcCodeRouting you have complete control of the URL space used by the plugin. The baseRoute parameter specifies where you want to expose the plugin, it can be anything you want, even null, which means the plugin is exposed at the root of the application. Views. MEF in Asp.Net MVC 4 and WebApi. MEF stands for “Microsoft Extensibility Framework”.

MEF in Asp.Net MVC 4 and WebApi

If you want an overview of MEF, you can look here. In this post we will integrated MEF with Asp.Net MVC 4 and with the WebApi. First of all you need to reference the “System.ComponentModel.Composition.dll” assembly which contains the implementation of MEF. Now where are going to create a MEF controller factory. Like the name says, it will be responsible to create the controller that is requested. public class MefControllerFactory : DefaultControllerFactory { private readonly CompositionContainer _compositionContainer; public MefControllerFactory(CompositionContainer compositionContainer) { _compositionContainer = compositionContainer; } protected override IController GetControllerInstance(System.Web.Routing.RequestContext requestContext, Type controllerType) { var export = _compositionContainer.GetExports(controllerType, null, null).SingleOrDefault(); IController result; if (null !

This is the object that will be injected. ServiceStack/ServiceStack.Examples.

Multi Tenant Architecture

Stack Overflow Architecture. Update 2: Stack Overflow Architecture Update - Now At 95 Million Page Views A Month Update: Startup – ASP.NET MVC, Cloud Scale & Deployment shows an interesting alternative approach for a Windows stack using ServerPath/GoGrid for a dedicated database machine, elastic VMs for the front end, and a free load balancer.

Stack Overflow Architecture

Stack Overflow is a much loved programmer question and answer site written by two guys nobody has ever heard of before. Well, not exactly. The site was created by top programmer and blog stars Jeff Atwood and Joel Spolsky. In that sense Stack Overflow is like a celebrity owned restaurant, only it should be around for a while. Joel estimates 1/3 of all the programmers in the world have used the site so they must be serving up something good.

I fell in deep like with Stack Overflow for purely selfish reasons, it helped me solve a few difficult problems that were jabbing my eyes out with pain. Site: The Stats.