Archives
-
MEF + Factories Using an Export Provider
Taking a different approach to resolving factory exports within MEF by using an ExportProvider (new in preview 3 drop) over using a part catalog. This approach ultimately leads to a cleaner and simpler solution. Read more …
-
MEF + Factories
Lately I've been really digging into MEF and have been looking at it's pros & cons, ease of use, extensibility, and the simple DI container that it can provide. I'm not going to give an overview of MEF, as others have done so already. What I am here to show off is a concept that may prove useful for some applications. Many of us use a DI container in very simplistic ways, as well as registering injection strategies during type resolution. Read more …
-
ASP.NET MVC Preview 4 Finds
I’ve went through the ASP.NET MVC Preview 4 source and found some interesting finds that will help you do work more easily. These 6 finds are just the tip of what I’m sure is included in this drop. (Read more…)
-
Plea for Help: WCF 404 Error
I’m putting out a plea for help. For some odd reason, we have a WCF service (running in IIS 6) that’s using streaming and BasicHttpBinding that will return a 404 error message every time it’s called from our client. Hitting the same URL on the box itself through IE renders the WSDL just fine. If you have seen this issue, please contact me. We’ve been struggling with this issue and have yet to find a resolution. BTW, it works great on another web server that is configured the same, and we’ve looked at all of the verbose logs WCF can give us. Ultimately, we’re seeing the message being sent from the client, and a 404 in the IIS log, but nothing on the server logging. Thanks!
-
MVC Post-Redirect-Get Sample Updated
ASP.NET MVC Sample for using the Post-Redirect-Get pattern updated to the MVC Preview 3 bits. Showcasing some newer functionality that makes the pattern more simplistic.(Read more…)
-
Using SubDataItems and View User Controls in ASP.NET MVC
-
RedirectToAction Nasty Bug in ASP.NET MVC Preview 3
-
Lambda Based RedirectToAction Sample Updated to MVC Preview 3
Utilizing Lambda expressions, make the RedirectToAction method much easier to use, read, and refactor! This update took the original sample and it now works with the MVC Preview 3 bits. (Read more...)
-
ViewData "dot" Notation Expressions in ASP.NET MVC
Here's something very cool I just found in the ASP.NET MVC Preview 3 bits, you can specify, what I call, "dot" notation expressions on your view data. With the new ViewDataDictionary you can now use the "dot" notation expressions to get access the same value as using the safely typed Model. (Read More...)
-
ASP.NET MVC - Localization Helpers
Learn how to easily use localization within an ASP.NET MVC application utilizing similar methods to that of ASP.NET resource expressions. I show 3 different approaches to using localization within your application. (Read more...)
-
ASP.NET MVC: Expression Based RedirectToAction Method
Since the introduction of lambda expressions within the .NET framework, and it's extensive use of them within ASP.NET MVC, I've grown extremely fond of working with compile time errors that lambda expressions gives us. You've seen the ASP.NET MVC team build out a set of ActionLink<T> methods that enable you to specify an expression that will be compiled like the following (Read more...)
-
ASP.NET MVC: UI Validation Framework Update
I've taken some recommendations regarding the MVC UI Validation framework I originally posted about, which is available within the MvcContrib project. I'm still working on future advancements like attributing your model, but I did make a significant step forward ensuring both client and server side validation is successful. With some simple changes to how you are generating your validators, you can easily achieve this new functionality. (Read more...)
-
ASP.NET MVC - Extracting Web Resources
One nice feature that ASP.NET added in the 2.0 feature set was the ability to embed resources directly within an assembly and then later extract them through a separate Http Handler. You've notably saw this by all the WebResource.axd calls. If you're building a ASP.NET MVC view, you have two ways of extracting web resource urls. Find out how to do this in your view and through a new extension method. (Read More...)
-
ASP.NET MVC - Living in a Web Forms World
When developing ASP.NET MVC applications, most examples or sites have shown you starting from complete scratch. This is all and well if you have the time to completely re-write an existing application for 6+ months or have started a v1 product. Right, in the "real-world" the former rarely happens and if your a developer wanting to stay on the bleeding edge, introducing a new architecture into an existing ASP.NET application is fairly tedious. From converting existing pages, supporting legacy routes, and possibly the lack of allowing multiple forms all prove to be a challenge. (Read More...)
-
ASP.NET MVC - Using Post, Redirect, Get Pattern
The ASP.NET MVC pattern tends to lead itself into a more simplified and "true" HTTP experience by re-introducing patterns that have been lost, or at least, not followed in many years. One such pattern is the Post, Redirect, Get (PRG) pattern in which it is "to help avoid duplicate form submissions and allow web applications to behave more intuitively with browser bookmarks and the reload button" (Read More...)
-
ASP.NET MVC - Legacy Url Routing
Recently, we've been converting over a lot of our ASP.NET Web Form pages to use ASP.NET MVC. While this is no small feat by itself, the underlying problem of having a new Url structure in the site while still supporting legacy Url's was necessary. The idea, is that you hit a page that no longer exists, and you get redirected to the appropriate controller & action within MVC.
-
ASP.NET MVC - ActionResult... The Good & Not So Bad
I'm thoroughly enjoying the new ActionResult feature the ASP.NET team introduced into the "refresh" of the Preview 2 bits... or whatever they're calling it now :) Introducing this has increased productivity regarding testing the results of a controller's action. Here's a quick summary of the different types... Read More
-
Moving Blog and News to Come!
Just a note for anyone still subscribing, I'm moving my blog to my own host. You can continue reading at http://blog.eworldui.net or if you'd like to update your feed, point it towards http://feeds.feedburner.com/eworldui. I'm going to start blogging again, it's been too long! I've got some exciting news coming up that I can't wait to share, so stay tuned for my announcement!