Search This Blog

Friday, 17 December 2010

Building a Robust System


This is a technical entry, for all your techies out there.

One of the major issues with developing software, is the question of how to ensure that your software that you are creating, is robust and (relatively) bug free.

One of the best ways that I know of is thinking about how to test the software right from the beginning. (Also known as Design for Test)

In the case of the website registration, I am using some new technology (new to me), and building the tests to confirm that my database interfaces are working correctly.

The basic structure for the website user registration is:

[Database] <-----> [C# Entity Framework] <---> [Database Interface Class] <---> [ASP Page]

So, in order to confirm that the database interface is working correctly, I use NUnit to create real world usage tests (i.e examples of how I'll call the database interface in the ASP web app), before I complete the implementation of the database interface. By creating both positive tests (tests that do something) and negative tests (tests that use bad data); I can make sure that any bugs are ironed out before I start to use my database interface in anger.

The upshot is, by writing the tests for the code, at the same time as writing the actual code, you can trap any bugs as soon as they appear, and have the confidence that your software will work, before using it as part of a larger system.

Things that have been done:

Website has been moved to Windows, so I can use .Net
User registration database is set up
Unit tests for database interface are written

Outstanding

Finish implementing user database interface
Create web pages to talk to database interface
Create program to send email to people in database.

No comments: