Articles : Page 1 of 2

  • Series of webcasts about ASP.NET MVC 3 (in Italian)

    Series of webcasts about ASP.NET MVC 3 (in Italian)

    Oct 11
    04

    After a long gestation period, today it was published on Channel9 a series of webcasts about ASP.NET MVC 3. This webcasts Ugo Lattanzi, a fellow ASP.NET Italian MVP, and I recorded (in Italian) covers the following topics: Introduction to the new features of ASP.NET MVC 3 Razor, the new view engine of ASP.NET MVC 3 How ASP.NET MVC 3, SQL CE 4 and EF CodeFirst work together Introduction to IoC/DI and how to use Ninject inside ASP.NET MVC 3 They are in Italian, but, especially the l...


  • Dependency Injection With ASP.NET HttpModules

    Dependency Injection With ASP.NET HttpModules

    Jun 11
    03

    At the risk of getting punched in the face by my friend Miguel, I’m not afraid to admit I’m a fan of responsible use of dependency injection. However, for many folks, attempting to use DI runs into a roadblock when it comes to ASP.NET HttpModule. In the past, I typically used “Poor man’s DI” for this. I wasn’t raised in an affluent family, so I guess I don’t have as much of a problem with this approach that others do. However, when the opportunity for something better comes along, I’ll tak...


  • Deeper in .NET Code and Slide Deck

    Deeper in .NET Code and Slide Deck

    Mar 11
    19

    I had a great time in Milwaukee. Thanks to Dave Palfrey, Scott Isaacs and the rest of the Milwaukee .NET User Group for their generous hospitality! You can find my code samples and slide deck here. As always, if you have any questions concerning the material, don't hesitate to contact me. ...


  • Deeper in .NET Code and Slide Deck

    Deeper in .NET Code and Slide Deck

    Mar 11
    19

    I had a great time in Milwaukee. Thanks to Dave Palfrey, Scott Isaacs and the rest of the Milwaukee .NET User Group for their generous hospitality! You can find my code samples and slide deck here. As always, if you Continuereading...


  • Dependency Injection in MVC 3–with Views

    Dependency Injection in MVC 3–with Views

    Jan 11
    24

    If you have not read the first post in this series, please do so as these samples build on that post. At first, it may appear that MVC 3s Dependency Injection is not all that different than what we had in MVC 1 and 2. The fact is, MVC 3 gives us a lot more flexibility, and for sure, Dependency Injection is a first class citizen in the ASP MVC Framework. Using the Unity IoC Container, lets take a look at how views can take advantage of Dependency Injection. View Page Class public class ...


  • Dependency Injection with ASP MVC 3–Distilled and Simplified

    Dependency Injection with ASP MVC 3–Distilled and Simplified

    Jan 11
    24

    One of the key new features in the ASP MVC 3 framework is how the framework interacts with your Inversion of Control (IoC) Container. Note: the specific behavior of the IoC containers themselves has not changed. The only thing that has changed is how the MVC 3 framework interacts with the IoC Container. In MVC 1 and 2, we had to create our own Custom Controller Factory. In MVC 3, your still free to do so. However, when you see how MVC 3 generically works with IoC containers, when upgrading t...


  • Moving containers beyond testability

    Moving containers beyond testability

    Sep 10
    21

    In Derick Bailey’s two recent posts on containers, I found a lot of déjà vu in his sentiments. In fact, it’s quite similar to the issues that I was running into a while back, trying to move beyond top-down design. I had become a little disenchanted with my container usage. I created top-level classes, abstracted dependencies in the form of interfaces, and then filled in implementations. It works well for test-driven development, as an interface in C# is still the easiest way to provide the s...


  • A quick primer on .NET web frameworks

    A quick primer on .NET web frameworks

    Aug 10
    25

    I’ve received quite a few questions in the past months and year about web frameworks for .NET (some confusion around the difference between WebForms, ASP.NET MVC, FubuMVC, ASP.NET in general, etc). So I thought I’d make a quick blog post giving some real basic explanations of these frameworks, what the intended audience is for each, and what the strengths and weaknesses are of each. Note: This is not an exhaustive list. It does not include all the frameworks that are out there. There are man...


  • Dependency Injection in ASP.NET MVC: Final Look

    Dependency Injection in ASP.NET MVC: Final Look

    Jun 10
    02

    Other posts in this series: Controllers Contextual controller injection Filters Action Results Views In this series, we’ve looked on how we can go beyond the normal entry point for dependency injection in ASP.NET MVC (controllers), to achieve some very powerful results by extending DI to filters, action results and views. We also looked at using the modern IoC container feature of nested containers to provide injection of contextual items related to both the controller and the vi...

    • MVC2
    • DependencyInjection

  • The religion of dependency injection

    The religion of dependency injection

    May 10
    20

    A quick way to explain a set of differing opinions is to label it as “a religious argument”. In a post about using MEF on NerdDinner, Scott Hanselman showed an example on using poor man’s DI versus regular DI. Now, the post wasn’t about that topic, but more on how to integrate MEF with ASP.NET MVC. I do get rather annoyed at comments like this however (emphasis mine): The second constructor takes an IDinnerRepository, allowing us to make different implementations, but the default constructo...