I am going to quickly describe what happened in the briefing, then link to the site where all the presentation materials can be found (if I ever find it :))
The whole thing was supposed to happen at the Grand RIN hotel, but apparently the people there changed their minds suddenly leaving the briefing without a set location. In the end the brief took place at the Marriott Hotel and the MSDN people were nice enough to phone me and let me know of the change.
The conference lasted for 9 hours, with coffee and lunch breaks, and also half an hour for signing in and another 30 minutes for introduction bullshit. You know the drill if you ever went to one of such events: you sit in a chair waiting for the event to start while you are SPAMMED with video presentations of Microsoft products, then some guy comes in saying hello, presenting the people that will do the talking, then each of the people that do the talking present themselves, maybe even thank the presenter at the beginning... like a circular reference! Luckily I brought my trusted ear plugs and PDA, loaded with sci-fi and tech files.
The actual talk began at 10:00, with Petru Jucovschi
presenting as well as holding the first talk, about Linq and C# 3.0. He has recently taken over from Zoltan Herczeg
and he has not yet gained the necessary confidence to keep crouds interested. Luckily, the information and code were reasonably well structured and, even if I've heard them before, held me watching the whole thing.Linq highlights:
- is new in .NET 3.0+ and it takes advantage of a lot of the other newly introduced features like anonymous types and methods, lambda expressions, expression trees, extension methods, object initializers and many others.
- it works over any object defined as IQueryable<T> or IEnumerable (although this last thing is a bit of a compromise).
- simplifies our way of working with queries, bring them closer to the .NET programming languages and from the just-in-time errors into the domain of compiler errors.
- "out of the box" it comes with support for T-Sql, Xml, Objects and Datasets, but providers can be built (easily) for anything imaginable.
- the linq queries are actually execution trees that are only run when GetEnumerator is called. This is called "deffered execution" and it means more queries can be linked and optimised before the data is actually required.
- in case you want the data for caching purposes, there are ToList and ToArray methods available
Then there were two back-to-back sessions from my favourite speaker, Ciprian Jichici
, about Linq over SQL and Linq over Entities. He was slightly tired and in a hurry to catch the plain for his native lands of Timisoara, VB, but he held it through, even if he had to talk for 2.5 hours straight. He went through the manual motions of creating mappings between Linq to SQL objects and actualy database data; it wouldn't compile, but the principles were throughly explained and I have all the respect for the fact that he didn't just drag and drop everything and not explain what happened in the background. Linq to SQL highlights:
Linq to Entities highlights:
- Linq to SQL does not replace SQL and SQL programming
- Linq to SQL supports only T-SQL 2005 and 2008 for now, but Linq providers from the other DB manufacturers are sure to come.
- Linq queries are being translated, wherever possible, to the SQL server and executed there.
- queries support filtering, grouping, ordering, and C# functions. One of the query was done with StartsWith. I don't know if that translated into SQL2005 CLR code or into a LIKE and I don't know exactly what happends with custom methods
- using simple decoration, mapping between SQL tables and C# objects can be done very easily
- Visual Studio has GUI tools to accomplish the mapping for you
- Linq to SQL can make good use of automatic properties and object initialisers and collection initialisers
- an interesting feature is the ability to tell Linq which of the "child" objects to load with a parent object. You can read a Person object and load all its phone numbers and email addresses, but not the purchases made in that name
- it does not ship with the .NET framework, but separately, probably a release version will be unveiled in the second half of this year
- it uses three XML files to map source to destination: conceptual, mapping and database. The conceptual file will hold a schema of local object, the database file will hold a schema of source objects and the mapping will describe their relationship.
- One of my questions was if I can use Linq to Entities to make a data adapter from an already existing data layer to another, using it to redesign data layer architecture. The answer was yes. I find this very interesting indeed.
- of course, GUI tools will help you do that with drag and drop operations and so on and so on
- the three level mapping allows you to create objects from more linked tables, making the internal workings of the database engine and even some of its structure irrelevant
- I do not know if you can create an object from two different sources, like SQL and an XML file
- for the moment Linq to SQL and Linq to Entities are built by different teams and they may have different approaches to similar problems
Then it was lunch time. For a classy (read expensive like crap) hotel, the service was really badly organised. The food was there, but you had to stay in long queues qith a plate in your hand to get some food, then quickly hunt for empty tables, the type you stand in front of to eat. The food was good though, although not exceptional. Aurelian Popa
was the third speaker, talking about Silverlight. Now, it may be something personal, but he brought in my mind the image of Tom Cruise, arrogant, hyperactive, a bit petty. I was half expecting him to say "show me the money!" all the time. He insisted on telling us about the great mathematician Comway who, by a silly mistake, created Conway's Life Game. If he could only spell his name right, tsk, tsk, tsk.
- Silverlight 2.0 comes with its own .NET compact version, independent on .NET versions on the system or even on operating system
- it is designed with compatibility in mind, cross-browser and cross-platform. One will be able to use it in Safari on Linux
- the programming can be both declarative (using XAML) and object oriented (programatic access with C# or VB)
- Silverlight 2.0 has extra abilities: CLR, DLR (for Ruby and other dynamic languages), suport for RSS, SOAP, WCF, WPF, Generics, Ajax, all the buzzwords are there, including DRM (ugh!)
The fourth presentation was just a bore, not worth mentioning. What I thought would enlighten me with new and exciting WCF features was something long, featureless (the technical details as well as the presenter) and lingering on the description would only make me look vengeful and cruel. One must maintain apparences, after all. WCF highlights: google for them. WCF replaces Web Services, Remoting, Microsoft Message Queue, DCOM and can communicate with any one of them.