Modern Web App Architecture

Thursday, July 25, 2013

Modern Web App Architecture Yesterday, I had an architecture consulting session at a customer. They are currently evaluating the creation of a new product which is going to be created as a web app. At the end of the day I decided to create a diagram of how I see today’s modern web apps architecture. Here is what I ended up with: Pay attention that since the customer is using ASP.NET I have written the presentation layer with ASP.NET MVC. This can be changed to any framework that you use (for example Ruby,...
no comments

Building N-Tier Applications with Entity Framework 4 Slide Deck

Tuesday, November 30, 2010

Building N-Tier Applications with Entity Framework 4 Slide Deck I just finished my session in Teched Israel 2010. The subject was building N-Tier applications with Entity Framework. I want to thank all the attendees who joined me at this morning after yesterday’s party. The subjects that I covered are how to build N-Tier applications on top of Entity Framework in three different approaches – Self-Tracking Entities, Data Transfer Objects and POCO. If you are interested you can download the slide deck and demos from here. Enjoy! CodeProject

Too Much Abstractions? Follow up

Saturday, July 17, 2010

Too Much Abstractions? Follow up I asked a question about how to know when you have too much abstractions in your code? and do more abstractions implies better design? I promised to do a follow up post and give my humble opinion. So here it goes. As architect I’m using abstractions a lot. It allows me to hide the implementation details and create API’s for my consumers. Also, it lets me the ability to change the implementation at a later stage of the project if I need to and of course it makes the code more testable.  One other thing...
no comments

Too Much Abstractions?

Thursday, July 15, 2010

Too Much Abstractions? Yesterday I had an architecture consulting session at a major customer. One of the questions that were raised was how to know when you have too much abstractions in your code? or to make it even more interesting – do more abstractions implies better design?  I want to make it an open discussion and to hear what is your opinion about this subject before I’ll post my own.
one comment

Eager Loading with Repository Pattern and Entity Framework

Tuesday, June 22, 2010

Eager Loading with Repository Pattern and Entity Framework One question that I received yesterday after I published the Revisiting the Repository  and Unit of Work Patterns with Entity Framework post was how to include the eager loading ability of Entity Framework. This post is offering a solution. Revisiting Eager Loading and Lazy Loading Lazy loading is a design pattern that is commonly used to defer initialization of an object up until it is needed by the program. The gains of using the pattern include efficiency (if it’s used right) and sometime performance. Eager loading is the opposite pattern of lazy loading....

Revisiting the Repository and Unit of Work Patterns with Entity Framework

Monday, June 21, 2010

Revisiting the Repository and Unit of Work Patterns with Entity Framework In the past I wrote two posts about the Repository and the Unit of Work patterns (here and here). Today I want to show a better and less naive solution for imposing the Unit of Work and the Repository patterns with Entity Framework. Revisiting The Repositoy Implementation In the Repository pattern, I added to the interface two new methods for adding and removing an entity: public interface IRepository<T> where T : class{ T GetById(int id); ...

Cache Retrieval Pattern

Sunday, June 13, 2010

Cache Retrieval Pattern In my previous post I wrote about cache layer and its position in every application. In this post I’m going to explain what is the cache retrieval pattern and show an example of how to implement it. Cache Retrieval Pattern When we implement a cache layer we need a strategy in order to retrieve cached items. The cache retrieval pattern is very simple and can be imposed into any application very fast. So how does it work? The business logic component will use the cache API in order to check whether some data exists in the cache. If the...

Cache Layer

Friday, June 11, 2010

Cache Layer Lately I found myself in some architecture consulting sessions at some customers. In every one of those customers I found myself explaining how to implement a cache layer in order to decrease the amount of round trips to the database and for better scalability. In this post I’ll try to explain in high level how to build a cache layer. Deciding to Build a Cache Layer Every application that performance is important to its developers and managers must contain some sort of caching. The cache is a veryfast in memory resources container which holds relevant data close to the application...

Using Unit of Work Pattern with Entity Framework

Friday, February 5, 2010

Using Unit of Work Pattern with Entity Framework In a previous post I explained how to create a simple repository on top of Entity Framework. In this post I’ll explain the Unit of Work pattern and how we can use it with our data access layer. What is Unit of Work Pattern? In his famous and developer must read book “Patterns of Enterprise Application Architecture”,...

Table Per Type Inheritance in Entity Framework

Friday, January 22, 2010

Table Per Type Inheritance in Entity Framework The first inheritance mapping I’m going to show is called Table Per Type or TPT. Before I start with the example lets define what is TPT. Table Per Type Definition TPT is an inheritance described in the database with separate tables. Every table provides additional details that describe a new type based on another table which is that table’s parent. In the following database ERD the OnlineCourse table is a concrete type of Course:   As you can see the CourseID of both Course and OnlineCourse table are the same identity. TPT Example The following steps will...