I’ve been doing a lot of MVC2 work lately, and have been indescribably thrilled with how easy it is to write clean code with it (or at least what I consider clean code). Being able to Unit Test my Controllers and have separation from everything else is like magic. OK, maybe I am a little late to this ballgame. I discovered a very cool feature of MVC2, and that is the FilterAttribute. When reading documentation about how to ensure controller actions could only be run if the user was Authenticated, I naturally came to the AuthorizeAttribute. It was that simple! … Continue reading The Power Struggle of FilterAttribute
So my blog has become quiet again, but don’t worry! I’ve simply started pushing more of my posts toward our company blog. Check out my latest posts there: The AJAX UpdatePanel: Is it your worst enemy? Recursive Common Table Expressions And from here on out are going to be a series on .NET 4.0.
Ever since the induction of IIS 7, there came a cool new feature for developers to leverage called Integrated Pipeline. This feature in a short explanation closely couples ASP.NET and IIS more closely. It allows allows writing of IIS Modules in managed code, how neat is that? This also slightly changes the behavior of ASP.NET, such as introducing new events on the HttpApplication (Global.asax) and the event cycle. A classic example is where in Integrated mode you cannot access the current request using HttpContext.Current.Request during theApplication_Start event, which makes sense. Now for obvious reasons this can break existing applications, and … Continue reading Managing IIS Pipeline Mode for Backward Compatibility
I was recently on the ASP.NET Forums and a member was asking, “How can I figure out the encoding of text?” and that got me thinking. There should be a reasonable way to do this, right? It’s a useful thing to know. First, we need a little background on how text is encoded into bytes. Long ago, back when 64K of memory was a big deal, characters took up a single byte. A byte ranges from 0 – 255, which allows us to support a total of 256 characters. Seems like plenty, no? English has 26, 52 for both cases, … Continue reading Text Encoding (Part-1)
The MVC framework is the new “hot” thing in the ASP.NET world for developers. As such, everyone has at least one blog entry about it. So, I think it’s time I jumped on that ship. Though, I wanted to voice a few concerns with the MVC Framework, or at least how people perceive it. The MVC design pattern is by no means new. It’s been around since around 1979, and .NET is certainly not the first framework that supports the MVC Pattern, and nor is Microsoft’s MVC Project the first for .NET. Spring is a very popular MVC solution for … Continue reading MVC Framework