Cloud Hosting; Which provider to Choose?

June 5, 2010

Recently I accepted a freelance project with a fellow student, which involved possible high peaks of traffic. So we had to think about which provider would be the best Choice for this project.

We took a look at the 2 big players in cloud hosting: Google App Engine and Amazon Cloud.

Why do we only look at the big players?

  1. Something big won’t go down easily;
  2. If there are more people using a service, there is also more support;

A short list of key features, which involved our decision:

Google App Engine

  • No start-up costs;
  • No need to configure your own server;


  • High start-up costs;
  • You need to configure the whole server;

As our project is a relatively small project, which doesn’t need special server configuration. We chose to use App Engine. This has several consequences, as App Engine only allows you to program in Python or Java. We will go for Python.

So stay tuned for my new posts, which will be covering App Engine, Python and the Twitter API.

Using XML, LINQ and jQuery for a Google Maps Store Locator

April 1, 2010

For my current school project we have to make a store locator, where we display the nearest stores to the visitor. We choose to make this with Google Maps, our school requires us to make it in .NET.


The objective is to make a Store Locator with a good architecture. The maintainability and expandability is of great importance, also should it work on all platforms. The widget should be easily portable to HTML/ pyton/ php, so we choose to make the presentation layer in javascript, which all of these languages support.

When you use to make something in javascript you should definetly take a look at jQuery a javascript library, which will make your life much easier. You won’t have to think about cross browser support and your coding will be much more readable.

We came with the basic 3 tier architecture: View(Presentation Layer), BL(Business Logic) , DAL(Data Access Layer).

3 Tier Architecture

I was responsible for making the DAL(Data Access Layer) and the Business Logic, which in our case is a Web Service outputting XML, which the Presentation Layer can use. In the end I also made the biggest part of the presentation layer with jQuery.

So to sum everything up this is how I made the project:

Implementing DAL with LINQ

This is actually really simple, I didn’t spent much time on it. Although you can make this as complex as you want by extending the partial classes. If  you need more customization on the entities LINQ generated.

DAL Generated with LINQ to SQL drag and drop from Server Explorer.

I basically generated this in about 20 minutes a complete DAL.

Implementing Business Logic / Web Service

In the business logic web service layer we had a reference to our DLL, which was a class application library. This is where we made our custom queries with LINQ so we could use the data in our presentation layer.

This is the webmethod we are using to generate XML we use in the presentation layer:

[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public XmlDocument GetStoresInfo()

using (AWCDataContext awcDC = new AWCDataContext())

XElement stores = new XElement(“stores”,
from s in awcDC.Stores
join ca in awcDC.CustomerAddresses
on s.CustomerID equals ca.CustomerID
join co in awcDC.StoreContacts
on s.CustomerID equals co.CustomerID
where ca is CustomerAddress &&
/*AdressTypeID3 = main office */
(ca.AddressTypeID == 3/* && ca.Address.GeoCode.Latitude != “0” && ca.Address.GeoCode.Longitude != “0”*/)
select new XElement(“store”,
new XAttribute(“id”, s.CustomerID),
new XElement(“name”, s.Name),
new XElement(“address”,
new XElement(“postalcode”, ca.Address.PostalCode),
new XElement(“addressline1”, ca.Address.AddressLine1),
new XElement(“addressline2”, ca.Address.AddressLine2),
new XElement(“city”, ca.Address.City),
new XElement(“state”, ca.Address.StateProvince.Name),
new XElement(“country”, ca.Address.StateProvince.CountryRegionCode),
new XElement(“latitude”, ca.Address.GeoCode.Latitude),
new XElement(“longitude”, ca.Address.GeoCode.Longitude)
new XElement(“contact”,
new XElement(“firstName”, co.Contact.FirstName),
new XElement(“middleName”, co.Contact.MiddleName),
new XElement(“lastName”, co.Contact.LastName),
new XElement(“phone”, co.Contact.Phone))));

XmlDocument storesxml = new XmlDocument();
return storesxml;



This code does several joins in LINQ to SQL and puts the result in an XElement. This is done because the IQueryable is not serializabe… In my opinion they should make it serializable

Implementing the Presentation Layer

We first made the Presentation Layer with a .NET Google Maps control, but this would make our widget only usable in ASP.NET. So we had to think about a way to make the widget available to use in PHP/HTML/python etc.

We chose to use javascript with jQuery because nearly every platform supports this.

This is the javascript/jQuery code I used to retreive the xml with jSON:

$(document).ready(function() {

var map = new GMap2($(“#map”).get(0));
var burnsvilleMN = new GLatLng(44.797916, -93.278046);
map.setCenter(burnsvilleMN, 8);

type: “POST”,
contentType: “application/json; charset=utf-8”,
url: “WebService/StoreService.asmx/GetStoresInfo”,
//data: “{}”,
dataType: “xml”,
error: function(XMLHttpRequest, textStatus, errorThrown) {
$(“#output”).append(XMLHttpRequest.responseText + “<br />TextStatus: ” + textStatus + “<br />ErrorThrown: ” + errorThrown);
success: function(xml) {
// hier wordt de xml uitgelezen
$(xml).find(“store”).each(function() {
var storename = $(this).find(“name”).text();
var latitude = $(this).find(“latitude”).text();
var longitude = $(this).find(“longitude”).text();
var point = new GLatLng(latitude, longitude);
var marker = new GMarker(point);




Resources used:

If you have questions I gladly answer them if possible. Thank you for reading.

Tikibad Joke

March 25, 2010

Yesterday we(friends+me) went to tikibad, which is a big fun park with a swimming pool with many big slides, although I’m not a big fan of this I thought: “ah why not didn’t see my friends for a long time”.

Tikibad Sqimming pool picture with the glides outside.

So the night before we went(the day before yesterday) my friend told me they had a new place in the tikibad. He told me on msn: “They have a indoor surfing place (Flowboarding) where you can go for free you only have to pay a small desposit to borrow the board”. I first didn’t believe it, but after he let it sound pretty real I believed him. Hehe shouldn’t believe my friends so easy, I always do that.

So the next day I was really excited and told some other friends that I was going to do the inside surfing, hell I even looked up some youtube videos and I got some extra money for the deposit.

In the midday when we got together to have dinner together before we go to the tikibad, I told 1 friend about the inside surfing and he told me: “Haha you believed it? It was robin playing a joke he told me yesterday that he would try to play a joke on you”. At first I didn’t believe him, because I really wanted to do the surfing. But after some thinking the story about the surfing sounded indeed a bit fishy. He told me 5m high waves etc.

So after hearing that my exciting inside surftrip was just going to be the normal tikibad with some slides I felt really disappointed. I should admit he did a really good job on the joke! Although I’m a easy target.

I still feel the tikibad is not super fun, but it was a good day eating together and making fun of each other. The best thing of the tikibad was the throwing of those big bands and the guard getting angry that we should be a little more quiet and peaceful.

Good job Robin! 干得好

Implementing DAL

March 25, 2010

A short description why I choose for LINQ and not or any other way to achieve the Data Access Layer. And how I implemented it.

A short description about LINQ

LINQ is a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It extends C# and Visual Basic with native language syntax for queries and provides class libraries to take advantage of these capabilities.

A short description about

ADO.NET is a set of computer software components that can be used by programmers to access data and data services. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also be used to access data in non-relational sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product.

Why I chose LINQ over

–          Faster development cycle

–          New technology

With LINQ you have a faster development cycle as all your classes with attributes which represents your database are automatically generated. So if you update your database you won’t have to write all your classes again, LINQ will do this for you.

A new technology can be positive as well as negative, because it is new there may be not so many users using it yet, which can result in many bugs, which are out of your scope to fix. But a new technology also has positive effects as it often a new feature which will help.

Seeing LINQ is already pretty aged ~2years it is safe to assume that we can use this without experiencing too many bugs.

How I implemented LINQ

First of all I started reading various tutorials and this one was the best one I found:

After reading it I basically did the same thing described there. After that I tested if it worked by making a simple web application with the DAL for Adventure Works Cycles(AWC). I did this by making an advances query with LINQ in C#.

Resources Used:

Official Reunion 03/16/2010

March 17, 2010

Yesterday was a good day! It was our first reunion since we came back 2 months ago from China. Well most of us. Too bad kees and reinier couldn’t come.

We started the day a little bit formal. Frances reserved a room in a Cafe, where we had discussions and shared our experience of China. We talked about what we learned in China and how Check-It could improve for the next generation.

I personally don’t like this kind of questions as I’m not the person who would think about: What did you learn? What did you expect? I just go! People sometimes call me a simple, because I’m like that. I just call it more relaxed and not so stressy and complaining. A nice adventure is always good.

I also had a discussion with a Chinese woman. She was the kind of person who would really think about the culture differences and what she would learn. I think she also did research about it. She said to me that I didn’t get teached to do self reflection, by my parents and the school. She said: “It’s good to learn how to self reflect” which I answered: “It’s only good if you want to ;)”. By the way this is no offense. I’m just not a believer in the culture phases as I didn’t experience it.

The official conference lasted from 13:00 till 17:00 and we also got small breaks just to chat with the students, which was great. We talked a lot. Martijn said for the first time he had a relationship with Mandy a Chinese girl, hehe. In China he got asked so many times, but in the end they were together.

After being finished with the formal discussions, we went to a cafe to have a drink and chat and chat and chat. Frances joined us, the other teachers went home. Frances is one of it’s kind, she also went with us to the bars in China and is a real partygirl haha.

While chatting the subject changed to Kees and I think somebody said its amazing that he’s 53 or something like that. I don’t remember correctly, but than Frances said Kees was 63!!! Can you believe that? He always said to us he’s 53, guess he still feels so young.

Kees the teacher of the last 3 months in my internship in China even went with me, Maarten, Marry(GF) to climb a mountain, and it was not an easy mountain! We didn’t took the normal stairs because we didn’t want to pay 1 euro. It’s not much but it’s the idea. Hehe didn’t want to pay to go up on a mountain.

So we took the “FREE” way, by taking a different route without a stair. We didn’t know if we would get there, but we just tried. We kept on going till the top! And at least we found the way back with the paid stair haha. So in the end we went to the paid area without paying.

Kees standing on top! He climbed it first.

I don’t care to pay for fun, but this was much more fun than paying! Kees also preferred this haha.

So you see we thought he was doing really well for his age. 53.. But in the end he was even 63 which I heard yesterday. Pretty amazing.

Ah Back to the reunion. After drinking some and chatting in the cafe we went to a Chinese restaurant of course. Frances also joined us to there. We ate a la Chinese style. Many plates in the middle of the table and just pick whatever you like. They also had great Cha (Tea) and the food was delicious. Although my taste was a bit bad, because I ate tudou qiao (Patatoes) in the morning.

We also asked the Lao Ban (Boss) to make some Yu Xiang Qie Zi, but it was not so good. The one we ate in China was much better. Guess the dutch Chinese Food won’t taste the same.

After all it was a good day. It was really good to see everybody again! Guess it won’t be the last time.


Get every new post delivered to your Inbox.