Archive for April, 2009

Entity Framework, Aggregate Root, One-to-Many & DDD

I’m really digging the DDD Aggregate root design pattern and thought it would be good to create an example of using EF to pull a root from the persistence layer (database).

My database:

image

In my little database prjects have releases and stories. releases have sprints and stories and stories have tasks. My root is a project.

 

My model (EF)

image

A method for pulling the root:

Its important to note that child objects must be included in the query. ex: Include("Stories.Tasks") will get the tasks.

All the projects

Dim _entities As Entities.EntityFrameworkEntities = New Entities.EntityFrameworkEntitiesReturn
_entities.Projects().Include("Releases").Include("Stories").Include("Stories.Tasks")

A specific project.

Function GetById(ByVal Id As Integer) As Entities.Projects       
Return _entities.Projects().Include("Releases").Include("Stories").Include("Stories.Tasks").Where(Function(p) p.ProjectId = Id).FirstOrDefault
End Function

Tags: , ,

Thursday, April 30th, 2009 DDD, Entity Framework No Comments

Agile Cheerleading: Beyond ROI

First, as a point of reference, the agile manifesto is simply a set of four principles.

  1. Individuals and interactions over processes and tools
  2. Working software over comprehensive documentation
  3. Customer collaboration over contract negotiation
  4. Responding to change over following a plan

Scrum, LEAN, BDSM and XP are methodologies that are designed to help organizations become “Agile”. Each methodology consists of organizational practices and tools.

It’s rather hard to put a concrete number on the Scrum ROI without executing two simultaneous projects with one using an agile methodology and the other using a traditional methodology.

It is also important to note that ROI is not the only benefit of agile methodologies. Besides ROI, Risk Management/Mitigation is probably the most important advantage of agile methodologies.

With that being said, here are some case studies and other fun facts about Agile and specifically Scrum.

Case Studies:

Fun Facts:

  1. It would be wrong to implement Agile across the board without having our own case study.
  2. Agile is not Cowboy Coding
    • There is as much, if not more, process around Agile/Scrum.
    • Ken Schwaber’s, co-creator of Scrum, website is called: Control Chaos
  3. Microsoft and Agile
    • The P&P team from Microsoft, the customer support team that is designed to guild companies developing products using Microsoft software and technology, recommends Agile/Scrum
    • Visual Studio Team System – the next version UP from Visual Studio Professional – has built in support for agile project management.
    • Microsoft Press has released many books on agile project management with Scrum.
  4. List of companies using Scrum: http://tinyurl.com/ccaae9
  5. Agile development in an ITIL/CMMI based IT organization is not impossible. Here is a paper about CMMI and Scrum. http://tinyurl.com/da99m4
  6. Great video – Scrum in under 10min. http://www.youtube.com/watch?v=Q5k7a9YEoUI

Tags: ,

Wednesday, April 22nd, 2009 Agile, Scrum No Comments

Kobe: My response to the response.

Let me start off by saying I am so happy with the “New” Microsoft. An engaged Microsoft, an open Microsoft.  So to the Kobe team I say “Welcome to the real world”.

There are enough people writing about the amazingly horrible code. I’m upset with the response from the team. The response, at first glance, seems to acknowledge there is a problem and that they will fix the Kobe code.

Then I read it again…

This post is defensive and response laden with manager speak for “fuck off”. More so, they don’t even acknowledge a problem with the Kobe code!

The sample app is not a "reference application" in the context of code completeness. A "sample app" and a "reference app" are quite different in the context of code completeness, and we do not claim Kobe to be a reference app in this context.

Oh!, I am so sorry, I thought it was a "reference application" now that I know its a "sample app" all is right in the world. FAIL. What is that code a sample of anyway? After looking at the code and reading the numerous community responses its quite easy for me to say.

The Kobe code is a sample of how NOT to do ASP.NET MVC

If we now have the same understanding of the word sample; then I agree; Kobe is a sample.

Now, I am aware that Rob and the Scott are stepping in to clean this up…Oxite déjà-vu. But I need to make one final comment about the teams acknowledgement of the problems in the code.

We will review all sumitted feedback and take action to address items within the context of the intended scope & goals of the Kobe project.

That is so so so far from an acknowledgement. This is an acknowledgement.

Tags: , , ,

Thursday, April 16th, 2009 Kobe, Microsoft, development, mvc No Comments

Html.RenderAction & object reference not set to an instance of an object

Make sure you download the MVC futures from CODEPLEX not Microsoft.com

http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471

Tuesday, April 7th, 2009 ASP.NET MVC No Comments

Search