20 07 2015
With ASP.NET 5 we don’t have current bundling and minification system available. It’s replaced by new one that is based on Gulp. Default web application shows how to minify simple and safe files. But if you have some more complex design with CSS files referring to images then you are on your own. This post shows you how to solve a problem.
3 03 2014
Facade is known pattern for communication layer between system parts. Facades are classes that provide often simplified access to subsystems functionalities but they don’t set any limitations for using subsystem classes directly. Facades can be found from many API-s in different forms, This posting is quick introduction to Facade Pattern.
19 12 2013
One problem related to composite pattern is how to implement operations over child collections. Composite classes have children and leaf classes not. There are many ways how to solve the problem of where and how to keep child nodes collection. In this posting I go through different options and analyze those solutions through different code examples.
9 12 2013
When building application that works both on WinRT and Window Phone you use Portable Class Libraries (PCL) for shared classes. As there are many application specific things that are not same on different platforms or that are not supported by PCL then you have to make some architectural decisions when creating shared functionalities. In this posting I will focus on persisting data for offline use.
5 12 2013
Composite pattern is used in many applications. It helps to build hierarchies of similar objects and handle slices of hierarchy as one. Maybe one of the most popular implementation of this pattern in .NET world is Nodes collection of ASP.NET TreeView control. In this posting I will introduce you composite pattern and provide some implementation tips and samples about it.
17 07 2013
Some business systems use simple change tracking. User name and timestamp are saved when object is created and modified. In this posting I will show how to do it easily with NHibernate. Related PostsCreating tag cloud using ASP.NET MVC and Entity Framework Entity Framework 4.0: POCOs and table-per-type inheritance mapping Too-Smart-Business-Object Anti-Pattern Using timer based […]
23 08 2012
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.
31 07 2012
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.
11 11 2011
.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.
20 06 2011
I fixed one controller action in my application that doesn’t seemed good enough for me. It wasn’t big move I did but worth to show to beginners how nice code you can write when using correct layering in your application. As an example I use code from my posting ASP.NET MVC: How to implement invitation codes support.