About Jolt.NET Libraries

Inspired by the Boost C++ libraries, Jolt.NET aims to complement the .NET Base Class Library (BCL) with algorithms, data structures, and general productivity tools. It is the hope of the authors that the features of Jolt.NET will one day be part of, or represented in the BCL and the .NET Framework.

Jolt.NET Intial Release and Future Features

Preparing the Initial Release

Sometime today, I will commit a revision that completes the list of work items for the release marked "Initial Release".  This release will contain a very functional and near-complete version of proxy generation tool for mocking/dependency injection.  The release will also contain one known issue that may cause some grief, specifically, adding nested public types from non-public declaring types, demonstrated as follows.


internal class List<T>
{
// ... list methods ...

public class Iterator<T>
{
// ... iterator methods ...
}
}

As you can see, the frequency of this situation is rare.  You wouldn't be able to use the nested type outside the scope of the assembly, so you wouldn't be able to mock it to begin with.  However, such a situation becomes valid when the assembly grants internal access to another assembly.  So, I would like to revisit this usage in the future and perhaps add some ability for a client to provide a list of friend assemblies to the ProxyTypeBuilder or ProxyAssemblyBuilder.

Future Features

I first had the idea for Jolt.NET about one year ago after working on a .NET port of the Boost Graph Library (BGL). I had completed a generic Graph<T> data structure with some rudimentary algorithms, including serialization support. It was at that point that I discovered the .NET 1.1 version of QuickGraph, which looked like an abandoned project at the time -- ironically, my initial searches for a BGL port didn't produce anything :(.  Today, the QuickGraph authors have implemented all the features that I had intended to, including Linq support!  It trully is a formidable BGL port.

After implementing a solid graph data structure, my next goal was to build a generic finite state machine on top of the graph.  And so, this will be the next big feature.  Jolt.NET will contain a new library with the first feature being a generic finite state machine, using QuickGraph as its underlying data structure.

I also wanted to work on XML assertions for many of the popular managed-language testing tools, NUnit being one of them.  This feature would basically extend the NUnit assertion set via a constraint, and allow one to write assertions like the following.



[Test]
public void VerifyXml()
{
Assert.That(GetXmlReader(), Is.Valid(GetXmlSchema()));
Assert.That(GetXmlReader(), Is.EquivalentTo(GetOtherXmlReader()));
Assert.That(GetXmlReader(), Is.EqualTo(GetXmlReader()));
}


After looking at the vision document for NUnit 3.0 and some discussions in NUnit-discuss, it looks like the implementation of  feature is already under way, so I won't start work on in for Jolt.NET.  Way to go guys!

0 comments: