Archive for October, 2008

28 Oct 2008

ASP.NET MVC Has Changed My Life

8 Comments Uncategorized

Lately I have been neglecting my blog and not posting as often as I would have liked.  I have had some very exciting things start up, at the begining of the summer, in my life that 6 months ago I would have said “no way is that going to happen.”  These new adventures are the growing popularity of my blog, public speaking engagements, and a new book I was asked to write on ASP.NET MVC. Many of you picked up on the fact that I was writing a book based on my profile on the Philly.NET website, but I had officially announced it until this post.  Many of my friends and family don’t even known I am writing a book so feel lucky in knowning you guys are some of the first people to know.

As you can imagine writing a book is about the same as writing a detailed blog post only 10,000% harder, because a two page post now needs to be extended out in to a 600 page book that needs to flow just as easily as the 2 page post did.  Luckily for me my best friend, Al Katawazi who I have known since 9th grade, is also a pretty decent programmer from the Rochester, NY area and he agreed to help me get this book out the door by the end of the year to align with the ASP.NET MVC release.

The book is titled ASP.NET MVC Website Programming: Problem – Design – Solution, and can currently be found at the following places for pre-order:

Sorry about the lack of a book picture, I haven’t had the time to go out and get a professional photo taken of me for the cover.  That will be coming pretty soon.

The current description of the book according to the Wiley site is, which also pretty well sums up the book as a whole in my opinion:

The utility of this book will be a nuts and bolts how-to guide on creating a website using MVC.  It will solve some of the most common problems that programmers run into when creating their first application or when trying to upgrade a current application to this new technology.

The book, much like the first one, will break each section down into 3 parts: the Problem, the Design, and the Solution.  For the most part, the chapter outline will be mostly the same, because the majority of the chapters are still just as important now to web developers as they were when the book was originally written. However, this edition includes MVC updates within these chapters.

Some of the site features covered in the book and provided in the TheBeerHouse example/framework code are:

  • registration and membership system and user-selectable themes
  • content management system for articles and photos
  • polls, mailing lists, and forums
  • e-commerce store, shopping cart, order management with real-time credit-card processing
  • localization

In building and working with these features the site developer will learn:

  • Master pages, themes, membership, and profiles
  • Server-side UI controls
  • Compilation, deployment, instrumentation, error handling and logging
  • Data access
  • The MVC (model view controller) approach to separation of the site UI and presentation layer from the pluggable data access layer and business logic layer

The code for the book will be published to CodePlex probably this weekend, that is if you want a sneak peak at what has taken me away from posting on my blog for the past couple of months.

http://www.codeplex.com/TheBeerHouse

If you want to wait for the book I totally understand, because who wants to spoil Christmas by peaking at the presents.  I am just kidding, I don’t think my code can be compared to Christmas morning, but maybe the 3rd Tuesday morning of October.

All kidding aside I really have to thank Scott Guthrie, Phil Haack and the whole ASP.NET MVC, because with out the great support for this product and the fore sight of Microsoft to actually create a product that ALT.NET developers like my self have been crying out for. I wouldn’t be in this place in my life.  I never thought that an interest in a small alpha release of a product back in December 2007 would lead me to writing a book, but it has been a great ride and I only hope it continues.

I am going to continue to try and post content that is useful to other developers like myself as much as I can, but please bear with me until the end of the year when all my chapters will be written and the book will be getting ready for the presses.

16 Oct 2008

ASP.NET MVC Goes Beta (Part 2)

3 Comments Uncategorized

From what I can tell ASP.NET MVC Beta is just ASP.NET MVC PR5 with a couple bug fixes.  So the good news is that the interface has finally solidified and we shouldn’t see anymore breaking changes before the final release.

New features:

  • MvcFutures.dll is not included in the beta (as it wouldn’t be included in the final release)
  • The Beta installer installs the ASP.NET MVC assemblies (System.Web.Mvc.dll, System.Web.Routing.dll, and System.Web.Abstractions.dll) into the GAC.
  • New Simple Membership Features in the Default Project Template
  • New Filter Types for Authorization and Exception Handling
  • New Output Cache Filter
  • Changes for ASP.NET AJAX
  • Namespaces in Routes
  • New Interface for Enhanced Testability of TempData
  • ActionInvoker Extensibility Improvements
  • ViewDataDictionary (minor change)
  • ViewEngine Improvements
  • Helper Improvements
  • Controller and Filter Improvements

Bug fixes:

  • Fixed a bug in which the ignore-routes setting (created by using the IgnoreRoute extension method) affected URL generation.
  • Fixed a view engine caching bug when the application is not in debug mode (that is, when debug=”false” is set in the Web.config file). This bug occurred if different action methods in different controllers had the same name. In that case, an action method could render the view for the wrong controller.
  • Fixed a bug in OutputCacheAttribute in which cached authenticated content did not require authentication. Even though the content is cached, if it requires authentication, the user should be required to authenticate first before seeing the cached content.
  • Fixed a bug in which RenderPartial does not work when tracing is turned on.
  • Fixed a bug in the Html.TextArea helper method in which an overload was not looking in ViewData for its value when the provided value is null.
  • Fixed the OutputCacheAttribute.CacheProfile property so that it works in Medium Trust.

Update: Derik at Dimecast.net has found some things I overlooked.  Nothing life changing, just some house cleaning on the teams part.

16 Oct 2008

ASP.NET MVC Goes Beta

1 Comment Uncategorized

Wow has it really been 10 months since I first started using MVC. We have hit our first beta today. No information about what has changed, I will make sure to keep you all updated. But get it while it is hot: http://www.microsoft.com/downloads/details.aspx?familyid=a24d1e00-cd35-4f66-baa0-2362bdde0766

For everybody who hasn’t heard of MVC, how couldn’t you have heard about it now if you are a regular reader of my blog.  But for all the new people visiting, here is an overview:

Overview
The ASP.NET MVC Beta release provides a new Model-View-Controller (MVC) framework on top of the existing ASP.NET 3.5 runtime. This means that developers can take advantage of the MVC design patterns to create their Web Applications which includes the ability to achieve and maintain a clear separation of concerns (the UI or view from the business and application logic and backend data), as well as facilitate test driven development (TDD). The ASP.NET MVC framework defines a specific pattern to the Web Application folder structure and provides a controller base-class to handle and process requests for “actions”. Developers can take advantage of the specific Visual Studio 2008 MVC templates within this release to create their Web applications, which includes the ability to select a specific Unit Test structure to accompany their Web Application development.

The MVC framework is fully extensible at all points, allowing developers to create sophisticated structures that meet their needs, including for example Dependency Injection (DI) techniques, new view rendering engines or specialized controllers.

As the ASP.NET MVC framework is built on ASP.NET 3.5, developers can take advantage of many existing ASP.NET 3.5 features, such as localization, authorization, Profile etc.