2008-01-09

ALite - Yet Another .NET Framework

I’ve said in the past that I’m not a fan of frameworks. That’s not strictly true. Anything that helps a programmer work more efficiently is great. What I object to are frameworks that force developers to adopt a single programming paradigm or design pattern to the exclusion of all others, especially when that paradigm is badly designed or creates abitrary constraints on software design. When I start work on a programming task I think to myself, “What’s the best way of doing this?” What I should never think is, “What’s the best way of doing this within the constraints of framework X?” As soon as you ask that question you should throw the framework straight in the bin unless there’s a damned good reason for jumping through its hoops.

Anyway, a while ago I found myself developing in C#.NET without a decent ORM or any other kind of framework. For various reasons I wasn’t able to use any 3rd-party code, so I ended up writing my own miniature framework. ALite (“Ant’s Lightweight Framework”) is the result.

ALite uncomfortably straddles the data access and class library layers of an application. It provides an abstracted data access class designed to remove the pain of ADO.NET and a couple of base classes for creating data-aware objects and generic collections. It features simplistic undo and rule-based data validation functions, along side object status tracking and a simple approach to interacting with a database. It doesn’t do an awful lot, but if you find yourself writing database-driven .NET code from scratch and don’t want to be forced to use Design Pattern of the Month, it might just come in useful.

The zip file includes some very basic documentation. I don’t imagine that anyone else but me will ever use this, so I’m not inclined to spend any time improving the docs, but if there’s any interest I might make it into a SourceForge project and write some decent hypertext documentation. The zip file also includes a pre-built DLL and the BSD-licenced C# code (.NET2).

ALite V1.0