Code


15 December 2009 in .Net & Code & Mindscape & Tools | Comments (2)

Mindscape LightSpeed Logo

I am stoked – we finally got LightSpeed 3.0 out the door! For a company the size of Mindscape, we took on a mamoth amount of work and took almost all of 2009 to deliver what we think is an extremely solid 3.0 product.

If you’re interested in the features, you can read the official blog post with highlights or check out the more detailed change log (which incidentally is the same size as all our previous change logs combined).

What I’m really excited about is the integration of migrations into LightSpeed 3.0. Personally I have always hated the pain of having to script out my database changes as I was working away. Even in Rails I’ve not overly enjoyed creating migrations even though they have a nice simple abstraction for them. LightSpeed 3.0 allows you to have the designer track changes and automatically generate the migrations for you. This means you do not have to write a single line of code to have migrations created for you as you tool around updating your model. To me, this is a huge win – we are taking even more work away from the developer so they can focus on solving the actual business problems. I can’t wait to see what feedback we get around this feature :-)

The other exciting aspect of the migrations tracking is that it moves LightSpeed up the value chain – we’re no longer “just an ORM”. With LightSpeed 2.0 we delivered a cool designer will full schema round tripping for heaps of different databases. That was an awesome performance boost for developers and really helped folks working with their models. The migrations capability moves us even further up that value chain by helping manage the life-cycle of the database for developers.

There is of course far more to LightSpeed 3.0, but I wanted to share my thoughts on one feature that I think will really boost my productivity going forward :-)

Download the free express edition and let me know what you think!

Average Rating: 4.5 out of 5 based on 276 user reviews.


5 June 2008 in Code & Mindscape | Comments (5)

I’m super pleased that we’ve just shipped LightSpeed 2.0! This release has been a huge amount of work and I think that shows in how polished and feature full the final release is.

Key new features:

LINQ Provider – Developers can now query using LINQ but still leverage the fantastic performance of the LightSpeed querying framework. This means that with LightSpeed you effectively get LINQ to MySQL, LINQ to PostgreSQL, LINQ to Oracle, LINQ to SQLite and LINQ to SQL Server. We of course included extensions to ensure you could still use our great querying functionality not directly made available through the standard LINQ interface (named aggregates, eager loading etc).

Model Designer – If you’re using Visual Studio 2008 you can install the LightSpeed Designer. This fantastic addition means you can now design your models – everything from entities and relationships down to specific caching and validation concerns on your properties. This is a huge step forward in enabling end users to get up and running quickly with a LightSpeed powered domain model.

LightSpeed domain model designer in Visual Studio 2008

What is particularly kick-ass about this designer is that it supports basic database round tripping. What does that mean? When you drag on a table from the server explorer (if you’re a data centric type of person) and then you later update the database, you can see those changes made to your model without needing to delete them and drag the tables back on. This is fantastic for those people with larger models.

We decided we could take this one step further and introduced some initial rapid database prototyping functionality which means you can make changes in the designer and push those changes down to the database. This is great for rapidly getting up and running.

There is plenty more to come in this space and I look forward to seeing it evolve.

Multi-context support – Earlier versions of LightSpeed were great when you needed to work with one database but things got a wee bit hairy if you needed to access different databases from one application instance. This problem is now solved as we allow multiple contexts within a single application so you can be talking to, for example, Oracle for your store data, SQLite for your configuration data.

These are, in my view, the top three cool new features in LightSpeed 2. There are, of course, heaps of other features that we’ve packed in to help developers work faster and more effectively.

For more information please visit:

The Mindscape Blog
The LightSpeed page
Download the free Express edition of LightSpeed

Happy coding!

John-Daniel

Average Rating: 4.8 out of 5 based on 191 user reviews.


7 April 2008 in Code & Mindscape | Comments (2)

It’s always interesting getting feature requests for our products at Mindscape. For one, it’s interesting just seeing how users are trying to use the products you have built – often in ways you never imagined. I got one such request a month or so back which made me smile so I thought I’d share it.

I received the following diagram:

Effectively the diagram states:

  1. Query box takes a query
  2. Take the query and “do shit, fast too”
  3. Do some “dynamic stuff”
  4. Return to the query box

After having a good chuckle and discussion with the user about this request I eventually worked out that he wanted to be able to execute queries without having to run up the application (so, for example, you’d write a LightSpeed query with either the built in LightSpeed querying functionality or the LINQ-to-LightSpeed feature and see results within Visual Studio).

This is a good idea – it means you can quickly test out various queries and we certainly believe in helping developers be more efficient so it was added to our feature backlog.

Hopefully other developers will relate to odd descriptions for features – feel free to leave a comment about any amusing requests you’ve had :-)

John-Daniel

Average Rating: 4.9 out of 5 based on 201 user reviews.


20 March 2008 in Code & Events & Mindscape | Comments (2)

Yesterday I had the privilege of presenting my ASP.Net MVC Framework presentation in Tauranaga & Auckland. It was great to meet so many new people as well as catch up with those I haven’t seen in a while. I’d never been to Tauranga so it was interesting being there – thanks for showing me around Rodney :-)

I have added some additional comments to the solution, mainly in the test project, to help remind people why I did things in a certain way.

You can download the demo solution and the presentation files here: ASP.Net MVC Framework Presentation and Demo.

Thanks to everyone that came along, I appreciate any feedback about the presentation – it’s your feedback that helps me improve for the future :)

Thanks,

– JD

P.S. If you’re looking to learn more about the MVC Framework I’d strongly urge you to check out the excellent videos created by Scott Hanselman here.

Average Rating: 4.9 out of 5 based on 180 user reviews.


30 January 2008 in .Net & Code & Microsoft & Tools | Comments (0)

A big thanks to everyone who came along to the dot net user group meeting this evening for my presentation on the new ASP.Net MVC Framework. I’ve attached the files below to have your own play with the sample and to check out the presentation file as well.

You will need to install the ASP.Net MVC Framework but everything else (like the MVC Toolkit) is included in the download. If you would like more help with LightSpeed then I’d suggest you download the Express edition which includes a huge number of samples and one of the best developer guides you’ll find.

I would also take this moment to mention that this is a first CTP, you shouldn’t be using it to create production quality solutions yet and the chance for the API to change is very very high. Just have an explore, taste test the framework and get your head around some of the concepts at this stage :-)

Download the slides and sample application here.

I hope those of you that attended enjoyed the presentation and, as always, I appreciate any feedback.

Cheers,

– JD

Average Rating: 5 out of 5 based on 267 user reviews.


20 December 2007 in Code & Microsoft & Tools | Comments (0)

Andrew Peters (co-founder of Mindscape) has released the NHaml View Engine for ASP.NET MVC. He had been working with Haml on a project and fell in love with how easy it was to use and the quality of the output and decided it was high time something like this was available to .NET Developers.

Andrew has created a rather lengthy blog post about the engine as well as how to write in Haml, Check out the NHaml View Engine here.

If you are using ASP.NET MVC and are a lover of fine XHTML output then you should check this out.

– JD

Average Rating: 4.7 out of 5 based on 294 user reviews.


4 December 2007 in .Net & Code & Tools | Comments (5)

After yesterdays post I thought I should write up a basic sample to test the effectiveness of the Parallel Extensions. Admittedly it is a contrived example and you are unlikely to see this sort of performance increase in a real world since your applications are unlikely to be this primitive.

My sample iterates through a number sequence from 0 upwards and works out if the value is a prime number. There are two implementations, one using a standard loop and the other using a Parallel.For(). Of course, to try and ride out any spikes I iterate the tests 25 times and then average the outcome. This test is of course not run in a clean environment but does give a roughly indicative result of using the Parallel Extensions.

Using a dual core system, checking the numbers up to 100, 000 and running 25 iterations of each run I had the following outcome:

Using a normal for() loop: 3104 milliseconds average per run
Using a Parallel.For() loop: 1607 milliseconds average per run

This speed up is acceptable and, as you can imagine, these sorts of results are only going to become more impressive as we move to 8, 16, 32 core systems.

A few things to consider in a real world application (consider this my “don’t blame me if you think this will solve all your problems” line! :) :

  • Often slowness is caused by some slow resource – a web connection, a database call etc. The parallel extensions library will default to spinning up as many threads as there are cores and therefore if you have a slow dependent resource you may wish to investigate bumping up the thread count or writing your own threading code.
  • The architecture of a solution is more likely to impact the overall performance of the application. Improving the speed of a few loops and LINQ queries will not improve performance by any order of magnitude.
  • Amdahl’s Law applies – effectively this law states that the maximum parallel improvement that is possible for an application is limited by the amount of sequential code remaining. For example, if I can only make 10% of the code run in parallel then even with infinitive parallel processes running I’m still running slow sequential code 80% of the time – this feeds back to the previous point.

Download my sample application here (with source)

Note: You will need .Net 3.5 framework installed + the Parallel Extensions Library installed

– JD

kick it on DotNetKicks.com

Average Rating: 4.6 out of 5 based on 282 user reviews.


3 December 2007 in .Net & Code & Microsoft & Tools | Comments (0)

Just an FYI for anyone that is keeping up parallel computing, Microsoft has released the December CTP of the Parallel Extensions Library.

From my work with it I’ve found it to generally be quite usable however the documentation and general install quality is a little weak at the moment. Even when trying to respond via the email link in the documentation with some suggested documentation changes I found the email was bounced back – not an overly good look but it is early days :)

The extensions provide parallelisation helpers for both general tasks (e.g. making a for loop parallel) as well as providing PLINQ (one quess for what the “P” stands for!). PLINQ, from my reading, applies only to LINQ to Objects but is a useful start. So far my interest has been in the tasks support.

As a simple example of how to make a loop run using all your cores, here is our original code:

foreach(MyClass c in data)
{
  DoHardStuff(c);
}

Here is our code using the Parallel Extensions:

Parallel.ForEach(data, delegate(MyClass c)
{
   DoHardStuff(c);
});

As you can see, the extensions make it easy enough to start getting some elementary parallelism working.

The tide is changing

I haven’t heard developers discussing parallelism all that much yet and that concerns me slightly given the impending dependence on parallelisation that high performance software solutions are going to have in the coming years. I wonder if perhaps this is because Microsoft hasn’t released anything specific about it yet (present post topic excluded) and therefore many in the .NET space simply have ignored the parallelisation issues. Certainly some developers are looking at languages such as Erlang which is designed with parallel development in mind and enables the creation of massively parallel software.

A key thing to remember is that parallisation is not a solved problem. Simply dropping in a Microsoft assembly is not going to mean that your solutions are going to run a lot better all the time, hence my advice that developers everywhere should be sharpening their saw and rediscovering exactly what the long bearded lecturer in their computer science concurrency class was babbling about.

I would urge every developer to, at the very least, do some reading up on threading, concurrency and even perhaps try the Parallel Extensions.

– JD

Average Rating: 4.5 out of 5 based on 270 user reviews.