This post if part of the Student Project Express, a series in which I am showing how to complete a Student project using Microsoft technologies. The table of contents for the series is available here and I will keep it updated as as publish more content. 

We are ready to rumble… we received the brief, read it and understood what we need to do. It is now time to start thinking how we want to implement the solution and pick up the technologies we want to use.

Of course, as I mentioned in the introduction post, I will be focusing on using Microsoft technologies for the project. This doesn’t mean that all of our choices are limited though, since Microsoft has a number of different technologies that can be used to complete of project of this kind and it is up to us to decide which ones will fit better for our purposes.

Looking at the high level architecture diagram included in the project brief, we need 3 different tiers for our solution: a database tier, a web services tier and a front end tier:


Our technology selection needs to consider all the three tiers and how they will integrate with each other rather than being based on just a pure preference of technology for each one. The reason why we need to consider the whole picture is that often what is seen as “best in class” in isolation, can be so difficult to integrate with the rest of our solution that it rapidly loses its advantages and becomes an extremely difficult and/or expensive component to maintain, support, develop, etc.

One of the biggest advantages of the Microsoft stack, is that every component is designed and optimised with work with each other and as such maintenance of an environment running on this technologies is typically easier.

1. Platform

So, for the purpose of this series my selection in terms of OS platform is going to be Windows Server 2008 R2. Released in October 2009 (at the same time as Windows 7) and it is a very good platforms for developers with its great support for the .NET framework and the built in Virtualisation features. We will not be looking at other features built into the platform (especially for scalability, maintenance, etc) but I would recommend you take a look at those anyway as I strongly believe developers should have a solid understanding of what managing a complex infrastructure means for an organisation. As mentioned earlier, each technology component we pick is going to have an impact on the bigger picture.

2. Database tier

In terms of database, I will be using SQL Server 2008. It is an incredibly solid database, and I have been using it for years (since SQL Server 7 back in 1999!!!). The most interesting part of SQL Server we will look at its support for the ADO.NET Entity Framework for data access. While it is always possible to use a database engine by simply coding SQL statements within our code, this practice has many drawbacks especially in terms of shielding the application logic from changes on the database layer.

Also, relational databases work in a different way from Objects in programming languages and often we need to write code to “bridge” this differences. A very good explanation of this concept is in the Wikipedia article about Object-relational mapping:

For example, consider an address book entry that represents a single person along with zero or more phone numbers and zero or more addresses. This could be modeled in an object-oriented implementation by a "person object" with "slots" to hold the data that comprise the entry: the person's name, a list of phone numbers, and a list of addresses. The list of phone numbers would itself contain "phone number objects" and so on. The address book entry is treated as a single value by the programming language (it can be referenced by a single variable, for instance). Various methods can be associated with the object, such as a method to return the preferred phone number, the home address, and so on.

However, many popular database products such as structured query language database management systems (SQL DBMS) can only store and manipulate scalar values such as integers and strings organized within normalized tables. The programmer must either convert the object values into groups of simpler values for storage in the database (and convert them back upon retrieval), or only use simple scalar values within the program. Object-relational mapping is used to implement the first approach.

The heart of the problem is translating those objects to forms that can be stored in the database for easy retrieval, while preserving the properties of the objects and their relationships; these objects are then said to be persistent.

3. Logic tier/Web services

Just like in any platform, there are a number of different ways to implement web services in the Windows platform. The one I will be using is Windows Communication Foundation (WCF). As described on the MSDN website

“Windows Communication Foundation is a part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications that communicate across the web and the enterprise”

I decided to use WCF because it will allow me to implement services using the SOAP protocol. A perfectly valid alternative would be to use REST services and in this case my decision has been driven just by my personal preference and experience. While there is a strong debate on which approach is better, in this case I personally believe they are just “as good” and as such I am picking the one I feel more comfortable with but also may be different from what students typically see and study (so I hope to provide some useful new information).

4. Presentation layer

Here is where the game gets more interesting I think… There are a number of potential different approaches we can take for our presentation layer and each will have its own pros and cons. In the .NET world there are two main approaching to building web apps: ASP.NET webform and ASP.NET MVC. Here too there is a huge debate on which approach is the best one but from my experience I think it depends on one’s preference and attitude. This blog post by Shiju Varghese gives a good overview of the main differences and I personally agree with his conclusion:

“The choice would be vary on different people. If you want more control over the HTML or you want Test Driven Development (TDD), or you care about web standards, accessibility, or you want to build SEO based URLs, you can choose MVC model. If you want rich controls and state oriented event-driven web development, you can choose Web Forms model”

For the scope of this project I will be using ASP.NET MVC especially because I believe it is going to be an easier approach for those who are familiar with other web development technologies (such as PHP for example).

What is next?

I think this defines quite well the general approach I am taking for this project. I would be interested in knowing if anyone has any comment, questions or suggestions on these and of course I will try to reply and address all of those!

The next step will be to download and install all the software we will need to start developing the solution and setting up our enviroment(s). I will show you how as a student you can get hold of all the professional tools and packages you will need to implement all of this and to learn how to use these technologies!