LightSpeed 2

Posted by Andrew on March 19, 2008

We’re getting close to releasing version 2.0 of our LightSpeed O/RM and so are kicking off a beta program so people can kick the tires.

The key feature of LightSpeed 2 is obviously support for LINQ querying. For 2.0 we’re concentrating on complete feature parity in terms of query expressiveness with LightSpeed 1.0. Our vision for LightSpeed is unchanged: The simplest, fastest and most lightweight O/RM for .NET - The right balance of power vs. complexity.

It’s not only the LINQ support in version 2 either. We’re going to release the first iteration of our code generation toolset. The first version will include a template based tool (both command line and GUI) that generates LightSpeed model classes from an existing database schema. Long term we’re looking at moving the tooling into Visual Studio and supporting bidirectional generation. Of course, we’re always keen to hear what people are after in this area.

If your interested in participating in the beta please go ahead and sign up

LightSpeed Passes Mats’ Challenge

Posted by Andrew on June 26, 2007

I took the challenge today and we passed.

Eager Loading

Posted by Andrew on June 06, 2007

Alex has been thinking a bit about object eager-loading (prefetch) retrieval strategies recently.

The LINQ to SQL approach of using a Lambda is interesting and was the approach we used on BackgroundMotion:

Contribution contribution = Repository<Contribution>
      .Find(1)
      .Including(c => c.ContributionTags);

What’s more interesting to me however is that now we have a way to refer to symbols in a type safe way. Useful for things like data binding etc. where we want to specify a property and where currently we have to use a string. That’s not to say that this Lambda syntax is optimal for this but what can you do? :-)

With respect to eager load strategies our new domain model/persistence framework LightSpeed has the notion of a “named aggregate” - aggregate being a term taken from Domain-driven design. Basically we use an attribute called EagerLoad at the association level in the model:

[EagerLoad(AggregateName="ContributionDetail")]
public readonly EntityCollection<ContributionTag> _contributionTags
  = new EntityCollection<ContributionTag>();

Then we can specify an aggregate name as part of our query.

Query query = new Query(Entity.Attribute("Title").Like("A%"));
query.AggregateName = "ContributionDetail";
IList<Contribution> contributions = Repository.Find<Contribution>(query);

The key point is that we are being explicit about naming the aggregates.