Geeks With Blogs

News
Shelfari: Book reviews on your book blog

.net alternatives by Michel Grootjans

It's past 11:00 PM, and I finally found the way back to my room.

After having some problems with the build script, we hit off on what was to become a great day. Build scripts tend to be a hassle when you intend to run them on XP and Vista in English, German and Dutch versions. As always, you can count on JP to find an elegant solution to solve this problem.

We've built a skeleton for a web application today. I'm not going to delve into the details of the implementation, as they are far from finished. The most important part of what we're doing is the principles we're applying. Here are a few I've written down:

Top down development

We first started with a simple MVP implementation of the front end. This allowed us to define some of the functionalities we wanted to have in the application. This of course causes us to be dependant on the asp.net page lifecycle, view state and the whole shebang.

In the afternoon we started refactoring this design to a front controller to handle http requests. The basic idea is shown in this diagram.

front_controller

Ok, working top-down really means right to left here ;-) What's really fun is that this got implemented in one long afternoon.

The Highlander principle

There can be only one.

Only one constructor doing the work. Other constructors just pass arguments to the 'one'. Seems to be an obvious one, but I admit to have sinned repeatedly against it.

public class FrontController : IFrontController
{
    private readonly ICommandRegistry command_registry;
 
    public FrontController():this(new CommandRegistry())
    {
    }
 
    public FrontController(ICommandRegistry command_registry) {
        this.command_registry = command_registry;
    }    ...}

Source control good habits

Update - Merge - Add - Test - Commit

A simple habit I find myself breaking a lot. Having someone spell it out explicitly is a good thing.

Last but not least: The JP Principle

Always remind JP to start recording. Always remind JP to stop recording.

No need to record with camtasia when we're out to lunch ;-)

 

That's it for today, I'm off to sleep now. Good night.

Posted on Wednesday, September 24, 2008 12:04 AM .net | Back to top


Comments on this post: Nothin but .net: day 2

# re: Nothin but .net: day 2
Requesting Gravatar...
I too went on the Nothing But .Net course a year ago, an amazing course, and we had the same deal....

"er JP, are you recording this?"

Left by Andy Knight on Sep 24, 2008 10:55 AM

# re: Nothin but .net: day 2
Requesting Gravatar...
for the source control habits:
before the first step (update) i recommend to have a look if you have deleted something since your last checkin and mark it as to be deleted. otherwise svn (at least) will restore the file.
when working with visual studio is unlikely to see the file when its not linked in a project...

so long basti

Left by basti on Sep 24, 2008 2:53 PM

Your comment:
 (will show your gravatar)


Copyright © Michel Grootjans | Powered by: GeeksWithBlogs.net