I realize it has been quite some time since I last posted anything. As with everyone else, I am extremely busy and have been for a long time.

What is the Darkside?

I bought a MacBook Pro. There. I said it! I feel dirty for saying it.

This is not a something that I under took lightly. I've been thinking about doing this for several years, but I really couldn't justify it until recently. A few months ago I unexpectedly parted ways with the company I'd been with for 3 years. This lead the opportunity of opening my own consulting business and to become my own boss. With this business comes a new attitude that makes me not want to be tied exclusively to the MS sandbox as I have for more than a decade. But you say that I did not need to abandon Windows, right? Correct, there are many Windows equivalents for Mac; Lamp development stacks, Ruby on Rails stacks, etc. 

For me the decision came down to the fact that I wanted to be able to develop many different types of applications on many different types of platforms. By using the MBP, I am able to use those tools in their best of breed environments using quality hardware in a top notch product. 

What makes the MBP so much better?

I just bought an Alienware M17x about 6 months ago. I knew it was going to be heavy, I also thought it would be top notch quality. Lets start with the fact it weighs 12 lbs, then mention the fact the power supply is at least 3 lbs. It runs super hot (on stock factory settings), it is load. It is also fast, powerful, and has great graphics. What it does not have is a quality fee to it. It just feels flimsy and plastic. But at the end of the day it was not what I needed, I could not run everything I wanted without hacks.

The MBP on the otherhand is

  • High performance
  • Light - 6.6 lbs
  • Light Power supply
  • Awesome graphics
  • Runs much cooler
  • Can run Windows via Bootcamp or VMs (I chose VMWare Fusion).
  • Made from a solid chunk of aluminum

Some of you at the point might be asking yourself why this is such a big deal, big enough for me to post it. Well simply put, I view Apple in the same light some people view Microsoft or Google. I got rid of my iPhone for an Android (now using a Samsung Note). My wife has the iPad, I have a Samsung Galaxy Tab 10.1.

What this does not mean

I will not be jumping ship and abandoning MS or .NET. MS.NET is the core of what I do and the core of my consultancy. I will not become a mindless Apple fan-boy, don't we get enough mindlessness with Politics and Religion? 

What did I get?

I ended up getting a 17" MacBook Pro.

  • 2.5Ghz Intel core i7
  • 8 GB RAM
  • 750GB 7200RPM HDD
  • 17", Anti-glare, UXGA

 A short while back I was asked if I would be interested in reviewing Packt Publishing's ASP.NET MVC 2 Cookbook and since it was right up my alley, I accepted. So over the past 6 weeks or so, I've been reading the book as I've gotten a chance. While the book covers ASP.NET MVC 2, most of it is still quite relevant to MVC 3. If you have already gotten started with ASP.NET MVC, but are not a power user, this book is a must have in your collection. I've been using ASP.NET MVC since Guthrie first announced it and I learned a few tricks as well.


It can be said that Cookbook formatted  books are becoming more popular with readers, especially those already semi-familiar with a subject. I'm a fan of them also as I feel they cut out the basic bits that a true beginner would need and start off at an intermediate level. The book covers the following:

  • Working with Views
  • Working with Actions
  • Routing
  • Master Pages
  • Working with Data in your View
  • Forms
  • Simplification of Complex Applications
  • Validation
  • Data Access
  • Application, Session, Cookies, and Caching

What I liked about the book was the use of a Dependency Injection framework, in this case StructureMap, to help ease testibility. The authors were even careful to point out that they were using it for testibility, not to switch out implementation later. What I did not like was the heavy use of ViewData within the book. Personally I try to avoid the use of ViewData unless absolutely necessary, preferring to use Strongly Typed views instead. Another thing I would've liked to seen is the use of ViewModels and FormModels. ViewModels are used to send only the data needed to the view. This does not mean sending a fully populated object graph, only the pieces of the graph that are needed. FormModels are used to deliver the data back from the view. You use this to populate new entities, load and modify existing entities, and for Validation.

Hidden Gem

The hidden gem of this book is a little known project named NBuilder. I had not heard of this project until shortly before reading the book, thanks to a tweet from a friend. The book makes heavy use of NBuilder in it's samples, especially in mocking. If you are not using NBuilder in your current testing, I would highly suggest you take a look at it. It makes adding sample data extremely simple.

Overall I really liked the book and thinks it is worthy of a spot on your bookshelf if you are working with ASP.NET MVC. Hopefully the authors will update the book to reflect changes in MVC 3.

 One request we received when NuGet first came out (as NuPack) was for Sharp Architecture to release a package. We all agreed that this would be a good way to deliver updates in the future as it meant the end user did not have to download either the source or a template just to extract the assemblies.

Well the wait is over, today we released a NuGet package for Sharp Architecture 1.9.6. The package has the following dependencies:


Don't worry about all of those dependencies, when you install the package, you can choose to use the -IgnoreDependencies command-line argument to only reference SharpArchitecture. 

You can find the project by using the package manager console:

And install it using the following command:

Once everything is installed, you will notice that a new folder has been created at the solution root of your Sharp Architecture folder structure.

This folder will contain the following packages in it:

I do have a couple of other packages installed, MvcScaffolding for one, so you will see some packages that are not referenced by Sharp Architecture. Please let us know if you have any problems with the package. It is very much a work in progress.

 I was recently given the opportunity to review the latest NHibernate book, NHibernate 3.0 Cookbook by Jason Dentler. If you do any NHibernate development, you need to have this book in your collection. The content is well thought out as well as organized.

I started out with NHibernate in January 2008,  kicking and screaming. Part of my issue was the use of XML everywhere, coupled with seemingly little to no documentation. Look at us now, oh have the times changed. We now have six books dedicated to nothing but NHibernate, as well as a very active mailing list. The latest book on NHibernate is NHibernate 3.0 Cookbook by Jason Dentler, published by Packt Publishing. The book includes 70 Recipes which generally build on previous recipes or earlier boiler-plate code.

 Jason does a great job with explaining what the recipe is going to do, showing the code needed for the recipe, then explaining in detail what each piece is doing. This style of writing helps users of all skill level understand easily what is happening and gets new users up and running quickly. The book starts off with the basics, but as I later found out, if your an experienced NHibernate user, you should still read these chapters as code from them will be used in later recipes. You start by creating mappings with several different technologies, ranging from Nhibernate XML files to using ConfORM. Once you've mastered mapping, you are introduced to Configuration and Schema. This again is another chapter every user should read, no matter what your experience level is with NHibernate.

 Chapters 3 through 8 cover the meat and potatoes of the NHibernate. They cover everything from Sessions and Transactions, Testing, Extending NHibernate, and using various NHibernate Contrib projects. One section I found particularly was that on Sharding Databases for performance.

 I would recommend this book for NHibernate beginners as well as experienced NHibernate users. There is enough information in the book to thoroughly cover NHibernate across all experience levels and not feel like it was targeted at only one group or the other.

The S#arp Architecture team is proud to announce the release of version 1.9.6. This version is a maintenance release to address a few short comings of the 1.9.5 release. These include:

  • Added Component registration for the Default Session Key Provider to help with multi-tenancy
  • Addressed some bad references within the Templified solution
  • Updated MvcContrib dependencies to the official release (
  • Added missing *.debug.js files to *.Web/Scripts folder 
If you've downloaded 1.9.5, please download this latest version instead. You can download the files from github: https://github.com/sharparchitecture/Sharp-Architecture/downloads
If you only need the binaries, you can download those from the location just mentioned.

 The S#arp Architecture team is proud to announce the release of version 1.9.5. This version has had the following changes:

  • Upgraded to MVC 3 RTM
  • Solution upgraded to .NET 4
  • Implementation of IDependencyResolver provided, but not implemented

This marks the last scheduled release of 1.X for S#arp Architecture. The team is working hard to get the 2.0 release out the door and we hope to have a preview of that coming soon.

With regards to IDependencyResolver, we have provided an implementation, but have not implemented it in the MVC project. There is a fatal flaw with the IDependencyResolver that makes using it with Castle Windsor not recommended. This stems from the fact that while it implements a Create method, it does not implment a Release method. While the MVC teams states the dependency resolver with call Dispose on any object that implements IDisposable that it is tracking, it does not call this on any children of that object that might have been create also. This can lead to memory leaks and poor performance. While there are ways to program around this, we do not feel that it is worth HACKING a solution to a problem that should not exist in the first place. It is our sincere hope that the MVC team will address this issue in the near future, but given the fact they have know about it since MVC 3 Preview 1, we are not holding out breath. You can read more about the issue here and here.

To download the latest version, please get it from https://github.com/sharparchitecture/Sharp-Architecture/downloads.

Packtpub has released 6 new Microsoft books and is celebrating it with Microsoft Monday. Find out more details by going to https://www.packtpub.com/article/microsoft-books

Sharp Architecture 1.9 has been released. This version upgrades Sharp Architecture to use the latest.... [Read More

 I was recently contacted by Packt Publishing in regards to reviewing their new NHibernate 3.0 cookbook written by Jason Dentler. Over the next few weeks I will begin reading and evaluating the book. My plan will be to make several posts about parts of the book as I get to them, along with one final post giving the overall review.

 I would like to thank Likesh Bhambhwani for reaching out to me and extending this offer. I look forward to reading the book and learning about the great new features in NHibernate 3.0. As most of you have heard, the next version of S#arp Architecture will be based on NHibernate 3.0.

As with most open source projects, S#arp Architecture relies on its user base to for support, ideas, bug fixes, etc. We've been very fortunate to have a passionate user base that really fosters a sense of sharing. In the past few months 3 community members in particular have stepped up to help out with code, answering questions on the group and on StackOverflow, and documentation. We have decided to offer these gents positions on the S# team.

Please join us in welcoming Geoffrey Smith, Seif Attar, and Dan Smith to the S# team.

 Geoffrey Smith

 Geoffrey offered to help out with documentation and UI. He will be joining the main S#arp Architecture team and lending a hand with the 2.0 rewrite. One of his first tasks will be to spice up the Northwind sample. If you have ideas of items you would like to see in a Kitchen sink type sample, let him know. Geoffrey is relatively new to the .NET / C# world, coming from a Java / Python background. He most recently used S#arp Architecture and Lucene.net to index and search a large document repository. As a guilty pleasure, he enjoys working with the Arduino-based ArduPilot to create fully autonomous drones.

Seif Attar

Seif will be joining us in the role of the S#arp Architecture Contrib project lead. He has been developing software for 8 years, mainly using C#. Being a Linux user and free software advocate, he was very happy to find out about the Alt.Net movement as he could finally combine his work with his sense of community. He has been using S#arp Architecture and learning from its community since early 2009. He is active on the mailing list as well as StackOverflow.

Dan Smith

Dan is joining us on the S#arp Architecture Contrib team. He is currently the lead programmer for a medical device sales and training company in Connecticut. He uses S# day to day at work along with techniques he has learned from the WCHM project using AutoMapper and MEF.


Both Seif and Dan will be involved with the 2.0 rewrite on the Contrib as well as the main project. We know the community will join us in welcoming them

More Posts Next page »