KiGG Design And Architecture – Part 4 Inside Infrastructure

by mosessaur| 30 January 2010| 5 Comments

Introduction

This is part 4 of this series which I don’t know when it will ends :o). In part 3 I started to to explore the Core of KiGG. In this part we are still inside the core, but we are going further deep to have a look inside the infrastructure.

I’m going to talk about infrastructure for the next couple of posts or maybe more. Because actually it contains the heart of KiGG.

More...

KiGG Design And Architecture – Part 3 The Core

by mosessaur| 29 December 2009| 10 Comments

Introduction

In part 2, we explored KiGG project structure. I gave a short brief and summary about each project in the solution. And briefly discussed the relation between them.

In this part we are going to start going much deeper. Staring with the Core, and this might take several parts by itself as the Core is huge and contains lots of stuff that worth to be discussed.

More...

Entity Framework Podcast and Unit Testing Video

by mosessaur| 22 December 2009| 2 Comments

Just done with my first video about Unit Testing Entity Framework with TypeMock Isolator. It is my very first video actually made in the community.

Also last October, I was interviewed by DotNetArabi on Entity Framework. That was my first Podcast too. The Podcast was in Arabic.

Here are links for both:

Hope you’ll enjoy it.

KiGG Design And Architecture – Part 2 Project Structure

by mosessaur| 27 November 2009| 5 Comments

Introduction

In part 1 I talked about KiGG high level architecture. In this part I am going to talk about KiGG project structure and summarize the purpose of each project in the solution. I’ll not go into deep details of each project. I’ll save that for some other posts, just be patient with me and stay tuned.

More...

KiGG Design And Architecture – Part 1 The high level design

by mosessaur| 15 November 2009| 5 Comments

Introduction

In this multi part series I am going to explore KiGG design and architecture as well as projects structures.

At the beginning I would like to give a brief about KiGG History.

About KiGG

KiGG is similar to DotNetKicks, Digg and DZone. However it much closed to DotNetKicks and way smaller than DZone. KiGG was founded by Kazi Manzur Rashid and first introduced in his article on DotNetSlackers.com: Kigg - Building a Digg Clone with ASP.NET MVC, that was on Feb 2008. It was built with First ASP.NET MVC preview.

In early this year 2009 on January, Rashid was almost done with KiGG, however ASP.NET MVC 1.0 was not released yet. At this time Rashid announced DotNetShoutout.com as first live application based on KiGG. On March 2009 Rashid released version 2.2 of KiGG after the release of ASP.NET MVC 1.0.

I joined the team on April and start working with Entity Framework implementation for KiGG as well as supporting the project.

Thank you Rashid for giving me this opportunity.

More...

Entity Framework 4.0 Beta 1 Sneak Peak Session at DotNetWork User Group in Cairo, Egypt

by mosessaur| 05 October 2009| 4 Comments

Introduction

Again I was honored to present a talk on first Egyptian .Net user group “DotNetWork”. My previous session -the first- was a joint session with Bishoy Ghaly about Entity Framework v1 in .Net 3.5 SP1. This session was about Entity Framework 4.0.

After we introduced Entity Framework to Egyptian community, I decided to give them a sneak peak at the new version of it. Comparing between both versions, showing the evolution and the massive enhancement made on the new version. The session covered the early CTP 1 of Entity Framework 4.0 Beta 1 that is released last June.

Presentation is available to download here.

More...

Introducing Entity Framework Unit Testing with TypeMock Isolator

by mosessaur| 06 September 2009| 16 Comments

Introduction

One of the challenging things with current version of Entity Framework, its leakage of testability. Which means when you build an application or module (e.g. Repositories) that depends on entity framework, it will be very hard to unit test your code isolated from Entity Framework. This might lead to conduct Integration Testing which will require a connection and interaction with underlying data store (database).

You might think of using to mock or fake Entity Framework data store dependent calls. But sadly and Rhino Mock mocking frameworks do not support this. And you’ll end up hitting the wall. Both frameworks are great useful and I personally use for a while now and very happy with it. But no one can deny limitations when exist.

And personally I was able to overcome the limitation of the testability of Entity Framework while I was working in  Entity Framework based models and repositories. But done that through unnecessary code refactoring and wrappers around none mockable classes such as sealed class EntityCollection<T>.

Finding a solution with TypeMock Isolator

In fact there is a solution, that will save you lots of workarounds and unnecessary code refactoring. You just need a full isolation framework. Isolator provides this capability. It allows to mock sealed classes and classes that have private constructors, static methods, and much more.

makes it easy to simulate and break the dependencies of any object in your existing code. In that way, it doesn’t force you to think about how your design might need to change. –The Art of Unit Testing book page 132-

So, TypeMock isolator is a perfect mate for testing code that has dependencies on Entity Framework as how I am going to show now.

More...

Multiple database support with Entity Framework

by mosessaur| 18 August 2009| 19 Comments

Introduction

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I’m going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Entity Framework providers

Entity Framework is database independent. Each database provider could have its own Entity Framework provider. Currently there are several database provider who support the current version of Entity Framework that is released with .Net 3.5 SP1.

A list of Entity Framework providers can be found .

Entity Framework multiple database support sample

In this post, I am going to demonstrate a sample application (based on northwind database) that is going to support both SQL Server database engine and MySQL database engine.

More...

Introducing Entity Framework v1 in DotNetWork User Group in Cairo Egypt

by mosessaur| 18 July 2009| 4 Comments

Bishoy Ghaly & me made an introductory presentation about Entity Framework for the first time in DotNetWork User Group in Cairo, Egypt –Saturday 18th July-

After a survey we made in June we discovered that an introductory session to Entity Framework is a must. So we prepared this 3 hours session -level 100- to introduce Entity Framework to the audiences.

More...

Silverlight 3 is out with SDK and Tools with useful links

by mosessaur| 11 July 2009| 1 Comments

Silverlight 3 is out, Scott Guthrie that on his blog. As I was started to upgrade my client, I thought it would be useful to search for the SDK and Silverlight 3 VS.NET tools too. Thought to share the following quick links for Silverlight 3

KiGG support for Entity Framework and MySQL

by mosessaur| 07 July 2009| 4 Comments

Introduction

is a Web 2.0 style social news web application developed in Microsoft supported technologies. It is an open source project hosted on CodePlex. It is live and running as DotNetShoutout.com.

KiGG and Entity Framework

On May 2009, I’ve completed the implementation of Entity Framework support on KiGG. KiGG design was very flexible to plug another repository implementation other than LINQ to SQL. So basically now KiGG comes with 2 repository flavours, LINQ to SQL and Entity Framework.

Read about .

More...

Microsoft ADO.NET Entity Framework Feature CTP 1 Post Beta 1

by mosessaur| 30 June 2009| 0 Comments

Microsoft ADO.Net team released (this month June 2009) a set of features that build on top of Entity Framework 4.0 Beta 1
The features included in this CTP are :

  1. that allows you to write Entity Data Model based applications without requiring external artifacts

CTP can be downloaded here

Enjoy it.

Entity Framework minimum permission considerations

by mosessaur| 21 May 2009| 7 Comments

Introduction

While working with Entity Framework v1 during implementation of Entity Framework repositories, I decided to test for partial trust environment. Particularly Medium Trust support. Will not go through whether currently support medium trust or not in it current or upcoming version, but I will go through one of the reasons why currently might not support medium trust. It is because MY implementation of Entity Framework. Note that I am saying MY, because Entity Framework application can run on medium trust.

More...

Entity Framework 4 Persistence-Ignorance First Look

by mosessaur| 20 May 2009| 8 Comments

Introduction:

From the moment I put my hands on Visual Studio.Net 2010 Beta 1 and I’m targeting EF4 –Entity Framework 4- as I was very excited to checkout the new cool feature of it.

Here I am going to highlight my first look at Persistence-Ignorance support in EF4.

More...

Introducing DataLoadOptions for Entity Framework ObjectContext

by mosessaur| 16 May 2009| 5 Comments

On my previous post “” I was suggesting another way to define eager loading for Entity Framework. In this post I will introduce my DataLoadOptions for Entity Framework ObjectContext.

The beginning:

Actually Eager and Lazy loading on Entity Framework is not that much fun like in Linq to Sql. However this is going to be improved in EF4.

Here I will focus on eager loading and my slight improvement to define eager loading in Entity Framework. When I start to think about, I wanted something simple and pretty close to the way Linq to Sql work. In Linq to Sql it is the DataLoadOptions that helps you define eager loading before start using Linq to Sql DataContext.

So I started to explore the DataLoadOptions code using reflector, to better understand how it works and how it helps Linq to Sql define eager loading.

More...