Project Dotnetification

From Hattrick

Article originally published 21st of February 2008

The biggest project for us this year is rewriting all web pages. Hattrick has come to a point where its rather old code is inefficient and each new addition makes it harder to understand and work with. When rewriting, we will use a better web platform which in the end will improve our performance and make it faster and easier to develop new features.

The downside of this project is that during this period we may experience more bugs than normal. And as we started this project during last year, this is already a fact. However, some of these bugs aren't really bugs and perhaps knowing the reasons for some problems, and what good this project will do for Hattrick, will increase your patience. As a non-technician I know it did for me, so I'll share my personal experience with you.

My colleagues at the office are all very sweet and nice, but there are times when I feel like a complete outsider. This is because they're computer geeks (in my world everyone who works as a programmer is a geek), and I'm no (such) geek. This also means they speak a language, computer geekish, which I don't understand. Even so, there are times when I can't avoid learning something new. Lately my they've managed to add a new word to my vocabulary: Dotnetify. I doubt it's a real word (to be frank I'm quite sure it isn't), but my well educated computer science colleagues use it all the time and in a way that you could very well think they're talking about Messiah.

Looking at one of their thick books I saw that it really ought be .NET (and .NETify as a result of that). But while they seem to think it's fantastic, I mostly see annoying problems related to it. I also know I'm not the only Hattrick user who's felt annoyed and frustrated because of the problems lately. Knowing my colleagues are no idiots I understood they were most likely right, .NET is something good. But I didn't understand why it’s good or why it's needed for us. When they told me everything will be made in .NET eventually I felt I had gotten to the bottom with this.

ASP and .NET

When Hattrick got its latest remake, in late 2000, all web pages were made in ASP. Translated from computer geekish, ASP (Active Server Pages) is a platform you build web pages in. .NET is what they in computer geekish call a framework, which according to my dictionary means "a skeletal structure designed to support or enclose something". A part of this framework is ASP.NET, a newer and hotter version of ASP. In ASP all pages are stand-alone units, whereas all pages in .NET are connected to each other and working together.

Reasons for dotnetification

My colleagues tell me we've come to a point where our pages need to be rewritten. Some code still dates a few years back and can be made much more efficient. On top of that new code has been added to the pages when new functionality has been added, and each such addition also makes the page harder to understand and work with. Rewriting them in ASP.NET (=dotnetify in computer geekish) will improve our performance. Even more importantly, we get a standardised platform in which it will be faster to develop new features and we can also make the features look a lot better – all this with less work effort.

They also claim it's a lot more fun to work in .NET: "Working in ASP is like you having a daily endless discussion about daytrading, while working in .NET is like discussing new ideas for the game engine". I've difficulties arguing with that.

.NET for Hattrick

At the end of 2006, we had our first web page written in .NET. Since then all new web pages have been written in .NET and we have also dotnetified some old pages. The Youth Academies, the match list and bookmarks are example of .NET pages. You can easily see which pages are written in .NET and which are written in ASP; all pages ending with asp is written in ASP and all pages ending with aspx is written in .NET.

.NET seems to love start page

There is no such thing as a word for love in computer geekish, yet .NET seems to be in love with the start page. I can't remember how many times I want to see my match list or youth team and is redirected to the start page instead. Surprisingly my colleagues say there's a logical reason for this: When you log in to Hattrick you do it in ASP. At that time we also make a "fake" login to .NET for you. But as it's fake there are times when .NET loses the connection. Normally (if you've lost the ASP connection) you would get a time-out and would need to login in again, but now you are just directed back to the start page as you haven’t lost the ASP connection.

Before I knew the reason, this was even more annoying than getting a normal time-out, but now it doesn’t bother me much. That said, we will naturally try our very best to minimize these problems and it will be better with time. But unfortunately it will not be completely fixed until the whole site is converted to .NET (which will probably take all year, but most intense during the spring).

.NET, the troublemaker?

It would have been easy to blame the dotnetification for all kind of problems, but even a non-computer geekish speaking person as myself understands that it wouldn't be right and it wouldn't make things better either. In a constantly changing and developing environment such as Hattrick it's inevitable to experience some performance problems due to malfunctioning hardware or software, or a combination of both. Now I think most Hattrick users accept such problems, but with the "start page" problem described above and similar on top of them you may get a bit frustrated. But if you’re like me, hopefully you'll become less frustrated now knowing the reason.

Something broke...

...is a message we don't like anymore than you do and we will do our best to keep such messages on the lowest possible level. We've now done some system structural changes which will make us prepared for higher load on the site and keep our quality of service regarding site performance at a good level. The structural system changes also lead (one colleague even claims it was planned!) to a spare server to use for dotnetification testing purposes. Once a page has been dotnetified we will first let our voluntary staff test it for some time before we make the change for rest of you.

Testing is not bullet-proof

I wish I could have said that testing is bullet-proof, but it's not. There are times when a bug will slip trough the testing area without being discovered. The reason for this is often different browsers (and browser extensions) and problems that for some reason only show themselves at specific times/occasions or a combination of many different specific scenarios.

Rose garden promises

I will not try to make any empty promises which I know I will not be able to keep, and I think my colleagues agree. The fact is that the dotnetification will probably lead to the appearance of a few more bugs. We will try our very best to keep them out and act fast on those who slip through. But I also hope you will be able to cope with them in a better way now when you know what's going on and what it will lead to in the end – a better and faster Hattrick site.