As we were moving from the age of hand crafted stored procedures and inline SQL into the new age of OR-mappers, we had a few different choices to make in terms of which product to go with. After a period of research we eventually decided on staying away from third party applications as much as possible and relied on Microsoft’s Entity Framework (as Linq2SQL was fading away at that point).
Over the many years I’ve spent developing applications, I’ve always managed to end up in the role where I try to improve performance where ever it’s possible, and about 90% of the time the most gain is achieved by improving an application’s interaction with the database.
Bearing this in mind, I set out to create a simple platform or wrapper of the functionality to streamline the methods for retrieving and saving data. Seeing how it’s always a goal to have as maintainable code as possible, I wanted to enable developers to make the easiest way to access data the most maintainable and readable way as well, as well as taking away some of the complexities so people don’t necessarily need to know 100% what’s going on under the hood, just that data gets saved/retrieved from the database.
After a bit of development, the internally labeled “JanDAL” project was born, and it has simplified the initial setup of a data-layer in all projects where it’s been used immensely. Shortly after it was extended to include methods for caching, ensuring even better performance without the need for hand-crafted caching methods.
I’ve kept refining and optimizing this over the years based on feedback and real world experience, and we currently have quite a few applications running in production environments based exclusively on this layer for its data-retrieval and storage strategy, including all SFF sites.
As the latest version of Entity Framework shipped, I adapted the layer to the work with both the old and new versions and decided it was time to send it off into the world so others might take advantage of this, and bravely put together a NuGet package with the data layer, as well as other tools we frequently use in our projects.
If you’re a developer and want to take advantage of this, you can download the library Mijan DataLayer from the NuGet package manager, and refer to the overview and cache information at the personal site at http://janheggernes.net/post/mijan-core-datalayer-nuget-package-overview and the cache overview at http://janheggernes.net/post/mijan-core-datalayer-quick-cache-samples along with the service framework we use at http://janheggernes.net/post/mijan-core-service-overview
If you’re a business who struggles with performance in your .NET applications, get in touch with us for help with performance.