Running services in long lived applications in .NET

You have probably created a windows service or other types of applications where you have code which need to be run in the background to not block the main thread. To do that you have different types of solutions in .NET, for instance Threads, Timers and Tasks. However, you need to construct them manually, make sure that they do not throw unhandled exceptions etc.

Griffin.Framework provides a simpler solution where you only need to implement a small interface. The library also have full support for your favorite inversion of control container, which enables to to use dependency injection in your application services.

Continue reading “Running services in long lived applications in .NET”

Command/Query library with network and IoC support

Have you read about the Command/Query separation pattern and wondered how hard it would be to get started with it? With Griffin framework you only need a few lines of code to have everything configured, no matter if the messages are being executed in process or executed in a server application somewhere.

Continue reading “Command/Query library with network and IoC support”

Easy and perfomant client/server communication with protobuf-net & Griffin.Framework

ProtoBuf is Googles open serialization format which can be used to serialize objects in a standardized way. With it, different platforms can communicate with a format that is much more efficient than XML. Combine the most popular implementation if it, protobuf-net, with Griffin.Framework and you get an easy and fast way of sending information between processes.

Continue reading “Easy and perfomant client/server communication with protobuf-net & Griffin.Framework”

Griffin.Framework – Performant networking in .NET

Griffin.Networking was my attempt to create a Netty inspired library. The library is working pretty well but the internal architecture became a bit complex which I am not really satisfied with. Griffin.Framework can now be considered to be a stable replacement of Griffin.Networking.

Continue reading “Griffin.Framework – Performant networking in .NET”

How to use CORS requests in Internet Explorer 9 and below.

This article explains how you can automatically proxy CORS requests (Cross-origin resource sharing) in jQuery without changing your existing code. The proxy is integrated in ASP.NET and works with all ASP.NET libraries like WebForms, Mvc and WebApi.

Continue reading “How to use CORS requests in Internet Explorer 9 and below.”

The danger of frameworks

I introduced Entity Framework (Code first) to my team in the beginning of this week. The other devs have not used it before, but as they are a Microsoft focused shop it was the only option other than ADO.NET. EF is a great tool but yet again I’ve got an example of how it blinds developers. It’s not just a Entity Framework problem, but frameworks in general.

The thing is that we have tables which represents our entities. Some of the tables are loosely coupled, but the EF Power Tools interpreted the relations as strong (thus interpreting some tables as junction tables). Most of the problems was sorted quickly by the dev. But one problem remained. And that was that cascading deletes did not work.

Instead of writing the delete queries manually the dev spent a day or two to fix the problem. I’m quite certain that a vanilla ADO.NET solution would have taken at most 30 minutes. What I’m saying is that ORMs works for most cases but not all. Unfortunately they blind developers. ORMs are so easy to use for the more common cases that the devs doesn’t seem to see that they waste hours on something that could have taken minutes with an alternative solution.

Use the right tool for the job.