May 2010

Monthly Archive

The Morning Brew #610

Posted by on 28 May 2010 | Tagged as: .NET, Development, Morning Brew

Monday is a Bank/Public Holiday here in the UK, and in keeping with Morning Brew Tradition there will be no edition on Monday, with the normal posting schedule resuming on Tuesday. Have a good long weekend everyone.


  • Web Service Software Factory 2010 RTM – Hernan de Lahitte highlights the release of the Web Service Software Factory 2010, a collection of sample source code, tools, patterns and guidance for creating ASMX and WCF web services from the Patterns and Practices team
  • The SRE Preview is now available on CodePlex – Barry Dorrans announces the preview release of the Security Runtime Engine as a part of the Web Protection Library May CTP. There is no binary release of the SRE, however the team are looking for comments and feedback to help them improve the product.
  • Introducing Kiddo: A Ruby DSL for building simple WPF and Silverlight applications – Freedom Dumlao shares Kiddo, a DSL written in Ruby make it easier to build Silverlight and WPF based applications, Based on the well known Shoes library, Kiddo aims to give an abstraction over the UI creation providing a simple code interface to construct the UI.
  • Microsoft tag out of beta – Steve Clayton highlights the move from beta to full product of Microsoft Tag, their 2d, pictorial supporting, digital tag / ‘barcode’ technology providing an easy way of allowing consumers to gain access to related information.


  • Cast operators do not obey the distributive law – Eric Lippert looks at an example, inspired by a StackOverflow question, which shows how the cast operators do not follow the distributive law in the way that the multiplication operator does
  • Violations Of The"Tell, Don’t Ask" and "Don’t Repeat Yourself" Principles? – Derick Bailey looks at some examples of his own code where he feels that he is violating two of the often cited principles, asking if he actually is, and offering a possible alternative implementation, asking the community for views and other better solutions. Discussion is breaking out in the comments to this one.
  • Code Reuse is (Damn) Hard – James Michael Hare discusses Code Reuse, one of the commonly specified advantages of Object Oriented Programming’, looking at some principles which suggest reuse is possible, types of code which may be good candidates for re-use, and talks about how hard it can be to ensure reuse.
  • TTDD – Tautological Test Driven Development (Anti Pattern) – Fabio Pereira discusses an anti-pattern in testing where a test’s set up is very similar to a test’s asserts meaning that the asserts are a re-statement of the setup, which results in a lack of meaning to any result.
  • WPF Visualizer in Visual Studio 2010 – ‘jgoldb’ highlights a new debug visualizer included in Visual Studio 2010 which allows you to visualise WPF elements when debugging, providing a rendered view, and properties of the element.
  • Creating Visual Studio projects that only contain static files – Eilon Lipton shows how you can create a Visual Studio project which only contains static files, and looks at providing ‘build’ support to clean and copy the files at build time.
  • .NET Framework Targeting Error (.NET Framework Client Profile) – Janiv Ratson highlights a gotcha found by his colleagues Alon Nativ and Ziv Farjun, where you may get compile errors when working with console applications referencing other projects and assemblies due to Visual Studio 2010 Console Applications (along with many other project types) targeting the Client Profile by default rather than the full framework.
  • Non-Dom Element Event Binding with jQuery – Rick Strahl looks at using jQuery to create events on non-DOM objects which can be handled by your code, highlighting along the way an issue where jQuery has problems unbinding event handlers from Non-DOM events
  • Porting the MVC Music Store to Raven: ShoppingCartController – Ayende continues his series porting ASP.NET MVC tutorial application MVC Music store to using the RavenDB document database, in this part updating the ShoppingCartController to reflect the changes to the Shopping Cart in the last part
  • Readable and testable asynchronous execution – Andreas Hallberg shares a simple helper class which makes writing Async code cleaner, and provides an implementation which can be easily replaced for testing to remove the async nature.

The Morning Brew #609

Posted by on 27 May 2010 | Tagged as: .NET, Development, Morning Brew


  • Dynamic Type in C# 4.0: Explained in Three Lines of Code & Dynamic Type in C# 4.0: The Cool New Thing To Crap On – Evan Nagle sets out exploring the new C#4 dynamic support with a simple 3 line example showing how it can be used, comparing it to the older reflection based way of achieving similar, and moves on to look at some of the more advance uses in loading dynamic scripts and calling their functionality, duck typing, and the ExpandoObject. His follow on post answers a number of the criticisms of dynamic in C# received in response to the first article.
  • Anonymous Types are Internal, C# 4.0 Dynamic Beware! – ‘Ashic’ shows a potential confusion point with working with dynamic and anonymous types calling methods between assemblies as anonymous types are internal which results in runtime errors when calling across assembly boundaries.
  • 4 .NET 4.0 Libraries You *Should* Know Better – MEF, Reactive, Tasks and Dynamic – Anoop Madhusudanan pulls together a number of his articles from the past year which look at the 4 .NET 4 libraries he feels are the most significant and under utilised
  • SquishIt – The Friendly ASP.NET JavaScript and CSS Squisher – Justin Etheredge gives a walk through of using SquishIt, his JavaScript and CSS combining, compression and minification library, showing how you integrate it into your ASP.NET websites.
  • Testing assumptions with preconditions – Jimmy Bogard talks about the times when using a constant is the correct thing to do for environmental variable which will never change, or that represent core tenants of the application, and shows how he includes these assumptions of value in his tests as a safety net.
  • Lesser-known Multi-threaded Debugging Support in Visual Studio 2010 – ‘toub’ gives run through of some of the debugger features which help make debugging multithreaded code easier, including the DebuggerDisplayAttribute, DebuggerProxyTypeAttribute, both of use to developers in their own code, and also talks about Intellitrace and an interesting concept called thread slipping which allows the debugger to evaluate code to show results in debugger windows when locks are present.
  • URL Rewrite – Multiple domains under one site. Part II – Scott Forsyth follows on from a post back in January with the final piece in the puzzle to allow you to run distinct sites for multiple domains all within the same IIS website using the IIS URL Rewriter.
  • Deploying a .NET 4 MVC 2 Application to Windows Server 2003 Using WiX 3.5 – Rob Jarratt steps through the process of using the WiX 3.5 (build 1602) toolset to deploy ASP.NET MVC applications on .NET 4 on Windows 2003 Server
  • NoSQL with RavenDB and ASP.NET MVC – Part 1 – Shiju Varghese beings a series looking at using RavenDB with ASP.NET MVC, looking at getting the server and setting it up, along with exploring some of the common usage from ASP.NET MVC (connecting, CRUD operations, etc)
  • Porting the MVC Music Store to Raven: ShoppingCart – Ayende presses on with his porting of the MVC music store to use a RavenDB database backend with a look in this post at the ShoppingCart, discussing some OO design principles he feels the current cart implementation violates and looking at moving it over to the document database back end
  • Multi-tenant ASP.NET MVC – Introduction – Zack Owens kicks off a series on multi-tenant ASP.NET MVC applications, in this post outlining how his solution differs from a lot of the other multi-tenancy solutions and outlining his goals.
  • The Dangers Of AutoMocking Containers – Derick Bailey talks about some of the down sides of using automocking containers as a part of your testing strategy, outlining an example of the types of problems you can encounter working this way
  • Exploring Selenium 2: Introduction & Lessons Learned in Selenium 1 – Jim Holmes takes a look at Selenium 2 and shares some of his experiences using Selenium 1 for regression and functional testing

The Morning Brew #608

Posted by on 26 May 2010 | Tagged as: .NET, Development, Morning Brew


  • Sometimes tools can be overly pedantic – Bill Wagner talks about his implementation of the Dispose pattern from his book Effective C#, an how it triggers an FXCop warning, and Bill explains why this warning may be a little over sensitive.
  • The Dispose Pattern (and FxCop warnings) – Scott Dorman follows on from Bill’s post with some further discussion of why the tool is reporting this and looks at an alternative implementation which does not trigger the warning
  • IDisposable: What Your Mother Never Told You About Resource Deallocation – While we are on the subject, this Code Project article from Stephen Cleary is an old one (from 2008) but is still very relevant and discusses lots of details about resource deallocation and dispose.
  • Code Contracts Survey – The BCL Team are looking for feedback on the .NET 4 Code Contracts functionality to help them shape the future development of this feature. The questions on this survey are relevant for both users and non-users of Code Contracts, so if you have a few minutes spare help them out by completing the survey
  • Exception Handling Differences Between 32/64 Bit – Alois Kraus looks at the difference between exception handling in 32 bit and 64 bit on .NET, digging down into the differences using the Windbg debugger and SOS extension
  • Porting MVC Music Store to Raven: StoreController – Ayende continues with the porting of the ASP.NET MVC Music Store Tutorial Application to a RavenDB back end with a look at the store controller, with a look at a simple translation to the document store, and a more complex translation involving joins in the relational model
  • Extending CLR types – Thorsten shows how IronRuby allows you to extend existing .NET core CLR types in a slightly more flexible way than C# extension methods, allowing both instance and static extensions.
  • Building a Store Locator ASP.NET Application Using Google Maps API – Scott Mitchell shares the first two parts of a series over on 4 Guys which walks through building a store locator application in ASP.NET using Google Maps
  • Simplify Your Unit Tests With Automocking: Part 2 – Establishing Context – Derick Bailey continues his look at using his AutoMocking Container built using Rhino Mocks and Ninject, showing how he simplified his tests using it.


Next Page »