Studio25 nieuwe kapsalon in grimbergen

Ontdek onze nieuwe kapsalon te Grimbergen: Studio25

Het beste hair dresser salon te grimbergen.

22:27 Écrit par Geoffrey Vandiest | Lien permanent | Commentaires (1) |  Facebook |


This Blog has moved

This blog has moved!!!!!


21:41 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) |  Facebook |



Model view controller with ASP.NET

Post was moved to here

























Our mo



Model view controller with ASP.NET


It’s now generally admitted in the community that Unit testing and TDD (Test Driven Development) are valuable techniques when it comes to increasing the overall quality of our code. Nevertheless unit testing can be costly especially when you’ve applications with a lot of logic implemented in the UI. 


Therefore if we want to make our application testable we need to separates the UI from the rest of the application.  Martin Fowler described on his site some patterns that separate and diminish the UI logic to a bare minimum.  They are all variants of the classical MVC (Model View Controller) pattern.  The MVC split the application in 3 parts: the view handles the display, the controller that responds to user gestures and the model that contains the domain logic. 


The MVC is the foundation of very popular portal frameworks like Ruby on Rails.  To build web sites applying the MVC pattern with .Net developers can choose among several MVC frameworks like Monorail.  In anyway, MVC frameworks like Monorail are based on completely different paradigm as the ASP.NET framework.  This means that you have to re-learn to program web apps from scratch.  Another setback is that there are no ways to refactor your old ASP.NET applications so that they can fit into the MVC framework.


I want to make myself clear, I believe that frameworks like Monorail or the coming System.Web.MVC are the future way of programming web apps in .NET but it demands a considerable amount of effort to learn new frameworks. It’s difficult for someone like me who has invested lots of years in mastering the classical ASP.NET code-behind model to re-learn everything from scratch. In the meantime this should not be an excuse to not make my code more testable.


In this post I will explicit through a simple example how to use the model view controller pattern on top of the code-behind model. 


We will create a login form with the MVC pattern.


Setup your solution

Create a new solution “Zoo” with 3 projects ->

-         ZooWebsite-> ASP.NET web appplication

-         ZooLibrary  -> Class library

-          ZooTest  - Class library


- Create a reference from ZooWebsite to ZooLibrary

(ZooWebsite , add reference, project tab select ZooLibrary)

- On ZooLibrary add a reference to System.Web



The View

To make our code testable it’s very important to be able to decouple the UI from the ASP.NET code-behind.  Therefore we will create an interface our ASP.NET page should implement.  This View interface will represent the contract the UI as to conform to.  When we will test our controller we will not do this with our actual web page but through a mock object that implements the View interface.    


Add an interface ILoginView on the project ZooLibrary:


namespace ZooApplication.Library


     public interface ILoginView


        string ErrorMessage { get;set;}

        string EmailAddress { get;set;}

        string Password { get;set;}

        void RedirectFromLoginPage();

        System.Web.UI.WebControls.Button BtnLogin { get;set;}



-> Edit the default aspx page and enter: Welcome you are authenticated!

-> Add the login.aspx to the ZooWebsite project.

 -> Edit the source of the login.aspx part -> add two textboxes, a button, and validators:


<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Login.aspx.cs" Inherits="ZooApplication.Website.Login" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title>Login page</title>



    <form id="form1" runat="server">


                Login form<br />

                <asp:Label ID="LblErrorMsg" runat="server" Text="Invalid login" Visible="false" ></asp:Label><br />

                Email Address:

                <asp:TextBox ID="TxbEmailAddress" runat="server"></asp:TextBox>

                <asp:RequiredFieldValidator ID="RfvEmailAddress" runat="server" ErrorMessage="Enter your email address!"



                <asp:RegularExpressionValidator ID="RevEmailAddress" runat="server" ControlToValidate="TxbEmailAddress"

                    ErrorMessage="Invalid email address!" ValidationExpression="w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*">




                <asp:TextBox ID="TxbPassword" runat="server"></asp:TextBox>

                <asp:RequiredFieldValidator ID="RfvPassword" runat="server" ErrorMessage="Enter your password!"





                <asp:Button ID="PageBtnLogin" runat="server" Text="Login" />







 Because the code-behind is not testable and don’t make part of the SUT (Subject Under Test) we want to diminish the code-behind logic to a bare minimum.   The view responsibility is limited to output  the data coming from our model in a human readable way and to expose user input to the controller. 

Therefore we implement our interface through an aspx page that only contains a set of properties that binds data coming from the controller with our web controls. 

Generally we will try to implement all the presentation logic into the controller.  The only exception here will be the RedirectFromLoginPage() method. 

We could use a provider pattern to abstract this from the page but for the sake of simplicity I’ve decided to implement it directly in the page. 



using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using ZooApplication.Library;


namespace ZooApplication.Website


    public partial class Login : System.Web.UI.


Existe what's next?

Hello folks,We just released a new version of Exist

This version contains a Gallery application.  The Gallery enables users to post pictures on their profile.  Other users can come to admire your pictures and rate them.

Next week we will launch a new feature: The Graph, through the graph visitors will be able to leave some comments on your profile.

During the month of November we plan to review some existing features like the widget.  You will be able to put your Gallery onto your widget. Don’t hesitate to give us feedback about the existing features or to propose new ones.Stay tuned…


10:39 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (1) | Tags : exist, existe, gallery |  Facebook |


Web setup project walkthrough

17:14 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (1) | Tags : setup, msi, install, web setup |  Facebook |


Web setup project walkthrough

This document contains a walkthrough that will help you understand the basic tasks to accomplish to create an MSI packages for deploying your web application. The walkthrough describes the most common scenario of deploying a web project.  We will create a standard Web setup project.  This project will generate as output an msi package that will create and configure the application IIS and copy the application’s file to a specific location on the server.   This walkthrough also describes how to modify the web.config file for providing a connectionstring or change any of the configuration sections. 

Because msi packages are mostly deployed by system engineers from the command line, this walkthrough will also pay attention on how to enable quiet installs and how to pass parameters to the installer from the command line.


1.     Create a “Hello World” web service

To be able to create a setup will need a sample project that will be deployed by the setup project.  So we create a new empty ASP.NET website application.

File->new ->ASP.NET WebService



Add  a Class library project to your solution.

File->Add->Class Librrary


Now we should have 2 projects inside our solution.


Add a static method SayHello() to the class1.

Reference this class in your web service project:

Add Reference-> Projects->SayHelloLibrary


Change the code of the Hello world method to use the Library static method SayHello()


Hit F5, your solution should compile.  Test the application through the invoke button of the test web page, you should see the following:


2.     Add a Web setup project

We will add the web setup deployment project to the solution.

File->Add->New Project->Other Project Types->Web Setup Project


Now our solution should look like this:



Now the real work begins, we will configure our web setup project to hold our content and our compiled assemblies.

3.     Add content and assemblies to your web setup project

First we will add the content of our web service project.  These are the asmx pages and the content of the APP_CODE folder.  They will be compiled by the host IIS server the first time the site will be hit.


Right click on the setup project->Add->Project output.


A “Add project output Group” dialog box should appear.

Because our Web setup project does not have any compiled assemblies as output we only can select “Content Files”.  When you choose another ASP.NET project template like the “ASP.NET web service application” template (available since SP2 of VS2005) you’ll have to choose “Content Files” and “Primary Output” as well.


You should be in the file system view.

If you don’t see the above screen, right-click on the web project setup folder and choose view->File system.


Now we will add our web service application compiled assemblies.  Right-click again on the web-setup project and choose Add->Project Output and select the SayHelloLibrary project and click on “Primary Output”.


After we click on the ok button Visual studio has added the “Primary Output” to the root of the Web Application Folder. This will result in a compile error the first time we try to hit the application we deploy.

To correct this error we must move the “Primary output” to the Bin folder of our web application.  Simply drag & drop the “Primary Output” to the bin folder.




Before we test our first installation package we’ve to compile it because Visual studio will not compile it as part of the solution. When we compile our project, visual studio will generate an msi file containing all parts of our application.

It’s time to test our first installation packet. 

Select the setup project->richt-click->Install



The setup wizard pops-up, click next.


You can change the default value of the  Virtual directory textbox.  The default Virtual Directory is a property of your “Web application folder” available in the File system view.  Important: If you want to be able of passing the virtual directory as a parameter through the console for a quiet installation you should set this property to a blank field otherwise the msi package will overwrite a blank value with the value of the property.


When the installation is completed successfully the web service should be available on the your local IIS server under the path http://localhost/HelloWorldSetup/service.asmx







 The application should also be visible in the “Add or Remove Programs” in the Windows Control Panel.





4.     Adapt the connectionString property of the Web.Config file.

The web setup project wizard alow us to change common IIS settings through the File System view (View->File System) by changing the properties of the “Web Application Folder”. 



We can also add prerequisits of our solution (the .net framework2 is a standard prerequisit).

To adapt the connectionString property of our Web.Config file we will have to add custom code to our project that will edit the config file.  To be able to this type of actions during a setup we’ve to create custom actions.  Custom actions are code that is executed during the installation process.  Therefore we’ve to create a new ClassLibrary project. 


Add a classlibrary project and name it HelloWorldCustomActions.

Add following assemblys references: System.Configuration.dll, System.Configuration.Install.dll, System.Web.dll.


Add a new class to MyCustomAction.cs your project that will be used during the installation of your project.    This class must inherit from “System.Configuration.Install.Installer” class and be annotated with the RunInstaller(True) attribute. using System;

using System.Collections.Generic;

using System.Text;

using System.Configuration.Install;

using System.ComponentModel;

namespace HelloWorldCustomActions



    public class MyCustomAction:Installer


        public override void Install(System.Collections.IDictionary stateSaver)






Now we need to create our custom action and associate it with our class.

First we need to add the output of the HelloWorldCustomActions assembly in our Setup project.

Right-click “HelloWorldSetup” project->Add->Primary Output




From the File System View move the “Primary output from HelloWorld actions” to the bin folder.

Now we will make sure that our code is executed as a custom action during the installation.

Right-click the project folder->view->CustomActions.

The Custom action view should be displayed.

Right-click on the install folder->Add Custom Action->select “Primary output from HelloWorldCustomActions (Active)”.



The web setup project wizard contains a form where the user must select the application site and the virtual directory. To be able to locate and change the web.config file of our application we need to read these parameters.  We can also pass these arguments by the command line and provide a targetdirectory. 


To be able to access these parameters we need to declare them in the “CustomActionData” property of our CustomAction: 

Select your custom action->In the property window select “CustomActionData” Insert the following values:


/targetdir="[TARGETDIR]" /targetvdir="[TARGETVDIR]" /targetsite="[TARGETSITE]" /targetconn="[EDITA1]"  /db="[DB]"




We will now add a screen to our wizard that prompts the user for a connectionString. 

Right click the project->View ->User Interface.

Right click start-> Add Dialog



Select Textboxes(A) and move it between “Installation Address” and “Confirm Installation”.



Set the following properties:




Now we will code our custom action.

First check you have following references in you CustomAction project.

Set following using statements in your CustomAction class:

using System;
using System.Configuration;
using System.Configuration.Install;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.DirectoryServices;
using System.Web.Configuration;
using System.Windows.Forms;


your install method should look like:

 public override void Install(System.Collections.IDictionary stateSaver)



            // Retrieve configuration settings

            string targetSite = Context.Parameters["targetsite"];

            string targetVDir = Context.Parameters["targetvdir"];

            string targetDirectory = Context.Parameters["targetdir"];

string targetConnectionString = Context.Parameters["targetconn"];

            //if this is a quiet install

//the connectionstring is passed as with a parameter named "db"

            if (targetConnectionString.Length < 1)

                targetConnectionString = Context.Parameters["db"];

            if (targetConnectionString.Length < 1)

throw new InstallException("Please provide a connectionstring!");

            if (targetSite == null)

throw new InstallException("IIS Site Name Not Specified!");

            if (targetSite.StartsWith("/LM/"))

                targetSite = targetSite.Substring(4);

ConfigureWebConfig(targetSite, targetVDir, targetConnectionString);




  void ConfigureWebConfig(string targetSite, string targetVDir, string targetConn)


            // Retrieve "Friendly Site Name" from IIS for TargetSite

            DirectoryEntry entry =

                new DirectoryEntry("IIS://LocalHost/" + targetSite);

            string friendlySiteName =



            // Open Application's Web.Config

            Configuration config =

                WebConfigurationManager.OpenWebConfiguration("/" + targetVDir, friendlySiteName);


            addConnectionStringAttribute(targetConn, config);



            // Persist web.config settings


Add the ConfigureWebConfig method:

























Method to add the connectionstring to your web.config:

private static void addConnectionStringAttribute(string connectionStringValue, Configuration config)


            ConnectionStringSettings appDatabase = new ConnectionStringSettings();

            appDatabase.Name = "db";

            appDatabase.ConnectionString = connectionStringValue;

            appDatabase.ProviderName = "System.Data.SqlClient";






This method will set the compilation attribute to debug=false


private static void togleCompilationAttribute(Configuration config)


            CompilationSection compilation;

            compilation = config.GetSection("system.web/compilation") as CompilationSection;


            if (compilation != null)

                compilation.Debug = !compilation.Debug;




Now you can test your installation package.  Right-click Setup project->Install.

The second screen should ask for a connectionstring.


5.     Quiet install

When distributing a setup package you will mostly install the application through a quiet install.  Therefore you’ve to pass the parameter through the command line.   I experienced that the parameters you pass through the console are sometimes overwritten by the parameters you’ve added in your custom screens.  This is why I added a supplementary parameter “db” and don’t use the parameter “targetconn”.  The installer first checks if the parameter is empty.  This will be the case if you install the application through a quiet install. 

You will find this parameter in the CustomactionData property of the custom action:


/targetdir="[TARGETDIR]" /targetvdir="[TARGETVDIR]" /targetsite="[TARGETSITE]" /targetconn="[EDITA1]"  /db="[DB]"


 The code that handles the parameter in the Install method:


if (targetConnectionString.Length < 1)

                targetConnectionString = Context.Parameters["db"];


You can launch the msi setup package with the folowing command line:

(First navigate to the directory containing the builded release version of the msi)


>HelloWorldSetup.msi /qb targetvdir="HelloWorld" db="Test for connectionstring"


If you want to specify the target website you need to specify the website IIS metabase targetsite path.  This path mostly begins with “/LM/W3SVC/” followed by the site id. 


A trick to find the site id or to debug the setup application is to use the /l* option.  Launch the installer with the /l* option and follow the wizard.  The /l* will log all the parameters passed to the installation program.  After the installation completes you can retrieve website metabase path by searching for the “targetsite” in the log file.


>HelloWorldSetup.msi /l* log.txt


I hope this tutorial help you to understand the basics of creating a web setup project.  This type of setup will enable you creating testable and repeatable deployment scenarios.  It will also help our IT engineers to deploy web applications gracefully on production machines.









16:57 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) |  Facebook |



Have a look at subsonic!

It’s a lightweight, open source ORM mapper for ASP.NET but it’s more than that!

Subsonic is an implementation of the "Active Record" pattern used in rails for the data mapping. It also tries to mimic some of the MVC concepts of rails.

Subsonic site: http://www.subsonicproject.com

Subsonic on codeplex: http://www.codeplex.com/subsonic 

Introduction webcasts:

Subsonic intro:http://www.wekeroad.com/ss_setup2.html

MVC with subsonic:http://www.subsonicproject.com/view/soniccast-3---all-about-mvc.aspx

13:23 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : orm, subsonic, mvc |  Facebook |


Agile & Finance

In this episode of the agile podcast Chriss Matts explains how he applied agile practices in financial managment.  He also explains how certain agile concepts can be proven by mathematics and how agile could change the way you take decsisions in your personal life. 





18:04 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : agile mathematics finance |  Facebook |


Model View Controler revisited

The Model View Controler is one if not the most used patterns in software engineering.

 I just came along an article of Martin fowler “GUI Architectures” describing this pattern and his modern contra part the Model View Presenter.  Everyone who is interested in patterns should read this article and (re)-discover the father of all patterns.  

16:11 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (1) | Tags : pattern, mvc, martin fowler, gui, architecture |  Facebook |


Ajax best practices



-         Don’t misuse it: use it when it has a real added value for the user.  I already heard people proposing to implement the entire navigation through ajax. The application runs with a single page with a div in the centre. When the user wants to navigate just refresh the div!  This is typically a misuse of the technology; it will enhance the complexity of the entire application and lowers the user experience because the user will be confused. e.g. user will be unable to use the back button.

-         Always provide a fallback solution because:

o       ajax isn’t compatible with old browser

o       disabled people usually are not able to use features that are only available through ajax,

o       people who have javascript disabled can’t use it.

o       most important: search engines are unable to index information only available through ajax.

-   Delay as much as possible: Ajax and JavaScript in particular should be used as lately as possible in the development cycle.  Incorporating ajax too soon tends to make changes more costly. In my opinion it's a bad idea to use ajax when the project is still in a early period of his lifecycle because their is a high probability that many changes will happen. Best practice is to use a dedicated iteration for adding the ajax and JavaScript effects.

-         When the UI and the backend are not made by the same developers, UI developer and backend developer should absolutely be physically close making part of the same team.

-         Decouple the presentation layer with the application logic and decompose the UI (pages) in different parts (modules).  This practice will facilitate the integration afterwards of the ajax effects.  Our team use a specific pattern.   Basically the module code is used in the classical way (without ajax) and re-used afterwards by javascript code that calls these modules through the scriptacoulous Ajax.Updater method.

18:00 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (12) | Tags : patterns, ui, development, ajax, practices, javascript |  Facebook |


 The good, the bad and the ugly

The bad old days

Long ago I strongly believed in deterministic approaches for software engineering. At school I learned the classical way to build software. It’s based on the experience of how we build stuff in the concrete world. In software development literatur you find the analogy between building a house and building a piece of software. First you need an architect who will draw the plan of the house. Every aspect of what will be in the house has to be described in the plan. When the plan is ready the entrepreneur can start with building the house. The architect will inspect regularly the house making sure that everything is like he described on his plan.

For a large majority of software professionals this is the model inspiring the way they build software.  Big upfront design has to take place and the result of it is a detailed analyse. Only when the analyse is complete we can start developing. We are supposed to follow what is specified and at the end we should get the application that our customer desire. I remember the time when I learned engineering software this way. It was at the university, I already was graduated but I decided to further specialise in what was called IT management. On that time I already worked for the IT industry. So because I couldn’t be present on the daily courses I had made a deal with my professors to see them once a week to review what I had studied during the week. This provided me the opportunity to better interact with my teachers and I remember a talk with my professor for software engineering.

During that week I had reviewed the famous waterfall model of software engineering. This model is completely based on the classical approach: you start with an analysis, you design the architecture, you build the software after you test every piece and finally you integrate the whole. I found the concept appealing but I couldn’t recognize this way of working in the organization I was working for at that time. So I asked my professor if he had really seen this type of model working in the real life. This was the only time when I saw the man, for which I had and still have a huge respect, showing signs of contempt. He overreacted, basically he answered that in his organization he conducted projects based on this model but that lots of organization didn’t because they where unprofessional.

I remember that in the beginning of my career I constantly was frustrated because I never encountered projects where this recipe actually worked. Especially when working for smaller organizations the customer was not willing to play this type of game. I thought that the reason for this was that they didn’t understand what software engineering is and how complex it is. Now I realize that we are wrong. We are all actors playing the software engineering game, fooling ourselves and the customer.

Usually we begin by interviewing the customer and try to understand what his problem is and how we could help him solve that specific problem. Because we are self confident and because the customer has a business to run this type of interview remains mostly short. We go back to our offices and writes documents describing what should be build. Writing this type of document is fastidious and time and resource consuming. When, months later we present this document to our customer where we describe in details what we intend to build he’s not willing to spend days reading it. In fact I never had a customer that actually reed and understand what was described in the analyses, just because they had a business to run and couldn’t afford spending hours reading this document as big a phonebook full of incomprehensive technical terms. It’s the reason why we make powerpoint presentations summarizing what is described in the analyses. What happen usually is that the developers working in the project don’t read the analyses too. Partially for the same reason as the customer, they have a work to do. But the main reason why developers don’t read the document is simply because they know that it isn’t valid anymore. Between the time the analysis was written and that the developers start coding, things have changed.

The ugly rules of software engineering

This is the first rule I discovered: customers change their minds all the time, especially when you show them the final product! But why do customers change their minds? Simply because when they are confronted with the actual product they suddenly dispose of more information on the product as when it was only a mental representation. Changes occur also because you realize that some aspects of the application should be improved. When you are building the product piece by piece you are confronted to some aspects of the reality you hadn’t anticipated before. Also you are getting more and more info from the customer and your understanding of the problem domain constantly evolves. I remember projects we begun to truly understand what we were building when we had already build a consequent part of the application.
The point is that we already are getting late on the project because all this analyses has taken a lot of time and the time we used to make the analyses will not help us as it should be. When the project finally arrives in the development team the expert developers try to figure out what has to be build. The system is divided into the technical core concepts, the user interface, and the backend. Code skeletons are generated and assigned to the developers for implementation. It soon becomes apparent that the modelled solution cannot be implemented without problems. The result is that what is implemented isn’t what is described in the analyses and the analyses document becomes completely obsolete. At the end the project is not completed on time and after months of pressure we produce an inconsistent system that contains many errors. Subsequently the development is chaotic. Users find errors in the application and establish that many of their requirements were not implemented adequately. The developers are informed of this and they try to implement the changes as quickly as possible. In this process, the internal structure of the application degenerates and the cost of future changes increase further. In the end the maintenance of the software becomes a nightmare and the cost of maintenance rises exponentially till we decide to re-build the software from scratch.

Another well know problem we constantly encountered is that analysts tend to increase the complexity of the system in order to foresee every possible problem. Recently I participated on a project where the project started without a real customer and without clear business objectives. The analysis was full of technical requirement describing how the portal should be build but their was nearly no reference on what the portal should actually contain and for what it should be used. The result was that the analyst and developers increased the complexity of the modelling in order to foresee every possible problem. This leads to unused technologies, which simply means a waste of money. So the second rule in software engineering is: deciding what to build is more important than how.

The classical process of software engineering leads also to separation of people. Customer, analyst, developers works not with each other but separated by place and time. In general, it is bad when analysis, design and construction are separated. This separation enhance the gaps between the vision of what should be build and how. It is not unusual that the people who has initiated the project and so has dictated the vision are not available anymore when the actual implementation occurs. This leads to misunderstandings on the actual goals that should be fulfilled. This is the third rule of software engineering: Most of problems that arise in software projects can be tracked back to lack of communication.

Adopting good practices
People who are interested in software engineering know that this kind of problems has been detected long ago and people have begun to think about other methods for making software. Other development methods have come to my attention over the last few years. It has come to my attention when I was realizing that building a house is not the same as building software. The classical rational approaches are very good in dealing with complex but immutable things like constructions or mathematics. But when dealing with rapidly changing environments like software engineering these methods tend to be ineffective. When working for things that tend to change constantly you need more agility. This is why Agile methodologies have arisen and nearly are becoming the norm now. Agile methodologies strive for a slimmer, more lightweight development process. In my opinion when it comes to time and resource consuming factors like processes, the principle that should be haunted is that every process should have a clear justification for everything that it incorporates. Even agile methodologies are sometimes going against this rule but they are nevertheless a breath of fresh air. They help us at better managing change. They definitely enforce a good communication between everybody on the team and so help us to build what the customer wants.

Agile methodologies come with many variants, one of them is Xp. Xp is certainly one the most used agile development process used these days. The father of Xp is Kent Beck, he published the first book on Xp but Xp is not the invention of one man. A number of very respected software engineers like Ron Jeffries, Martin Fowler and Robert C. Martin started to use Xp and a community has grown up around it.
Advantages of agile methodologies
Agile methodologies encourage rapid feedback from the customer and simple practices that leads to a better quality and rapid discovery of defects. Some of these practices are:
- Pair programming: developers always work in pair so that each developer can check the work of the other and help to discover errors soon.
- Continous integration: In the classical approach every module is build by a developer and at the end all modules are assembled, this usually lead to lots of integration problems because the pieces don’t fit to each others. In an agile project the modules making the entire solution are constantly integrated so that integration problems are detected immediately.
- Test driven programming: programmer constantly writes test that constantly test the software

Many studies have proven that agile practices lead to the following advantages:

- Cost effective: One of the major advantages of agile methodologies over traditional methodologies is that agile methodologies are less costly. The practices that the agile methodology promotes have all a common goal: reducing the cost of change. In place of trying to foresee everything in advance we use our energy to make things easier to change.

source: http://www.ambysoft.com/essays/whyAgileWorksFeedback.html

Higher customer satisfactionAgile methodologies favour an incremental approach. The increment is determined by the customer. The customer prioritises the requirements and the developers are responsible for estimating the cost.
- Rapid time to marketIn place of spending months on documents that will never be used the stakeholders simply describes their requirements then the developer spend several hours or days implementing the feature that can be rapidly show to the stakeholders.
- Lower financial riskRapid time to market leads to a shorter payback period.

I’m convinced that nobody should ever follow blindly any process. Each team and each project is unique and therefore needs its own custom-made process. A process must be adapted to the locale and be continuously improved. It requires constant reflexion to constantly improve and adapt a local process. That’s why it’s so important to be aware of your environment and what the process used elsewhere are. Post-mortems are meetings where everybody of the team can speak about what went wrong during the project. These meetings can help us continuously improve the development process and to avoid the same mistakes twice. Finally I should stress the fact that at the end it’s the people that make the difference and not the process. This is why every good process should tend to make it self irrelevant.

16:20 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : agile, waterfall, software engineering, architecture, xp |  Facebook |


I Exist

My team has worked hard last months to develop the latest Skynet application: Exist!

This application is primarily a social networking site addressed to Belgians who want to aggregate not only all the digital content they create and/or are interested in, but also all the digital information they may have compulsed over the time, into one place. It is also an opportunity to reinforce the social networking dimension we offer through our products. The main features of the site are to search by tags in order to find interesting profiles and to aggregate content in order to share your centres of interest.


During all stages of the development lifecycle we used web 2.0. technologies and paradigms. Therefore, all the effort has been brought to implement a feed aggregator, clean and meaningful URL and provide a rich end user experience through the use of ajax. The most difficult was to be able to provide a rich user experience with ajax but at the same time guarantee that the site remain crawler friendly.


This application was build using the latest technologies of two worlds that most web developers consider as concurrent: PHP and .Net. For the presentation layer we used a mix of the Yahoo YUI control library and prototype and the server side code was written in PHP 5.2  using our portal framework: ATOM.   For the backend we used WCF the latest Microsoft framework for building distributed applications.  By combining these technologies we tried to use the best tools available from the enterprise and open source world. 


Currently the application is online but not officially launched. So subscribe now exclusively and be one of the first on this new community.


Dutch version:  http://exist.skynet.be

French version: http://existe.skynet.be



11:42 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (1) | Tags : exist, rss, ajax, wcf, php, community, agregator, networkingweb 2 0 |  Facebook |


Comparing ASP.NET with PHP

In 2005 my management asked me to write a report comparing ASP.NET and PHP. 

These technologies have evolved since 2005 and so has my opinion.  Nevertheless I think that the comparison I made remains valid. 



When I compared J2EE, the Sun’s Java enterprise platform, with .Net I found lots of articles, studies and benchmarks. So I started this analysis by collecting articles that compared .NET and PHP and was rapidly disappointed because I found very few articles on this subject.  In fact this didn’t surprise me because these technologies are very difficult to compare.  You can easily compare J2EE and .NET because these have clear resemblance in the way they are used, in their architecture and programming model but PHP and .Net have only one thing in common, they can be used to build websites.

Nevertheless I go for the challenge, I will compare Skynet most used technologies PHP and .Net.  In this document I give a brief history of PHP and .Net, explain what they are and analyze the strengths and weaknesses of both and how these could fit in a growing organization as Skynet. 

History of PHP

1995 - Rasmus Lerdorf creates a perl bibliotheque and named it PHP ‘Personal Home Page Tools’. 

1997 - PHP2 (stayed mostly in beta stadium)

1998 - PHP3 : was first version of the actual php language

2005 - PHP5 introduced notions of Object Oriented paradigm into the language.  PHP was initially an open source project that has constantly grown in popularity especially against webmasters.    

History of ASP.NET

1995 - ASP was first released.

2001 – Microsoft released his new vision and technology: .Net. It englobes he whole new set of technologies like the web application part ASP.NET. ASP.NET has the same name as ASP but it is a completely new technology. From ASP it has only the name in common. The father of .Net is Anders Hejlsberg inventor of Pascal language.  .Net was mainly the response of Microsft to Sun’s Java platform.  

2005 - .NET2 is released with Visual Studio2005 – SQL2005 – Biztalk2006


What is PHP?

PHP: Hypertext Preprocessor is an open source server side programming language extensively used for web scripts and to process data passed via the Common Gateway Interface from HTML forms etc.[2] PHP can be written as scripts that reside on the server and may produce HTML output that downloads to the web browser. When the PHP preprocessor in your Web server notices a PHP language tag like the following, the

PHP engine is invoked to execute that code:




some code here that output the word WORLD!


Result of the html page:

Hello WORLD!!!


PHP is similar to Microsoft's Active Server Page technology (ASP) the ancestor of ASP.NET.  PHP runs mostly on UNIX servers but it can also run on Windows based servers. It is used for connecting to a database to create all kinds of web applications, such as product catalogs, changing content, calendars, and e-commerce.


What is .Net?

Is Microsoft's set of software technologies for connecting information, people, systems and devices. It is based on web services which are small applications that can connect to each other as well as to other larger applications over the Internet. .Net is made to run on any type of devices and for the development of all type of applications: web sites, web services, windows applications, windows services…

 Although .Net is a set of proprietary technologies developed by Microsoft to offer an alternative to Java and J2EE that runs only on windows based machines Microsoft published the definitions of the.Net technologies as open standards. This allows projects like Mono.   Mono is the name of an open source project led by Novell (formerly by Ximian) to create an ECMA Standard compliant (Ecma-334 and Ecma-335), .NET compatible set of tools. Mono can be run on GNU/Linux, UNIX, Mac OS X, and Windows based computers.


ASP.NET is the technology built into .NET that you use to create Web pages and other Internet-based applications. ASP.NET is not merely the next version of ASP (Active Server pages). ASP was thrown out and ASP.NET was written from the ground up. It's a brand new, object-oriented platform with a completely different programming model as ASP or PHP.  In ASP.NET developers are able to write web applications on the same manner as they writes other programs like windows applications. 


Another big difference of ASP.NET with ASP or PHP is the separations of the HTML and the program part.  In ASP.NET the code part of the web application is completely separated from the visual part.  Separation of the code and html is entirely new for web development.  PHP code consists of HTML and code mixed together but there are tinplating frameworks available that brake the html from the code.  With ASP.NET the coding and design part can completely be separated and the design and development work can be done by different teams.



PHP Strength and Weaknesses

PHP is very easy to learn as most of all scripting languages (javascript, vbscript,…).  Especially for programmers that knows the C language.  As most of the scripting languages it’s not strongly typed what give PHP flexibility but this comes at the expense of robustness.  Most generally, "strong typing" implies that the programming language or implementation enforces some kind of constraints upon programs, preventing them from running code which uses data in an invalid way. For instance, an integer addition (1+1=2) operation may not be used upon strings; (“1” + “1”=”11”) a procedure which operates upon linked lists may not be used upon numbers.  The flexibility of weak typing of scripting languages causes bugs that are very hard to detect. 


Also as most of all scripting languages php is interpreted.  Again interpreted languages are easy to handle because you don’t need to compile the code but this come at the expense of efficiency because interpreted code is always slower as compiled code. Some optimizer are available that compiles PHP code to speed performance. Additional commercial products also exist, such as the Zend Performance Suite, which can cache precompiled PHP pages, further speeding overall performance but these remains external products.


But the greatest advantage to use a compiler is not performance but checking for errors.  Good type checking is a well proven part of software engineering. A strongly typed language complier picks up errors and this is not possible for weak typed languages.


Other advantages of typed languages are that the IDE (development tool) can help the programmer.  The programmer doesn’t have to do manual type inference or read documentation.  All this is not possible for PHP due to he’s weak typing.


PHP don’t enforce at all Object Orientation. Even PHP5 is not truly object oriented because it has to stay compatible with the older versions.  What give the ability to programmers to really play with the code and don’t enforce at all Object Oriented structure.  This is also a great shame, as there is much to be gained from adopting an object oriented approach to developing object oriented applications, perhaps the most important being code reuse. A well written piece of object oriented code can easily be employed to solve the same problem in other projects; we can simply slot it in whenever we need it.  This is why code reuse happens less frequently in PHP.


“The object oriented paradigm is an approach to programming that’s intended to encourage the development of maintainable and well structured applications. Many PHP coders regard object oriented programming (OOP) as some kind of mystic art, given that frequently, examples of PHP look only at procedural approaches to problem solving. (Note that procedural programming is the name given to non-object oriented programming.” [1]



ASP.NET Strength and Weaknesses

ASP.NET has a more rigorous Object Oriented programming model as PHP what makes it more complicated to learn. To master the power of ASP.NET developers must have a through understanding of the Object Oriented paradigm but for programmers who master this paradigm ASP.NET code is easier to write, debug, and maintain as PHP, particularly for larger projects.

.Net is an object-oriented programmer's dream, with language flexibility, and with sophisticated object-oriented features supported.  The object-oriented foundation of ASP.NET programming make it easier to read, reuse, maintain, and share code among groups of programmers who must work together on a single project.


Therefore ASP.NET uses the descriptive programming paradigm. The paradigm is based on the idea that most of the programming tasks consist of solving common problem.  One goal of ASP.NET was to eliminate much of the tedious coding. By solving these problems by using reusable components, wizards or patterns we are able to reduce drastically the amount of coding and also increase the quality.  ASP.NET provides an incredible amount of components, wizards and patterns.  This is also why some beginning developers find ASP.NET complicated. ASP.NET is also more difficult to learn for web developers because they have to completely change the way they write web applications.  But ASP.NET code can be written in any language, so developers can leverage their existing programming knowledge, transferring their experience from one language to .Net. PHP developers can even choose for the PHP language in .Net.


ASP.NET provides the developer with a generous suite of debugging tools (including breakpoints, tracing, and extensive error messages).  Having a great IDE is the central factor to increase developer’s productivity and overall quality.  .Net comes with many IDE where the developer can develop any kind of applications with the most powerful WYSIWYG design and editing tools and wizards that can help him through tedious or complex tasks.    Developers can choose for the enterprise or professional edition of Visual Studio but Microsoft also released several free versions: Visual Studio C# Express, Web Express, VB Express.  Where in Visual Studio you can program all types of applications the Express editions are limited to Web development or Windows development. Beside Microsoft lots of different IDE are also available like from Borland. 


.Net code is compiled in native processor code.  Compiled code is a lot faster as interpreted code like PHP.  ASP.NET comes also out of the box with powerful caching capabilities what makes it very scalable.


Facing growth

Web development in PHP becomes harder to maintain and develop when the scope of the projects and the teams grows. 


PHP is perfectly suited for applications with a low degree of complexity.  It makes webmaster able to easily maintain the design and coding part of the applications.  When the complexity and size of the projects increase above a certain level it is not possible for one individual to have a complete picture of the application.  Organizations have to adapt and face new challenges.  Because the higher complexity demands more specialized skills webmasters have to specialize themselves in coders or webmasters and the development of web applications have to be more organized.  This is the time in the organization lifecycle where development processes arises.  With these processes more and diversified tasks have to be done like business analyses, functional analyses, testing and decision processes must be formalized. All theses tasks demand further specializations and organization members that are involved in the process of building new applications have to play new roles like the role of tester, architect, business analyst, project manager.   


To be able to work with many developers and to support the development process new tools have to be setup that helps maintaining the quality and productivity of the development and facilitates the communication between the different roles. 

Growing organizations needs tools that sustain the project lifecycle like source controllers that let several developers work on the same applications, release management tools where version of different applications are stored, process guidance tools that help the project manager gather data on the productivity or quality of the project, testing automation tools, reporting and planning tools.


Although some project lifecycle management software exist for PHP they are hard to integrate and to setup. This is the reason why at Skynet for PHP development we still miss all these tools that enhance the quality and productivity of the developments. .Net and other enterprise platforms like J2EE offer a large amount of such software.  Most of them can be integrated into the development environment of the developers or can be deployed as separated software for project managers, business analyst, testers.  Developments of projects in larger teams in .Net can be completely supported with Team System and it integrates perfectly into the usual tools used by the project manager or business analyst like Word or Excel. It comes out of the box with several processes like Agile or CMMI but can also be adapted to the organization existing processes.


PHP was and remain an open source project.  This explains why tools for the support of lifecycle management are hard to find and to integrate.  Nevertheless this could change in the future because PHP is now conducted by a commercial organization: ‘Zend Technologies’.  Zend is currently investing in the development of lifecycle management tools.  Nevertheless Zend is just a beginner and started to penetrate the market.  It could last for years before Zend will be able to compete with organizations as Microsoft, IBM or Sun that have invested since years in the development of lifecycle management tools.










Integrates tools for working in team  like source controller, process guidance tools, architecture tools



Yes, open source tools are available but they are not integrated

IDE with Integrated testing tools (Unit – Load).  Improve the overall quality of the development process




Compiled Code – Increases website speed (precompiled is the fastest)

Yes – both precompiled and dynamically compiled when a page is requested

Yes – both precompiled and dynamically compiled when a page is requested

No – a 3rd party accelerator (zend core) can be used to increase performance

Compiled Code – Compiler detect compile time errors what increase the early fault detection in code




Scripted Language – results in poor website performance



Yes – a 3rd party accelerator can be used to increase performance but it s not standard and outside component

Strong error handling features




Object Oriented – Increases the ability for code reuse and provides enhanced features as well as reduced development time; since code is more reusable, results in fewer bugs that can be discovered by any client and fixed for everyone; encourages developers to write more maintainable code.



No, even PHP5 is not truly Object Oriented

Strong Typed – Demand more effort to the programmer but pays of in  quality and robustness




Supported Development Languages – easier to find developers

C++, C#, Visual Basic.NET, Jscript.NET, Python, Perl, Java (J#), COBOL, Eiffel, Delphi – 25 languages supported currently



Browser Specific HTML Rendering – different HTML is automatically sent to IE than to Netscape, reducing incompatibility issues




Open Source






14:58 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : asp net vs php, comparing, asp net, php, web, technologies |  Facebook |


End To End testing

I truly believe in TDD (Test driven development).  Nevertheless I think that just TDD and refactoring don’t imply that the developers are writing first time right code.  TDD will only test the case the developer has thought of.  It’s a coding practice that is helping in improving the design but it’s not a guarantee for perfect quality.   

On the project we are currently working on, we’ve planned some end to end testing sessions. Each testing session’s goal is to test a couple of stories. We hope that these tests will be helpful to better understand what our end-users really want.   As we don’t have a dedicated QA team the responsibility of the tests is handled by our usability team.  They invited some end users for testing sessions. We already do a lot of tests but this is the first time we are organizing formal end to end tests during the development process. 

Although the first testing session will be held tomorrow I’ve the feeling that the investment we made by preparing these tests is already paying off. Usually a couple of weeks before the delivery date a lot of pressure are put on the head of the team.    The sessions are motivating the team to deliver a complete set of features at regular moments in time.  Because we organised these tests all over the development period we’ve divided the delivery of the product into small releases. The developers are therefore making regular sprints and this is improving our productivity and quality. 

Knowing that the fearless end-users are coming to evaluate our product stimulates us to deliver more quality.  It helped us discover bugs sooner because someone else that is not as close to the code check that the code is doing what he expects.

22:15 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : testing, xp, tdd, usability, end to end |  Facebook |


Web technology cocktail

Interoperability between PHP & .Net


In my team, we are currently testing a new type of architecture. We decided to mix technologies and uses PHP for the front-end of our application and WCF for the business tyre.

One advantage of PHP over .Net is that there are a lot more PHP developers available on the market and they are usually cheaper as their ASP.NET colleagues. Most of the developers working on the web started their career as webmasters. They learned programming on PHP because of the simplicity of the PHP language and the fact that Microsoft never made a product that was appealing to them. For most of this type of autodidacts it’s really hard to master an OO platform as ASP.NET of JSP. So in my opinion despite the fact that ASP.NET or JSP are far more advanced and proposes a better set of tools, PHP will remain for a long time the most used web platform. For the same reasons I predict that it will be very hard for Microsoft to sell his “expression” suite to webmasters.

The PHP language is very flexible and easy. The entering cost was really low, in a couple of days we where able to master the language. We found a very effective way of interoperate both technologies by using wsdl2php.

Nevertheless I’m a bit disappointed over PHP because we are missing a good development environment. For the moment we are using Zend Studio and it really sucks. The auto completion is not working properly and we were unable to configure it for remote debugging or for source control. We use a distant development server because the application will be deployed on linux clusters and we wanted to have the same development environment as our deployment environment. Zend is really bad with this type of configuration.

It’s like we are back to the stone age of development; no debugger, no source controller. Because of that we are forced to phone to all members of the team to know who is working on what. Our code is full of "echo" and "print_r" statements. Bugs appears because someone else has saved some new files on the server that are incompatible with the current version of the files.

PHP is a nice little platform but it really miss an IDE as VS.NET 2005 IDE and other tools that boost up productivity and quality.

13:20 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : interoperability, php, asp net, wcf |  Facebook |


MySpace or how to handle 40 Billion page views

An article about how the guys working for MySpace manage to handle 40 Billion page views a day!



22:28 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : page views, myspace |  Facebook |

Web 2.0 or the self organizing web

Till recently I thought that Web 2.0 didn’t mean anything but last year I had the opportunity to participate at the SAF summit in Redmond.  Their I talked to people like Michael Platt who is primarily focussed on everything that is in connection with the Web 2.0 hype.  Now I’m convinced that we should (re-)think our business and techniques to be part of the revolution that Web 2.0 will be for our industry.  We are at the beginning of a new era, a time of rapid evolution in the IT industry that will cause considerable changes.    This disruption is underway but the baseline of what will happen in the future or who will be the new leaders have not yet emerged.  Specifically online media companies like Skynet are facing big opportunities but before realizing these opportunities we’ve to rethink our business if we want to survive.


I believe that moving forward advertising based companies, like ours, will be one of the pillars of the new revenue models with great profit potentials.  I also believe that the market will localize and that the future belongs to local companies because the advertisement in the future will grow horizontally. Advertising based companies will attract more and more little companies and local players as Skynet have a big advantage towards big multinational players.


Web 2.0. is mostly associated to new technologies like Ajax, REST, Mashups but in fact it is the least relevant part of it. In fact I have to confess that I hate the Ajax hype.  For me Web 2.0 is more about the web organizing the knowledge generated by the web. It is partially about organizing content and communication in accordance with a new paradigm. But what are the components of this new paradigm? I believe that Tagging is one of them.  Tagging is a great example of how Web 2.0. enables the web to self organizing itself.  


Tagging could change the way we organize our advertisement and could be an incredible value differentiator towards our customers. By allowing users to bookmark our content we get also a way to know our self and the content we own better.  Tagging could be a way to generate knowledge around our content and make invisible connections appear.  We should think about different ways of letting the user tagging all types of our content on our site (pages, rss feeds, music, video’s).  This will increase the user experience because the user will be able to retrieve more easily content by the way he organized the content for his own.  This will also give the user the ability to retrieve content by the way other users has tagged the content. This intelligence could be an immense asset for our customers.  Think about the way we could organize their advertisement campaigns by using the intelligence that the users have created for us.  We could also re-unify the people and the content by making links between tags describing people and tags describing content. 


Also for direct marketing tagging could mean a revolution in the way we organize new services.  It seems obvious to me that we should re-invent the way we qualify our users.  Let them decide how they describe themselves; don’t format the answer like we do now! 

12:30 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : web, web 2 0, tag, tagging, ajax, web 2 0 tags tagging |  Facebook |


 My Block - Is left further than right?

This is the tutorial to build a my block "Is left further than right". The robot makes out whether of not the objects located on his left are further than on his right.  Therefore the robot turns first left register the distance and stores it into a variable "LeftSensor", then it turns right register the distance again and compares it with the variable “LeftSensor”. 


To make a “my block” you just start up a new program.  Once the program is completed you select the part of it you want to be reusable.  The variables that are outside your selection but where data are coming in or out become the input or output variables of your program.


So lets start, open a new program.

Select Edit  - Define variable – Define the variables: Input, Left sensor and Output.











Select Edit- Make a new My block
Folow the wizard and click Finish.
Have fun.

16:15 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) |  Facebook |

Lego Mindstorm Nxt intro

In November 2006 I went to Redmond for an architecture conference at the Microsoft campus.  My agenda was fully booked and I had very few time for myself. 


Nevertheless I managed to free one hour just before taking my plane back.  I went to the local Lego shop in the shopping center near my hotel and bought a Lego mindstorm NXT kit.  In fact I promised to my oldest son to bring him a robot back from the US.  I have to confess that for the moment it’s papa that exclusively play with the Robot.


Back to home I spend many evenings at experimenting with my son new toy.  I first assembled the basic Tribot and made some very cool little programs with the Lego visual development environment.   I found this environment very well designed and easy to use.  The documentation is also very complete but the tutorials are very basic. I suppose this will improve in the future.  Unfortunately I experimented also lots of frustrations when my programs became bigger.  The development environment crashed many times and I loosed many programs.  To avoid this I used “my blocks” this are reusable program components.  In traditional programming environment this type of reusable programming parts are called functions or methods.  “My blocks” can have input and output arguments. 


In this post I attached some picture of one of the robots I build.  It's based on the T-Rex but on wheels.  I modified the T-Rex design and replaced the legs with wheels because the legs of the T-Rex consume a lot of energy, are innefective nor practical to control.


In the next posts I will present one of the "My blocks" I programmed and try to provide a basic tutorial on developing your own "My blocks".  


A very cool site to learn programming NXT with the lego IDE can be found on: http://www.ortop.org/NXT_Tutorial/html/essentials.html This site contains lots a video lessons on how to program the NXT. 








14:01 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) | Tags : lego, mindstorm, nxt, robotics |  Facebook |


Welcome to my blog.  As this is my first blog I don’t know exactly what kind of things I will write about. This blog will be dedicated to information I want to share with others. I guess most of what I will write will be about internet and development and it will be technology oriented.  My goal is to share useful information with other people. To discus about technologies, provide useful tips.  I decided to choose for Skynetblogs not only because Skynet is my employer but also because this bloging site provide a great visibility in Belgium.


11:55 Écrit par Geoffrey Vandiest dans Général | Lien permanent | Commentaires (0) | Tags : welcome, geoffrey vandiest |  Facebook |