X

Architecture/Design/Patterns

Design Patterns: Elements of Reusable Object-Oriented Software

Design Patterns is golden classics of software design books written by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides (aka Gang of Four – GoF). When this book was published first it was revolutionary because it contained still undocumented knowledge from software development field that needed some systematic work and organization on it. Today we see these patterns in many programs and developers on different platforms are more and more aware of these first defined design patterns. If you are software developer then this is must-have book for you.

Adding multiple data importers support to web applications

I’m building web application for customer and there is requirement that users must be able to import data in different formats. Today we will support XLSX and ODF as import formats and some other formats are waiting. I wanted to be able to add new importers on the fly so I don’t have to deploy web application again when I add new importer or change some existing one. In this posting I will show you how to build generic importers support to your web application.

Using AutoMapper to build base class for mappers between domain classes and models

It is often good idea to isolate our domain model from consuming applications by using service layer and data transfer objects (DTO) or application specific models. Using DTO-s means that we need two-way mapping between domain classes and DTO-s. In this posting I will show you how to use AutoMapper to build generic base class for your mappers.

Using Lazy and abstract wrapper class to lazy-load complex system parameters

.NET Framework 4.0 introduced new class called Lazy and I wrote blog post about it: .Net Framework 4.0: Using System.Lazy. One thing is annoying for me – we have to keep lazy loaded value and its value loader as separate things. In this posting I will introduce you my Lazy wrapper for complex to get system parameters that uses template method to keep lazy value loader in parameter class.

Using timer based Unit of Work and Command classes to measure repositories performance

In my last post Find out how long your method runs I introduced how to measure the speed of code using actions. In this posting I will make a step further and give you some ideas about how to create easily measurable code units and how to build measurable scenarios of them. As a foundation I use simplified versions of patterns like Command and Unit of Work.

Returning paged results from repositories using PagedResult

During my large database experiment I wrote simple solution for paged queries that I can use in my repositories. This far my experiments have shown pretty good results and I think it is time to share some of my code with you. In this posting I will show you how to create paged results using NHibernate and Entity Framework based repositories.

Patterns of Enterprise Application Architecture

Lately I finished reading the famous patterns book by Martin Fowler - Patterns of Enterprise Application Architecture. This book introduces and describes design patterns you will usually see when building enterprise applications. There are also examples for patterns and although they are simple and primitive they give you the idea how to implement or use specific patterns. If you are working on enterprise applications every day you will find this book very useful and I’m sure you will use it as manual.

Visual Studio 2010: UML modeling projects

Visual Studio 2010 introduces modeling projects that bring UML diagrams to Visual Studio. Currently it is not possible to generate classes from diagrams automatically but I don’t think it is a problem – good UML diagrams visualize different aspects of system short and clearly and they usually don’t document everything you can find in system. In this posting I will show you how to use modeling projects in Visual Studio 2010.

Writing cache based repositories for web application prototyping

When I started building in-house demo application I thought about how to solve temporary data layer so I don’t have to use real database and object mappings for it. Playing with new object model and new components I move way faster if I don’t have any additional ballast that I can avoid. So I wrote simple cache based repository mechanism I can use to imitate real repositories that I will write in the future.

Modeling people and organizations: Party generalization

Classes for people and organizations are often modeled incorrectly in object models. These faults cause heavy implementation problems. In this posting I will analyze some legacy models, introduce class Party as generalization of people and organizations and provide some implementation details. Information here is based on my own experience, like always.