Browse by Tags

All Tags » Design (RSS)

Use Extension method to write cleaner code by Fredrik N

This blog post will show you step by step to refactoring some code to be more readable (at least what I think). Patrik Löwnedahl gave me some of the ideas when we where talking about making code much cleaner. The following is an simple application that...

Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 4 of X – DomainService, using DTO and Unity by Fredrik N

Note: The code in this post is based on the VS 2010 Beta 2, and changes can be made until it hits RTM. In my previous post I wrote about how I have implemented the MemberRepository and prepare it for using Dependency injection of an ObjectContext etc...

Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 3 of X – Repository implementation by Fredrik N

Note: The example code in this blog post is based on the VS2010 Beta 2, changes can be made until VS2010 hits RTM. In my previous post I wrote about how I use MEF and Entity Framework 4.0 Code-only feature. I have done a lot of refactoring and added the...

Distributing domain entities over the wire by Fredrik N

When we design our domain entities we don’t have a presentation layer or database in mind. The domain entities are core business objects located on the server or client side based of what kind of application we are building. Domain entities aren’t designed...
Filed under: , , ,

RIA Architecture with Silverlight in mind by Fredrik N

Rich Internet Application (RIA) is an interesting topic. More and more business apps are moving into to the cloud, and more and more will have better User Experience (Ux). According to Gartner Research, nearly 60 percent of all new application development...

Isn't it boring to write crosscutting concerns? by Fredrik N

To make sure we have clean code and make it easy for us to maintain, we should try to be lazy and reuse code as much as possible, we should also avoid redundant code. But when it comes to crosscutting concerns, we have to be redundant, or? What code is...
Filed under: ,

Returning IQueryable<T> by Fredrik N

Since LINQ was added to the .Net Community as a new wonderful new player, more and more solutions I have seen returns the IQueryable<T> from the Data Access Layer. One reason is to easy create different kind of queries in an easy way and execute...
Filed under:

Using Web Services in a 3-tier architecture by Fredrik N

During the age of the Windows DNA, most of us developers used COM/COM+ and a 3-tier architecture. Where we separate concerns by placing the views to present data into a layer called PL (Presentation Layer), we add all business logic into one single layer...
Filed under: ,

Map Objects to one Object by Fredrik N

In my previous post I wrote about how we could use Dynamic Compilation for mapping object to object in a configuration file, mosly for fun to simply try something different. I spend a few minutes to see if I could do something more with it. It ended up...
Filed under: ,

What do you think about using a presentation model for presenting your domain model? by Fredrik N

I’m writing a small app for a demonstration purpose. What I have is a domain model where I have a Customer, I also have CustomerRepository. public class Customer { public int ID { get; set; } public string CompanyName { get; set; } public string FirstName...
Filed under: ,
More Posts