Sprint Planner Helper – Session 21
March 20, 2009
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 continue.
I learned a few things from that sample chapter—not just about ASP.NET MVC but also about some flaws in 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 IQueryable, 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 includes (such as Take, Sort, etc.). For a much better explanation see this.
So, I’ll update my IRepository to something like this:
ASP.NET MVC released!
March 19, 2009
OK – my new favorite framework is released! I am downloading it now!
MOQ and the Test Run deployment issue - The location of the file or directory problem
March 19, 2009
The NerdDinner example uses the MOQ-framework for mocking some authentication mechanism.
This framework is new to me and when I downloaded it (one dll – great stuff!) I immediately ran into the “Test Run deployment issue: The location of the file or directory” – exception.
Here is a great article explaining how to solve it. I needed to restart Visual Studio to get it to “take” – but then it worked great.
ASP.NET MVC – completing the NerdDinner example
March 19, 2009
I am now done with the run-through for the ASP.NET MVC book I’ve talked about before.
The first thing to notice is how great this way of introducing a subject is/was. 196 pages of really interesting examples and code. Really looking forward to the complete book.
Secondly, I’ve picked up some really useful and interesting techniques surrounding ASP.NET MVC:
- The
UpdateModelmethod, or rather not using it. You can specify a parameter to an ActionMethod (of the same type as in the View) and the framework will fill it out with data from the form. - There are some really useful attributes in the framework, such as
Authorize.
I also learned some lessons surrounding my repositories that I’ll need to include in the Sprint Planner Helper project. I’ll get back to that…
ASP.NET MVC – The Nerd Dinner example
March 15, 2009
I am going through the free sample chapter that I talked about earlier. It’s one thick chapter (196 pages) but it’s really good to introduce concepts and features of the ASP.NET MVC framework.
I love it! I cannot say anything else when after a few years of WebForms and me not understanding I am back. I actually get this – no more funky event-firing and endless questions about which event is fired first.
On top of that, the whole framework is built and works very well to be tested and built with TDD.
There are so many nice little features that I just cannot wait to know as well as the back of my hand… UpdateModel and ModelState just to mention a few.
I am now halfway through and will continue to the end. I’ll get back to you if anything more...
Sprint Planner Helper – Session 20
March 13, 2009
Today I plan to finish up the last part of the prioritizing of Product Backlog Items (see Session 19). That is, TDD the controller and then wrap the GUI.
Let’s go!
Whoa – I ran into some problems with routing. Some problems that took me about two sessions (read: hours) to solve. To not bore you with details or meaningless posts of me scratching my head, I’ll sum it up in this post.
Here is the layout of the “problem”: I have an Action-method with two parameters:
public ActionResult PrioUp(int productID, int productBacklogItemID) OK – but how do I create a link to that method? Well, by using the Html-helper ActionLink-method, of course. You define an anonymous object with the route values. Here is my example:
ASP.NET MVC "The parameters dictionary contains a null entry for parameter”
March 12, 2009
This (The parameters dictionary contains a null entry for parameter) exception was thrown at me and confused me for a while.
If you ever encounter it I can almost guarantee that you have a Routing-issue. That is the way the ASP.NET MVC framework is figuring out which controller and which method to invoke.
In my case I had a controller action method that required two parameters but my routing table only allowed for one.
Here is a description on how to add your own, custom route rules.
And also here is a great tool to understand and debug your routing-table entries.
Finally – this webcast contains a discussion about how to change routes.
Japanese Toilet Training
March 11, 2009
Here is a video introduction to the toilet for Japanese children.
Abbes just loves it – and I double-dare you to not hum this song the next time you “need to go.”
Sprint Planner Helper – Session 19
March 10, 2009
After my refactoring yesterday, the function that re-prioritizes product backlog items was reduced to swapping priority points on two items.
So that’s what I’ll do today. TDD through a function that swaps priority points for a product backlog item and the item before (prioritize up) or after (prioritize down) it.
Coding in progress
That really was an old-time programming problem. Fun! But now I have TDD’ed a priority swap algorithm. That was all I managed to get through today. Some progress, I think.
Now all that is left is to reach this functionality from the GUI and reload the list after it’s done.
My light and song
March 9, 2009
In a few weeks the Vasa Band will do a music festival at the corps. I will play an euphonium solo and was looking for something that isn’t played very often.
For a long time, several years actually, I have had the solo part for My Light and Song (FS 228) in my “collection”, but never dared try to play it.
I have actually never heard it played (actually Patrik Randefalk did play it with the Vasa Band in the 90s) or recorded.
I’ll try to post a recording here… after March 25.
[UPDATED] This is so sick! This book contains all music (kinda) that is available for euphonium. And who has recorded it! Including a reference to recordings by my father.
And My Light and Song is recorded. By a Mr. John Butler.
The internet is amazing…