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:
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)
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
Agile Cheerleading: Beyond ROI
First, as a point of reference, the agile manifesto is simply a set of four principles.
- Individuals and interactions over processes and tools
- Working software over comprehensive documentation
- Customer collaboration over contract negotiation
- 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:
- The BBC http://www.infoq.com/presentations/Scrum-bbc-newmedia
- Netflix http://www.uie.com/articles/fast_iterations/
Fun Facts:
- It would be wrong to implement Agile across the board without having our own case study.
- 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
- 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.
- List of companies using Scrum: http://tinyurl.com/ccaae9
- Agile development in an ITIL/CMMI based IT organization is not impossible. Here is a paper about CMMI and Scrum. http://tinyurl.com/da99m4
- Great video – Scrum in under 10min. http://www.youtube.com/watch?v=Q5k7a9YEoUI
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.
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