Improving software quality: automatic testing
Jul 13th
Providing high quality software from early stages in the software project is the key to a successful project. We must check the quality of our software in every single release and make sure it’s meeting our expectations. It’s much easier to code having quality requirements in mind from the very beginning than finishing a module and then fixing all the unexpected behavior afterwards.
There are many tools to improve the quality of our work. Developers have refactoring tools, memory profilers, code coverage, etc. But in a software project we also have testing resources, also known as Quality Assurance. Their job is to test the application and find as many bugs as possible: to achieve a high quality product, thorough testing is a very important step. However, this can be a very tedious and time-consuming task. Fortunately, part of this work can be performed automatically using some tools.
HTML 5 C# Web Sockets server and ASP.NET client implementation
Jun 22nd
In the previous post we saw that Web Sockets are the best invention since sliced bread: they bring to the web the bidirectional full-duplex communication traditional desktop applications have been enjoying for quite some time now. It solves many current problems, and enables much more powerful applications than current standards.
I’ve developed a very basic Web Socket server implementation in C# just as a proof of concept. It handles the most basic operations you would expect from a server: start a new connection, disconnect, and send and receive data. Besides, I’ve developed the client part as well using regular ASP.NET. Actually it’s just plain HTML and JavaScript being served from an ASP.NET server – this example doesn’t use any fancy runat=server controls or anything of the like. The functionality is achieved with very simple and easy to understand JavaScript.
HTML 5 Web Sockets
May 30th
Following the series of posts discussing AJAX calls, today we’ll see what is going to be its evolution: Web Sockets. It’s still a very new technology, and support is starting to be implemented in most major browsers and web servers. But don’t count on using it yet, since most of the clients of your web app will not be able to use them. I’ll discuss web sockets here just so you know what the future is going to bring to the web apps world.
The history: the beginning of AJAX
The world wide web and the Internet started as a stateless content delivery mechanism, taking a step backwards compared to traditional desktop applications. Early Internet applications needed to explicitly request every piece of information, and the server sent only the requested data.
Then came what we now call “Web 2.0 application development”: Dynamic HTML, heavy usage of JavaScript, AJAX, and various plugins (Adobe Flash and Microsoft Silverlight). These applications were dynamic and responsive, and they brought much of that rich interactive experience users enjoyed in desktop client/server applications to the Internet. However, due to the request and response architecture that these applications are based on, the latest Rich Internet Applications still cannot match the connectivity and the capability to get real-time data that client/server applications had more than a decade ago.
PHP or ASP.NET?
Feb 9th
The other day a friend of mine was telling me he was going to start a new project. He wanted to develop a new web app from scratch, and was telling me he was going to use PHP. He did have experience with ASP.NET from some other projects, so I told him to use this technology. But he still preferred PHP. The reasons he gave me were:
- PHP is free. You do not have to pay to use it. With ASP.NET you need to pay a whole bunch of licenses.
- PHP runs faster than ASP.NET.
- PHP hosting is cheaper.
- Out there on the internet, you can see more PHP than ASP.NET applications.
- There’s more CMS on PHP than on ASP.NET.
Ok, he had his reasons, but I didn’t fully agree with him. So I discussed some of those ideas with him:
Sluggish database view? Materialize it!
Jan 26th
The other day we were having some slow database view at our project. It was the main view of the new module we were developing, and it was slowing down the whole application to an unacceptable point. It was a rather complex view and could not be optimized much more. So, what was the solution we adopted? We materialized the view.
Regular views store just the SQL script needed to retrieve the data, and every time they are consulted the stored SQL query is executed. However, materialized views not only store the script, but the retrieved records as well, making it much faster.
jqGrid multiselect: a little improvement
Nov 10th
The jqGrid plugin is fantastic. It provides an improved user experience and makes your web application stand out from the rest. But sometimes the default behaviour it has is not what we like, and those are the times when we have to dive into the source code to tweak it. And today was one of those times for me.
We’ve implemented the jqGrid plugin in a couple of pages in our project at work. We needed some multiselect in one of them. This option seems very easy to implement: just add a couple of options at creation time and you’re done… well, not quite. JqGrid’s multiselect default behaviour is not really the standard one. I mean, it is a multiselect, just not what the regular user might be used to.
Javascript frameworks overview
Oct 26th
A Javascript framework is set of pre-written Javascript functions aimed at simplifying development. They take care of the most common and time-consuming tasks, like AJAX-related techniques. But why should we use them? Well, keep in mind that a Javascript framework:
- Saves you time. Even if you really love programming in Javascript, you will save a bunch of time doing your work with one these frameworks.
- Has much of your work already done. Don’t reinvent the wheel. Don’t waste time in doing something it has already been done and tested and re-tested by thousands of users.
- Makes you use less code. With less code you get a smaller file size, better maintenance and less development time.
- Makes your code more readable. Which also aids in better maintenance and less development time.
- Makes your web application execute faster. These frameworks are really fast in performing their tasks and most of them have been optimized for really fast execution.
- Makes your web application run in most modern browsers. If you dealt with Javascript a bit, you’ll have realized how different browsers have different ways of the doing the same exact stuff. Handcrafted cross-browser development can get annoying and irritating. These frameworks have already taken care of that and will just work in most browsers.
HTML 5 canvas tag demonstration: Sierra adventure games
Oct 22nd
Can you imagine playing good old games you used to play when you were a kid in your browser? Yeah sure, there’s plenty of cool games developed in flash, you would say. Well, leave out flash. Leave out Java as well. Leave out any plugin that needs to be installed in your browser. What do we have left? Just plain HTML and Javascript. Now, that’s something different from what we’re used to see.
Martin Kool has made this possible. He has developed an open source engine to play games straight in your browser, using the canvas tag from HTML 5. And besides, he has ported many of the old Sierra adventure games, like Leisure Suit Larry in the Land of the Lounge Lizards, Space Quest I: The Sarien Encounter, Gold Rush, etc.

