by Leon Cullens
22. februari 2012 21:52
Now that we've come to an end you hopefully have a good understanding of how to make your software testable, how to write unit tests, what the best practices are and what TDD is. Unit testing proves itself as a very valuable technique to constantly validate if your software is still working (regression testing) and it enables you to automate a large part of your testing process. However,More...
by Leon Cullens
22. februari 2012 19:34
Now that you probably have a good grasp on the basics of unit testing, you probably want to see some examples that put all of this knowledge together. This chapter will do just that; I built a little simple ASP.NET MVC 3 application that allows us to withdraw money from an account, deposit money on an account and transfer money to another account. I kept everything very simple, ignoring lots of best-practices to keep the unit testing as easy as possible. More...
by Leon Cullens
22. februari 2012 18:34
Now that you know what test-first means and how you can build a testable architecture, you are ready to start writing some real unit tests. This chapter will explain what kind of assertions you have, how a good unit test is set up and more. More...
by Leon Cullens
11. februari 2012 16:48
In order to be able to test your software without applying many dirty hacks, you have to embrace a couple of architectural patterns that allow you to isolate the pieces of code that you want to test. I will explain a few principles that are crucial if you want to build good, testable software. More...
a82a732e-9d67-41d3-aece-5b056dae2510|1|5.0
Tags: testing, unit testing, MVC, dependency injection, MVP, MVVM, WPF, Ninject, StructureMap, Autofac, Adapter, wrapper, repository, architecture
Testing
by Leon Cullens
6. februari 2012 23:50
There is a practice that states that one should write tests before writing the code itself. This is often referred to as test-first or test-driven development (TDD). It is a practice that has some nice benefits, that's why I decided to tell you a little bit about it in this article. Before I explain the pros and cons of TDD I will explain how it works first. More...
by Leon Cullens
6. februari 2012 23:45
In this series of blog posts I will try to give the reader a good understanding of unit testing and the most important things that are associated with it. Nowadays unit testing is a very common practice that every software developer should know about. In this series of articles you will read about the purpose of unit testing, test-first (TDD), building testable software architectures and of course the unit testing itself. My samples are written in C# 4.0 using ASP.NET MVC3, Ninject, Moq and MSTest, but I will provide links and information about other frameworks as well. The principles of unit testing are pretty much all the same on other platforms, so even if you are a Java or PHP programmer you can follow this guide. More...
by Leon Cullens
10. januari 2012 19:44
One of my favorite design patterns is the 'repository pattern'. That's why I decided to dedicate a complete blog post to it. Using the repository pattern in your application can yield a lot of benefits, such as improved testability, easier ways to implement caching and transactions, avoidance of code duplication and it allows you to replace the data source easier (although that probably won't happen too often). More...
by Leon Cullens
1. januari 2012 21:54
The IT sector lends itself very well for working as a freelancer. A lot of software developers actually have some freelancing experience. A lot of books and articles have been written about pleasing the client and delivering the right software at the right moment. Far less articles however have been written about the way clients should behave. That fact that clients pay our bills in the end doesn't mean we should tolerate their, sometimes, very rude behavior. This rant contains the subjects that, I think, are the most important. More...
by Leon Cullens
24. december 2011 15:18
The .NET CLR can give your web application a significant performance boost compared to other platforms such as PHP due to it's compiled nature. Not only does your .NET code perform better because it's more low-level, it also comes with good support for parallel programming. This guide will not explain the basics of a responsive and fast web application by talking about CSS minifying, sprites, content delivery networks, etc. Instead this guide will be an essential guide for making sure you don't miss any features that can enhance the performance of your ASP.NET MVC3 application. More...
by Leon Cullens
21. december 2011 09:36
During my internship at sound of data I had to build a management interface that enabled the user to view the push messages our platform (IRIS) sent to our clients. The amount of messages we are sending on a daily base are immense, so I had to come up with a good way to display this data pretty much on the fly. I ran into a lot of issues (all of which I've fixed), but the main problem was MySQL's InnoDB very poor COUNT() performance when iterating through ~2 million lines of test data I've inserted into the database. I found a nice work-around for this problem that speeded up querying the amount of rows in the database by a factor ~million. More...