MSDN roadshow for slides and details.
I attended this event last week, but I’ve only now had the time to write about it, so I hope my notes are up to scratch. Overall impressions were that it was definitely an advertising event, and so less useful than community-focused events such as the Developer, Developer, Developer event (which I’m getting tempted just to call d3) but there was some useful information in the talks. Not sure if or when I’ll get the chance to use them properly but here’s my thoughts on the technologies. If I make any mistakes, feel free to correct me and I’ll edit this content, but make sure you check out the slides above or on the speaker’s sites as they’ll be more accurate.
This is Microsoft’s answer to abstracting the database layer. ADO previously got as far as abstracting the connection, whilst leaving provider-specific SQL embedded in the code. The new version has two new abstractions which build on each other, which together make up the entity framework. At the basic level is a new SQL variant ESQL (entity SQL) which abstracts out the underlying database language to a more .Net-friendly variant that returns objects rather than rows. On top of this is built ADO’s LINQ-compatable ORM that allows LINQ queries to run against any ADO database provider.
To make this work, ADO.Net uses XML config files like NHibernate to map between the database schema and the object schema. Unlike NHibernate, ADO.Net adds XML definitions of both the database and the object schema. (Wouldn’t it be nice if databases had a schema we could access from code, eh…?) ADO.Net then uses the object schema to generate .Net classes like LLBLGen. These partial classes support LINQ and some extension via methods, but cannot use properties as these are lost whenever the classes are re-generated. The sample code provided in the talk discussed an ugly hack where a metadata class containing properties was associated with the generated partial class via decorators. It works, but it’s hardly as easy to use as partial classes generated by, for example, Visual Studio’s GUI designer.
Apart from ORM, the new ADO.Net also provides Data Services, which allows CRUD database access via RESTful URIs, which is an alternative to embedding SQL in your URLs, if you don’t fancy putting too much abstraction between your website and your database. Data Services has also caught the LINQ bug, making queries through web services easier, and providing an alternative access method to the standard SOAP approach favoured by many exisiting web services.
Web 2.0 and AJAX may make for more responsive web pages, but they have a habit of breaking expectations, such as the behaviour of the back button, which won’t undo incremental changes since AJAX applications tend to perform in-page loading that doesn’t update URLs. Google and Yahoo both have toolkits that help with this, and now Microsoft’s ASP.Net extensions add state data to ASP.Net apps.
ASP.Net also supports routing tables to de-couple the web hierarchy from the disk hierarchy, which is useful for tagging, RESTful URIs and other behaviour, but was developed in ASP to provide an MVC framework for the web, in order to provide cleaner code and a simpler URI interface.
The preview edition is in a lot of flux, so I’m not sure what state it’s in a week on from the roadshow, so I’d suggest catching up with the blog above for the latest information.
aka Silverlight.Net. You can now use .Net languages to script Microsoft’s flash killer, which is definitely cool from an IronPython perspective, although it is a strict sibling of .Net (think J2ME vs Java). The really interesting parts of Silverlight 2 are in the fact that there is now full 2-way communication between the web page hosting the silverlight app and the app itself, and that Microsoft is now planning a designer’s studio for Silverlight to do the GUI and the animations. How long before all apps are written partly with the XAML-based Expression Blend? If you think there’s a lot of variety in interfaces right now, I can see a lot more variety coming once designers get their hands on Blend.
Visual Studio Team Suite
Anyone who’s not using unit tests and refactoring to improve their code is not a professional programmer. The new features in VSTS aim to bring the new version up to compete with the other testing and refactoring tools out there. Continuous integration and testing were covered at d3, but this talk explored the idea that CI can include any task that can be represented as a .Net object, and there are a number of such tasks available from the contrib server including tasks to deploy a database or set up a virtual server ready for a test environment. The CI mantra was pushed with the comment that Flickr have a 30-minute release schedule so that users are always up to date with new features and bug fixes. It’s a lot easier to do that on a website than with deployed software like Windows, but it’s a good thing to keep in mind when setting up CI. It’s nice to be able to prove that the software is ready to go whenever you need it.
The part that most interested me about the new VSTS was the addition of unit testing, refactoring and source control to SQL Server databases (with a promise of other dbs to follow). The source control was fairly straight-forward, one SQL file for each table, key, constraint, view, procedure, etc, laid out in files to match the heirarchy of the database in Management Studio, so you can track changes at a very fine-grained level, so long as you’re using something a bit more advanced than CVS. Once the schema is imported, refactoring options such as wildcard expansion in SELECT queries becomes available to provide more robust code. Unit testing of SQL stored procedures, using SQL conditions such as row counts and performance measures have been added, and the unit tests are run as transactions to prevent any changes to the database. The testing framework also includes performance and load testing, web testing that allows testing of a sequence with captured data, and a data generator similar to the one demonstrated by Redgate at d3.
Blogged with Flock