LightSpeed 3.0 Beta Release

I’m pleased to announce the immediate availability of LightSpeed 3.0 Beta 1 to existing LightSpeed customers.

Huge querying enhancements

LightSpeed has undergone a massive overhaul of its internal querying capabilities. With 2.0 we included a LINQ provider that had support for most of the capabilities included in the core LightSpeed querying API. With 3.0 we’ve beefed up both the core querying capabilities and the LINQ API to support grouping, joining, and other such goodness.

Schema migrations support

LightSpeed now has its own Migrations framework! Chances are that if you’re working with a database then you’re having to manage your change scripts so we’ve tried to make this process more manageable.

And it just wouldn’t be a Mindscape product if it didn’t integrate into Visual Studio!

Create LightSpeed Migration

The reason for the integration is because of the great schema round tripping features in the LightSpeed Designer. If you’re making changes to your model then you’ll want to be capturing those changes into a migration to run on various other machines such as Test and Production machines. All you need to do is work as you normally would with the designer and when you’re ready select “Create Migration” from the Migrations menu and we’ll pick up all your changes and give you a choice of what schema changes you’d like to include in the migration.

Create new migration from code changes dialog

When it comes time to deploy you can use the lsmigrate.exe utility to run your migrations when Visual Studio is not available. Alternatively, when you elect to run the migrations you can select the option to generate SQL instead.

Visual Studio Migrations runner dialog

Oh, and the migrations framework works with SQL Server, Oracle, MySQL, PostgreSQL, SQLite, SQL Server CE, VistaDB and DB2! Moving between database engines just got a lot easier!

Designer enhancements

We’ve made a load of improvements and fixes to the LightSpeed designer. In addition to handy ease-of-use features such as making it easier to zoom, importing common attribute namespaces, and copying a picture of your model for use in a Word or PowerPoint document, some of the major features are:

  • Refactoring. You can perform a solution-wide rename of an entity or property, with the option to retain the existing database mapping. You can also have the designer create partial classes and convert generated property implementations to manual ones ready for customisation.
  • XML documentation support for entities, properties and associations.
  • Filtering the designer view. You can choose to view just a particular entity and its associated entities, or a particular subdomain, inheritance hierarchy or aggregate. This reduces the clutter on very large models and makes it easy to locate a particular entity with just a few keystrokes.

We’ve also rounded out support for the full range of LightSpeed modelling capabilities including designer support for through associations and database synchronisation support for inheritance hierarchies, plus a variety of smaller features that we’ll talk about in more detail in a later post.

Better support for legacy databases

Composite key lovers rejoice! LightSpeed now includes support for composite keys across the board – from the designer through to the core framework. This was one of the last remaining constraints that prevented some developers from using LightSpeed with a legacy database they couldn’t alter.

For environments where database access is restricted to stored procedures, LightSpeed also now supports CRUD procedures so you can specify how your entities are loaded and saved using stored procedures.

Testing enhancements

We’ve taken feedback on the testability of LightSpeed models and based improvements in 3.0 off that feedback.

Creating entities for testing has been more frustrating than it should be due to the restrictions on assigning the Id property. To resolve this LightSpeed now provides an EntityFactory class as part of the testing namespace.

Here’s an example of how to create an entity of a given state with a provided Id:

var entity1 = EntityFactory.Create(EntityState.Deleted, 15);
var entity2 = EntityFactory.Create(EntityState.Default, 16);
var entity3 = EntityFactory.Create(EntityState.Modified, 17);
var entity4 = EntityFactory.Create(EntityState.New, 18);

Keep in mind that this is entirely for testing purposes and you should not use this code in your actual solution.

To help use these entities in a testing scenario we also now provide a TestUnitOfWork implementation. This is like mocking out a unit of work to return specified results when a query is run and is especially helpful if you’re not working with the Repository pattern. Each query method (e.g. Find()) has the ability to have the result set for it and therefore allows for testing completely in memory.

We will be pushing out blog posts on this soon + some new screen casts.

Granular change tracking

LightSpeed users have been asking for the ability to inspect that changes made to entities for some time and now they can. Entities now contain a public ChangeTracker. This change tracker can be used to examine what fields have been changed, what the original value was and what the new value is.

Change tracking is disabled by default due to the extra memory weight it can add to each entity however you can easily opt in an entity to be tracked:

  customer.ChangeTracker.TrackingMode = ChangeTrackingMode.ChangesOnly;
 
  foreach(var change in customer.Changes)
  {
    Console.WriteLine("Property: {0}", change.Name);
    Console.WriteLine("Original value: {0}", change.OriginalValue);
    Console.WriteLine("Modified value: {0}", change.ModifiedValue);
  }

Database provider improvements

Support for SQL Server 2008: LightSpeed now provides first class support for SQL Server 2008 allowing users to leverage new data types such as SqlGeography. Previously developers could re-use the SQL2005 provider when targetting a SQL 2008 database however this didn’t allow for the use of user defined types such as the spatial types.

Support for IBM DB2: Complete designer and core support for DB2 comes out of the box with 3.0.

Support for VistaDB 4.0: VistaDB 4.0 is fresh out of the oven and LightSpeed 3.0 supports this new version along with VistaDB 3.x. This includes our rich designer integration for working with your VistaDB models.

We’ve also made numerous improvements to the other providers to ensure we’re shipping with the latest provider assemblies.

Much much more

This is an absolutely huge release and this blog post could go on for many more pages listing all the enhancements. Over the coming weeks we will be posting more details about all the changes that have been made to help you develop faster and improve the robustness of your solutions.

Where can I get it?

LightSpeed 3 Beta 1 is available to existing customers through the store. Take it for a spin and let us know what you find – we appreciate all the feedback you have!

7 Responses to “LightSpeed 3.0 Beta Release”

  • Huzzah!

  • Hi I’m currently evaluating Lightspeed for a SOA solution using silverlight, wcf services, (Entity Framework or Lightspeed) and MSQL2008. It would be nice to be able to evaluate the 3.0B release as the 2.2 release has a bit lacking when it comes to soa solutions. Any chance you can provide some details of changes that will make implenting SOA easier or giving me access to 3.0B?

  • Hi Kendall,

    Thanks for your comment.

    As you can see, 3.0 was a fairly large undertaking with what we are already delivering. We have not included any additional support for WCF services beyond what we already provide (generating DTO’s + mapping them and support for the standard WCF serialization).

    Work around improvements in this domain are planned for post LightSpeed 3.0.

    I hope that helps.

  • First of all, congratulation to Mindscape for releasing – to be one of the most simple, powerful and productive ORM – in a fresh new version… I’ve been following you in 2008, since then I went with competitive product (mostly due to POCO and better testing support).

    My preferences for ORM are also changing constantly, so now I’m looking for few “extras”, any plans of supporting these?
    1. Monotouch platform? (“Lightspeed lite” would be great, there’s sqlite only there but sadly no reflection, don’t know how hard would it be to port it due to missing ado.net implementation as of yet)

    2. Azure SQL i.e. SDS support? Cloud computing is becoming popular, and although we can have REST with MS Azure databases, having first-class support for SDS protocol would be awesome (so far only MS product has that).

    3. ORM profiler? Oren Eini (aka Ayende Rahien) latest posts showed, that his profiler can be extended by supporting other ORMs. And if there’s such a “non-orm-ish” product as Linq to SQL (good but with so many limitation one wonder) I’m curious if there couldn’t be some collaboration to also support Lightspeed (as he is supporting competitive product from Mr. Bauma).

    4. Last but not least, the other day in 2008 I had few gripes, like UPDATE hitting every column of a table although only one changed etc, any improvement on performance front?

    Awesome product anyway, I’m sure, my 2nd most favourite ORM, it’s because it was harder to go with TDD w/o POCO support in Lightspeed, so I’m eager for more info about the testing…is in memory sqlite possible?

  • Hi cowgaR,

    I hope this answers all your points – thanks for the feedback :-)

    1. No support here, we haven’t tried it and I’m doubtful it would work off the bat anyway. I’d like to see far more growth from Monotouch before we would start looking at that space I’m sorry.

    2. LS3 will work with Azure. We’re very interested supporting cloud platforms which is why we’re still the only .NET ORM that supports SimpleDB :-) In fact we had a demo of LightSeed working with Azure at Tech Ed New Zealand this year.

    Expect to see further additions of other data stores and improved support for existing ones post 3.0. If there is a specific feature you’d like to see, please let us know.

    3. We’re discussing this with Ayende already. He’s working on how he will support the various other ORMs at the moment and once he’s got a pattern in place we’ll work together to get LightSpeed supported.

    4. We added support for only updating changed columns in LS3. This applies only when optimistic concurrency is enabled however to ensure you don’t accidentally create invalid entities (meaning you must have a version field).

    In memory testing with SQLite is possible with almost any ORM that supports SQLite because it’s just a connection string parameter. Having said that, I believe in memory testing with SQLite is a weak approach to accelerating tests (unless you’re live system is SQLite) due to the limitations you’ll run into when using SQLite (limited type support, FK issues, etc).

    The testing enhancements we have added in 3.0 will provide an easier mechanism for building a UnitOfWork in memory that you pre-load with Entities that you wish to be returned. This means you won’t run into the issues using a different database to the one you’re using in production, avoids testing the database when you should be testing your code and improves performance. We always appreciate feedback on this area however because there are plenty of great ideas to be had :-)

    Thanks for your feedback!

  • I’m excited

  • Very psyched about the migration tool. That could be a great asset.

  • Leave a Reply

Archives

Join our mailer

You should join our newsletter! Sent monthly:

Back to Top