Sprint Planner Helper – Session 24

My detour for learning ASP.NET MVC is coming to an end. I cannot say that I fully know the framework but I have a much better understanding of it now and that will hopefully help me keep the tempo up. I have a few things left (such as editing product backlog items) surrounding the product. But I will leave them for later. I am so long back to the DDD that this project also is aiming to learn me. The third item of my user stories is a biggie and it concerns Sprints – the main object of my domain model. 3. As user I can create a sprint that represent a sprint in which some items of the product backlog is to be realized. The sprint has a goal description and a start, stop and demo-date and the team members with availability (in %), absent hours and focus factor...
Read More

UpdateModel, FormCollection and unit test

I ran into some problems with a Action Controller method that accepted an FormCollection. Inside the method I use UpdateModel to get the values from the form into the model-class. Here is a skeleton implementation of the method: [UPDATED] **Some insightful comments by Steve made me do some changes to this code. I have now updated it. The tip had to do with if the ValueProvider should be set on the Controller in the test or in the actual Action-method. I finally opted for the latter and changed it into this (significant code in **bold). \[AcceptVerbs(HttpVerbs.Post)\] public ActionResult Create(FormCollection form) { // Create ViewData ProductForm viewData = new ProductForm(new Product(), productOwnerRepository.Find().ToList());   try { **UpdateModel(viewData, form.ToValueProvider());**   // Get the productowner for the selected product-owner id viewData.Product.Owner = productOwnerRepository.GetById(viewData.SelectedOwnerID);   // add new product to the repository productRepository.Add(viewData.Product); productRepository.Save();   // Go back to the list return RedirectToAction("Index"); } catch...
Read More

Årets höjdare 2009

Yesterday night Avega had a party. Great fun as always and this night also presented the Avega Band which was great (rock band mind you, I didn’t play). There were a number of awards handed out during the evening (SM i Affärsnytta among others). I was truly amazed when I was rewarded the “Årets höjdare” (Avegean of the year, kinda…)!!! Last year it was Joakim Sundén who is a great guy and really has put Avega on the IT-map of Sweden. It is a reward that is voted on by the consultants of Avega. Being completely taken off guard the only thing I could say at the time was also the only thing I really felt: I am always very humbled when meeting my colleagues in a group since you immediately can notice the level of knowledge that exists in the firm. And that group of people voted for me...
Read More

Sprint Planner Helper – Session 23

This has been the longest of my sessions so far and by far. It has actually stretched over 4 separate “hours” and almost a week since my schedule has been busy with other stuff. It had to do with me getting stuck on a thing the ASP.NET MVC framework that I didn’t get. This was related to the way the framework binds the data in the view to the values posted, and the UpdateModel method etc. To make a long story short I have posted an item in the MVC-forum, and got some truly great feedback from Alberto. I recommend you reading it. Go on. Do it now. Ok – from all this I learned some very useful lessons; the most important was to use a separate ViewModel. That is – create classes that are streamlined to fit the view that the controller is exposing. you can do some pretty...
Read More

He walks!

He has been close for a couple of months now but today Albert took the first real steps. He went back and forth between Elin and me. It was quite an experience to see him take control of the balance and how he was filled with confidence as he went along.
Read More

Sprint Planner Helper – Session 22

I have had some serious thoughts on what to do next in my project. On one hand I want to update the way I am doing the GUI for the product and product backlog. Right now I am warm and learning a lot about ASP.NET MVC so it feels quite good to continue there. And on the other hand this is first and foremost a DDD-learning experience and I have got stuck for a while in the ASP.NET MVC trench. And finally since I only have one hour a either way will take me on a detour from the other track. What to do? After some serious consideration I decided to spend today’s session on a DDD-thingy that I ran into in the walkthrough. I want to implement the “IsValid and GetRuleValidations”-pattern. And include it in my BaseRepository Save-method. That will be enough for today – I think. [Coding with...
Read More

Ruby on Rails – supercool demo

Here is a demo of the famous Ruby On Rails framework that is just mind-blowing. http://media.rubyonrails.org/video/rails_blog_2.mov I can’t wait until the ASP.NET MVC framework comes up with something similar. Amazing. Truly amazing. Maybe I should switch gears…
Read More

De Blob – get a joy-kick!

I bought a new WII game yesterday – De Blob. It is a real fun-injection which I recommend to everyone. It such a good feeling to bring color to an all black and white surrounding. Here is a short clip that introduce the game and the plot: I’m sorry to say that it will ruin my Sprint Planner Helper project to night. On that subject I can say that I am still wondering on how to redo the GUI. I am not fond on how it’s coming along.
Read More

Sprint Planner Helper – Session 21

I’m back! After doing a detour through the sample chapter of the upcoming ASP.NET MVC book (lovingly called “The four faces”, i heard…) I now feel ready to go on. And I learned a few things by that sample chapter; about ASP.NET MVC, yes but also I saw some flaws of my DDD-ing, especially in the use of the Repository pattern. The main thing is that I have a separate Update-method that feels a bit strange. Another thing I learned and finally understood was the IQueryable-interface. By using it you can defer the execution of the actual database query until the client calls. Which means that the query will be fine tuned with all the parameters that the client has includes (such as Take, Sort etc.). (For a much better explanation see this.) So I’ll update my IRepository to something like this: an style="color: blue">public</span> interface IRepository\<T\>  where T :IBaseEntity...
Read More