Time To Leave the .NET 3.5 Behind

by Dmitry Kirsanov 24. September 2012 08:32

For some software companies, the .NET Framework 3.5 is the current production version. However, it was also very problematic release because of the deployment issues. Windows Vista machines didn’t have it installed by default, so many companies continued to use 2.0 as much as they could, but then Windows 7 had it installed by default, so it became the new standard. But Windows 8 changed it all. More...

Advanced Testing in Visual Studio 2010 Team Foundation Server

by Dmitry Kirsanov 4. January 2012 17:10

Team Foundation Server 2010This is part 4 of Visual Studio Team Foundation Server 2010 for Developers walkthrough. Last time we were speaking about the unit tests, and that was useful, but very basic foundation of what you can do in terms of Test Driven Development. However, we can conventionally separate testing in Visual Studio and Team Foundation Server to 3 levels. So today we are going to talk about the second level – Advanced Testing techniques, such as Test Impact Analysis, Coded UI Tests and Load Tests.

If that’s only the middle layer of complex testing in Visual Studio 2010, what’s in the last one, you might ask? There will be test automation using Hyper-V virtualization with Virtual Machine Manager and yes, we will discuss it later as well.

But today we’ll begin with Test Impact Analysis. More...

URL Rewriting and Routing in ASP.NET 4

by Dmitry Kirsanov 9. December 2011 13:37

How to make the URL of your page look more user-friendly or just make it self-explanatory? And anyway – look different from what it really is? In ASP.NET version 4 it’s easier than ever.

Why would we need that feature anyway?

It’s been quite popular trend in web development since the very beginning of dynamic Web – first, we didn’t want anyone to see the extension of our files, as this posed a security risk. Anyone, who could see that our page is actually an ASP page, would understand that you have Internet Information Server, which was considered “dangerous” at that time – not even because it was too bad, but because Windows NT 4 Server was user-friendly enough so people wouldn’t need to be MCSE in order to install and run web server. It wasn’t hard for Linux either, but Apache didn’t offer any dynamic contents out of the box. More...

Search Engine Optimization in ASP.NET

by Dmitry Kirsanov 30. November 2011 09:19

ASP.NET engine is a wonderful thing. It does so much for you, that in the past could take ages and would earn you the title of demigod of Web Development. In some legacy languages, like PHP, it is still the case. For example, things like Localization and cross-browser support are very natural and automatic in ASP.NET, they don’t require any time or skills. You can add support of more languages, different output formats for date and numbers, add Ajax powered controls, caching, data access, perform various other high pilotage figures without thinking. I remember the time, when saving data between post-backs was an issue, and in ASP.NET it was solved by implementing the VIEWSTATE feature, which saves the state of page controls in one hidden field between submits - that feature alone worth a thousand words.

But ASP.NET comes to the rescue not only in obvious and direct ways - some features were introduced for one purpose, but perfectly helped in other areas. And one such area is Search Engine Optimization, or SEO. More...

What’s new in ASP.NET 4.5 - Performance improvements

by Dmitry Kirsanov 29. November 2011 11:40

A long time ago, when dinosaurs were still operational,  we tried to improve performance of our HTML / CGI pages by various ways, but also having different goals for such improvements.

In the dawn of web, when U.S. Robotics 14.4kbps modem was a de-facto standard and traffic compression wasn’t widely implemented by ISP call centers, our biggest concern was the size of our files. I wouldn’t say “output”, as it was mainly static, but even when it was dynamic, like the output from CGI modules written in Visual Basic 4 or 5, it was paramount that users would not wait more than 2 seconds to get the HTML part of it.

Now even mobile phones are having unlimited data plans, home connections reach 100 Mbit/s heights and in order to decrease the size of the output we just have to tick a checkbox in IIS, so the output – be it static or dynamic, is compressed. So the era of “HTML optimizers” – tools that remove extra spaces and “unneeded” tags from your markup, is over.

Another thing that helped us to avoid traffic jams, was Ajax. It killed 2 rabbits with a single shot – decreased the traffic flow by only up/down loading the data our application needs at this time, and thus increased the response time. But this came at a cost.

Each small callback made by Ajax is no different than ordinary callback, except that it transfer smaller amount of data. But it’s a connection nevertheless. Even if keep-alive is used by browser, it still consumes a connection from server and still there are protocol issues involved. More...

What can be done in 12 hours by an average .NET developer?

by Dmitry Kirsanov 19. October 2011 16:49

Have you ever heard about Garage48? That’s an event, which was born in Estonia last year and since then widely adopted by other countries. It’s scenario is such – companies give tasks – “ideas” that have to be coded to production quality in 48 hours. Students are coming to the event and working 48 hours non stop, for food and beverages, and contest winner get’s iPhone.

So, you have an idea and iPhone – now 5 undergrads can make it live, just give them enough hamburgers and Red Bull.

When I heard about it (in the context that one of my colleagues was eager to participate) I wondered what these students would gain from the event? I mean – in my 32 I wouldn’t participate in such event, have no sleep in 48 hours and produce free code for someone. I still didn’t get convincing answer, but from the point of view of the author of “idea”, this is the windfall.

But I’ve got itch to see what am I capable to do in these 12 hours. Having totally nothing but “idea”.

So, I’ve replaced Red Bull with German and Belgian beer, wrote my idea in 3 sentences and sat for 12 hours with my notebook.

I decided to create “URL shortening service”, which had to be functionally better than anything else in the market. Better from my point of view, of course. As I thought about it, and that time was also included in these 12 hours, I wanted this service to have:

  1. WCF backend. So I would be able to create utilities that would add new links automatically, with no user interaction. Also that would allow other tools to use the service and provide additional services.
  2. I would have QRCode for each link. And it would be created automatically.
  3. I could protect link by CAPTCHA
  4. Or by password.
  5. Or require visitor to declare his age, in case link is to age-restricted web resource.
  6. And make links expiring – either by date or redirections count.
  7. Also, I would like users to know where they are redirecting to. But not always. So there would be 4 different ways of redirection. 2 for client and 2 for server side redirection.
  8. I don’t want to have malicious links on that service, so they should be automatically scanned. URLs leading to malicious web resources should be removed.
  9. Overall good web design. Because tinyurl sucks.
  10. Some functions should be only available to registered members, but anonymous could use it as well. However, trusted people would have it unlimited at all.
  11. Engine should be available to 3rd parties, so they could install it and use with their domain name.

That’s pretty much for 12 hours, when there is no base, right? That’s what we say to our customers.

Anyway, in 12 hours of work I had a website which had a name, web design, logo, backend, database, frontend and additional infrastructure up and running in test environment. Debugging it took another 2 hours, and deployment – another 30 minutes.

You can take a look at that service here – https://byte.lv – just make sure you understand it’s beta and some things may glitch. I reserve the right for a bug, yes. Anyway, if you’d like to have this engine working for your company needs – sure you can have it.

 

P.S. Now imagine having 5 developers working 48 hours - that’s 20 times more than I had!

Visual Studio 2010 Test Manager Overview

by Dmitry Kirsanov 14. September 2011 16:17

A little demo about how to use Test Manager from Visual Studio 2010 Test Professional / Team Foundation Server.

This one is the first of a series and doesn't either have or require any sound. Ideal for those who are using it as a reference during the work with real environment.

Play it full-screen for a “better experience”

This is a typical lab from Microsoft Official Curriculum. Don’t know how you, but I usually enjoy seeing things done as much as doing them, whether it is a lab or a computer game.