Archive for the ‘ .NET ’ Category

Acceptance testing with FitNesse and .NET

FitNesse is an open source software testing tool which can be used to do acceptance testing in a lot of different scenarios. It was originally developed to test java applications but can also be used with some modifications with the .NET framework. Since the documentation for using it in .NET is widely spread across the web I decided to write down some of the information that I have found useful in a few posts. Another useful resource of information is Gojko Adzic’s book about Fitnesse. This post sums up briefly what you need to do in order to

  • … install and run FitNesse
  • … develop the integration layer
  • … create a test page

Read more

Entity Framework 4.0 Code-First vs NHibernate

Microsoft’s .NET Framework Version 4 includes a version of the Entity Framework, which allows two ways of creating your model: Database First and Model First. Database First was already available for the previous version of Entity Framework. It means that Visual Studio’s Wizard is used to point to a database and Entity Framework generates the model classes and mappings out of the database tables. Very often the domain model looks different than the data model, which means either developing another mapping layer between the generated classes of Entity Framework or a lot of customization on the generated classes themselves. For this reason it is also possible to use the Model-First approach, which allows you to use the graphical designer and design your model first and then let entity framework generate the database schema and mappings.  Lately another approach has been introduced as a CTP: Code-First.  Instead of using the designer,  Code-First allows you to code your domain with POCOs and persist this plain model using Entity Framework. This article compares Entity Framework 4 Code-First CTP with NHibernate in terms of usability (not performance-wise) using examples of domain driven design concepts.

Read more

Inversion Of Control

Introducing inversion of control into your enterprise application improves flexibility and maintainability. In this article I want to explain the concepts of inversion of control and dependency injection using an illustrating example based on unity. Read more

Useful development tools

Data Contracts vs. Domain Objects

In this post I want to cover the differences in the usage of data contracts and domain objects. I have seen a few times that people are mixing up the two concepts. With this post I want to explain why data contracts and business objects should be treated as a separate things and not be merged.

Read more