Too-Smart-Business-Object Anti-Pattern

Building up a good business library is art. Because every bad decision made early will eat project’s time later. Bad decisions will also waste many time of developers who have to use this library in their work. One of the most common mistakes made is mixing DAL functionality to business objects. At first it may seems like a good idea – why not have a smart objects? – but as project goes this solution causes more and more problems. And, be warned, each next problem is worst than previous.

Read more

Using var keyword in C#

Keyword var is cool thing we can use to make our code more readable for other programmers and why not – reviewers. But var can also be used to make our code difficult to understand. In this case, lte’s say, we are overusing var. So, var is like wine – if one takes glass of it then everything is okay in the morning, but if somebody takes it couple of bottles then the morning will be awful. Or let’s say – too much var will kill you?

Read more

Interface for Processes

I had to write one data import/export utility that moved data from one database to another. Once I was finished the first round of coding I found one thing that needed refactoring – the import/export process wasn’t generalized. It was part of importer/exporter utility main class (it was console application). After some refactoring I got some common things to use in other tasks like this.

Read more

Basic ASP.NET SEO

SEO is popular topic nowadays and as ASP.NET is growing its popularity also as platform for public systems. Therefore SEO is going to be more important topic also for ASP.NET developers. The world of SEO is always in rapid change – can you imagine that last year Google published 450 updates to it’s search engine algorithms? Although the field is changing fast there are some key points that has been fundamental and unchanged this far. Let’s see what is the minimum you should do and how you can make your sites more SEO friendly on ASP.NET.

Read more

C# and Partial Classes

.Net 2.0 provided us with new feature called partial classes. Using partial classes we can use multiple files to keep the code of same class. Yes – we can put some methods to one file and the others to another file. Although partial classes may be extremely useful they can be also used to ruin system’s technical design if developers don’t know what happens behind the compiler.

Read more