Summary 23.04.2009

24/04/2009

ASP.NET MVC

Phil has a great post showing how we can have scripted views stored in database. Phil’s example avoids the classic approach using VirtualPathProvider and it can be run in medium trust.

As usual, Scott Hanselman has a great article on how to integrate ELMAH with ASP.NET MVC.

Lately, there is a debate on some performance issues with HtmlHelper.RenderPartial method. Simone wrote about it and Kazi Mansur Rashid continues Simone’s analysis.

Jimmy Bogard has a great post about tips on development with MVC. I highly recommend you to read it!

Design Patterns

Ayende started a few days ago an interesting talk about the repository pattern and its use. Between Greg and Ayende started a debate on each one’s blog. Greg says that the repository pattern offers a clean separation like a boundary and it easily facilitates the replacement of the persistence framework. He supports Ayende’s idea that Query objects should be used instead of named query methods as they are not SOLID as the repository’s interface is modified each and every time a method is added or changed. On the other hand, OO principles should be followed IN GENERAL but as the repository can be seen as a boundary, he acknowledges the fact that by having a repository with query named methods, the replacement of the persistence mechanism would be much easier as everything is described in the repository’s interface. With query objects we would have additional concerns with building dynamic criteria. Greg recommends command and query separation and the use of a separate layer for querying purposes only leaving the repositories concerned only with commands.

Ayende tries to clear things out and I think he did a great job. I think that both of them where speaking about things in different contexts each one being right in his own context.

The bottom line in my opinion is that one should not use the repository pattern unless a layer/tier boundary is needed. This is the case when for example one might think of changing the persistence mechanism. Otherwise, the persistence frameworks out there have become smart enough to be used directly.

Architecture

Anne Epstein talks about multi tenant applications where multiple databases are used saying that Ayende’s opinion from a few months back was correct.

DDD

Howard Dierking gives a sneak peak at his editor draft notes on the June articles about Aggregates of MSDN Magazine.

Yves Goeleven talks about CQS (Command Query Separation).

Entity Framework

Wriju wrote a nice post on how to attach a detached entity.

Muhammad wants to propose a new approach for eager loading in EF using a class similar to DataLoadOptions from LINQ to SQL.

.NET 4.0

In complement to my previous post on resources for learning the new features available in .NET 4.0, Daniel Moth just pointed out that Eric Eilebrecht has started a series of posts on ThreadPool improvements in CLR 4.0.

MSDeploy

A few days ago, I have linked to the MSDeploy team’s announcement about the RC release of MSBuild. Today, the team has posted a new article about the changes in the release.

Geneva

Vittorio Bertocci posted to excellent articles on how to write an ASP.NET Membership website using the Geneva framework. You can find the first part here and the second one here.

kick it on DotNetKicks.com


Summary 17.04.2009 – 19.04.2009

21/04/2009

Visual Studio

Another great podcast on Windows Workflow 4 is available on Channel 9.

Design patterns

Oren has posted a very nice article on the repository pattern which is used as a singleton in many cases due to lack of understanding. Oren advocates for using directly NHibernate instead of using the additional repository pattern. The problem in question here is the fact that the repository contains methods such as FindXXX which according to DDD principles should belong to query objects and that repositories should deal only with domain state changes. Udi Dahan wrote an article on whether to use query objects or methods in the repository two years ago. Very often the repository is used for achieving persistence ignorance in a DAO fashion. In DDD, the repository has the precise role of maintaining the integrity of aggregate roots.

Following his above mentioned post, Oren wrote another one explaining how mocking NHibernate can be achieved when taking the above mentioned approach where repositories aren’t used.

Justin Etheredge replies to Oren’s approach which uses the Query Object pattern considering that allowing an IQueryable<> from the repository would allow the upper layers not only to do presentation concerns actions such as paging and sorting but also modifying the query itself.

Architecture

I think that Oren’s posts on the fact that the DAL goes all the way to UI, coins the exact problem with the classical three layers applications that we encounter very often.

ASP.NET MVC

Kobe tries to be the starter kit from Microsoft for building ASP.NET MVC applications. So far, it has failed. Go and check my previous post to get all the details. Oren has also a response to Phil which leads him to the same conclusion as the one from by previous post:

Stop shipping official guidance package without involvement from the community.

Application Lifecycle Management

David Chappell announces a series of posts on Application Lifecycle Management without having the focus on Microsoft’s products an technologies.

NHibernate

Oren Eini has another posts on named queries and one-to-one mapping.

Peter Bromberg wrote a nice article on Fluent NHibernate automapping.

Gabriel Schenker has published his second article on Fluent NHibernate. He also has a nice article on 2nd level cache and multiple databases.

Velocity

If you are starting with Velocity, you might want to check Andrea Colaci’s overview.

The Velocity team gives a short explanation on regions and high availability and a tip on how client performance can be increased.

Azure

Rob Bagby posted the third part of his tutorial on building a Azure shopping cart.

TDD

Brad Wilson has a very interesting post where he chooses Design by Example instead of TDD.

Internet Explorer 8

The JScript blog wrote on how JScript versioning works in IE 8.

RIA Services

Fredrik Normen has two interesting posts on RIA having in mind Silverlight.

MS Deploy

The RC1 release of MS Deploy is available.

Sharp

After finishing his ASP.NET MVC series, Luis Abreu started to talk about the S#arp framework. The first two posts present the BaseObject class and value objects.

Entity Framework

Simone Ince has an interesting series on auditing presenting the types of auditing and how data auditing works with Entity Framework and the auditing implementation.