Mixing Table Per Hierarchy and Entity Splitting

July 25, 2010

Mixing Table Per Hierarchy and Entity Splitting Yesterday I published an article on the CodeProject site about Table Per Hierarchy (TPH) in Entity Framework. I got a very good question about “How would the EF handle this with a true association table?” – which means removing the two dates from the Person table and creating an association table instead that will hold only one date field. This post will try to answer the ...
no comments

ASP.NET Output Cache Provider

July 18, 2010

ASP.NET Output Cache Provider One of the new features that were shipped with ASP.NET 4 was new providers for caching purpose. In this post I’ll explain one of them – the OutputCacheProvider. OutputCacheProvider Up until ASP.NET 4 the output cache mechanism was implemented as in-memory caching and we couldn’t do nothing to change its behavior. If we desired to use a...
3 comments

Too Much Abstractions? Follow up

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?

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

Adding a Javascript Block Into a Form Hosted by WebBrowser Control

July 13, 2010

Adding a Javascript Block Into a Form Hosted by WebBrowser Control Today I found myself with a need to add a javascript block into a WebBrowser control in order to do some work. This post will show you the steps to do exactly that. The Problem In a project I’m consulting for there was a need to dynamically add a javascript block into a web form that is hosted inside a WebBrowser control. So what can we do? The Solution We can use the Microsoft HTML Object Library to achieve the task.  The Microsoft HTML Object Library is a COM library that you...
no comments

OData Explorer

July 6, 2010

OData Explorer One nice tool to use with OData is the OData Explorer. The OData Explorer is a tool that helps to explore OData feeds in a visual way and not by exploring the Atom/JSON responses. You can download the tool from here. Another way to use the tool is by going to the following link: http://Silverlight.net/ODataExplorer. OData Explorer Requirements The tool is a Silverlight 4 project. In order...

Repository and Unit of Work T4 Template for Entity Framework

July 5, 2010

Repository and Unit of Work T4 Template for Entity Framework Two weeks ago I wrote the Revisiting the Repository and Unit of Work Patterns with Entity Framework post. One thing that I thought would be nice was to have an automatic code generation that will help me to build these patterns without sweating. So I sat down and created a T4 Template to auto generate the same patterns that I showed in the post. The Code One thing to understand is that the provided T4 Template isn’t bullet proof and errors can occur (you can change the implementation as you like). In...

Loading WCF Data Services Ajax Script Library

Loading WCF Data Services Ajax Script Library Since I’ve given sessions about WCF Data Services in  the past (when they were called ADO.NET Data Services) I wanted to reuse some of the Ajax examples I showed for my coming OData  session. One of the things that have been changed lately were the scripts to use when you want to make Ajax calls to your Data Service. So I downloaded the new scripts and saw that the names of the objects to use have been changed a little but their functionality remained the same. Moreover we have a new feature...

Calling a WCF Data Service From jQuery

July 4, 2010

Calling a WCF Data Service From jQuery I’m working on a lecture about OData which I’ll will present next month (stay tuned for more details in the near future). One of the things that I want to show is how easy and simple it is to consume a WCF Data Service (OData feed) with the jQuery library. In the post I’ll show you exactly how to do that. jQuery’s getJSON Method When you want to load JSON data from the server using a GET HTTP request in jQuery you will probably use the getJSON method. That method gets as input the...