Archives

Archives / 2008 / January
  • Book Review: Build Your Own ASP.NET 2.0 Web Site Using C# & VB, 2nd Edition

    Over the last few weeks I've been working on finishing the latest book from SitePoint on ASP.NET, "Build Your Own ASP.NET 2.0 Web Site Using C# & VB, 2nd Edition".  The authors did a great job on this book.  It's fit for a beginner and does a wonderful job of teaching the basics of getting started in ASP.NET.  Many books skimp on the things you need before coding can begin, or they leave it out completely.  Here you'll find plenty of help and suggestions for using the most modern tools available to a new ASP.NET developer.

  • Book Review: ASP.NET Data Presentation Controls Essentials

    Not long ago I received an email from someone at Packt Publishing asking if I would review their latest ASP.NET book.  I gladly accepted as this is something I'd like to do more of.  I have another book on my bedside table waiting for a review and I'm in the middle of performing a technical edit of a book due for publication in July.  I'm thoroughly enjoying this kind of work and hope to continue it.  More on that in a future entry I imagine.

  • Strongly-Typed Session in ASP.NET

    Session state is a very useful tool for an ASP.NET developer.  I use the Session object in every project.  I use it to store information related to the current user that I need quick access to throughout their visit.  It's important not to overuse the Session object but rather to store quick bits of information that need to persist over a single, or multiple, post-backs.

  • Microsoft ASP.NET MVC

    By now we've nearly all heard of the ASP.NET MVC framework available in CTP form. The Model View Controller architecture has been around for quite some time but more popularly in the desktop world. Java has seen its share of MVC web frameworks over the years and just a few years ago Ruby on Rails crashed the party with its own MVC implementation for a rapid development environment. Once Ruby on Rails hit, all of a sudden MVC was all the rage. It wasn't long before these frameworks became available as extensions for ASP.NET. Microsoft has now joined the party with an official feature due towards the middle of 2008. In the last few weeks the ASP.NET team has shipped a CTP release for feedback and to get people started with the technology. I've looked at it quite a bit myself and I'm loving what I've seen thus far.

    There are a number of reasons to be excited about this framework. Some of the biggest are separation of concerns, testability, and performance.

    Separation of concerns allows you, the developer, to create self aware components that don't heavily depend on another un-related component to function. Think about removing the logic of your postback event in ASP.NET 2.0. Take that code and move it somewhere more centralized that will be used by similar web views. That concept is the relationship between the Controller and the View. The View should simply display something while the Controller should tell it what to display. The Model describes the data and is used by your Controllers and Views as something I like to think of as a transitional object.

    Testability is a major concern with most developers these days. Currently automated unit testing is nearly impossible with the current Web Forms architecture present in ASP.NET. Sure, you can unit test your data and business layers. However, once these layers reach the presentation layer, testing expected behavior just isn't possible in an automated fashion. The ASP.NET MVC framework allows testability through the separation of concerns along with the way a Controller will dictate which View is rendered. That functionality allows for easy testability.

    The final reason I'll discuss here is performance. ViewState is a piece of magic all too often by the Web Forms architecture and simply is a bloated method for persisting data across HTTP requests. The ASP.NET MVC framework will remove this dependency and will provide better performing environment for our web applications.

    I'm in the planning stages of a new project and really investigated whether I should begin ASP.NET MVC development. Since it's so new I'm not going to risk it but I encourage everyone to keep an eye on this project. I'll definitely be doing that and will be all over a release closer to RTM.

    Resources:
    ScottGu - MVC Tag
    Phil Haack - ASP.NET MVC PM

    kick it on DotNetKicks.com