February 2007 - Posts
Microsoft has just released a new Orcas preview.
This new version is supposed to include almost all the functionality from the LINQ May 2006 CTP and more.
LINQ features in this version include:
- VB 9.0: Query Expressions (Basic querying, filtering, and ordering support); Object Initializers; Extension Methods; Local Variable Type Inference; Anonymous Types; XML literals; XML properties; New Line and Expression IntelliSense
- C# 3.0: Query Expressions; Object and Collection Initializers; Extension Methods; Local Variable Type Inference; Anonymous Types; Lambdas bound to Delegates and Expression trees; Complete design-time support (Intellisense, Formatting, Colorization)
- LINQ to ADO.NET (LINQ to SQL, LINQ to DataSets, LINQ to Entities):
- LINQ to SQL has enhanced the functionality from the May 2006 LINQ CTP. You can find it in System.Data.Linq namespace in System.Data.Linq.dll. New in this release is that DataContext provides optimized modes for read-only use and serialization . Also new is that DataShape streamlines eager loading capabilities and adds the ability to set queries on relationships
- LINQ To SQL Designer: Methods can be created from stored procedures and functions within the designer; Better handling of database schemas; Improved inheritance support in the designer.
- LINQ to SQL designer integration in websites and web applications
- LINQ to XML:
- System.Xml Bridge Classes added – There is a set of extension methods allowing XPath / XSLT to be used over LINQ to XML trees, allow XSLT transformations to produce an LINQ to XML tree, and to validate an XElement tree against an XML Schema.
- Event Model - This allows LINQ to XML trees to be efficiently synchronized with a GUI, e.g. a Windows Presentation Foundation application
- Class hierarchy changes - XObject class added, XStreamingElement class (temporarily) removed
- Various understandability / usability improvements – There have been a number of relatively minor changes done in response to internal reviews, usability studies, and external feedback to make the API more clean and consistent.
- LINQ to Objects: This API is defined in the System.Linq namespaces inside System.Core.dll.
Of course there are also features not related to LINQ. See the links below to learn more.
The Orcas March 2007 CTP is available as a Virtual PC image or as a standard self-extracting install. Get ready to swallow more than 6GB of download!
Cross-posted from http://linqinaction.net
Luca Bolognese, from the Microsoft C# team, has an interesting post that aims at providing answers to the following question: Which type should I use in C# to represent numbers?
Luca and the C# team try to provide a simple algorithm that can help when you are confused about the numeric types in .NET. It may not address every scenario, but it can be useful when you are lost between byte, short, int, uint, long, float, double, decimal, and their friends.
Here is the algorithm:
If you need fractions:
- Use decimal when intermediate results need to be rounded to fixed precision - this is almost always limited to calculations involving money.
- Otherwise use double - you will get the rounding of your calculations wrong, but the extra precision of double will ensure that your results will be good enough.
- Only use float if you know you have a space issue, and you know the precision implications. If you don't have a PhD in numeric computation you don't qualify.
- Use int whenever your values can fit in an int, even for values which can never be negative. This is so that subtraction operations don't get you confused.
- Use long when your values can't fit in an int.
Byte, sbyte, short, ushort, uint, and ulong should only ever be used for interop with C code. Otherwise they're not worth the hassle.
Ohad Israeli has made available the slides for the Developer's Toolbox presentation he gave recently. It's a good introduction to a bunch of tools he uses for .NET development. The PDF is here.
If you need more tools of the same kind, remember to visit http://SharpToolbox.com
I can't believe how time flies! I've been so busy with several projects lately...
Anyway, I thought I'd just take a break for a moment and let you know that I have an occasion to celebrate this week: SharpToolbox' counter reached the four digits! That's it, there are now more than 1000 tools and libraries referenced in SharpToolbox! In fact more than that has actually been referenced, but around 100 tools and libraries have been flagged as discontinued.
If you don't find what you need for .NET in SharpToolbox, where else will you find it?! The 55 categories await you. Explore. I'm quite sure you'll discover tools you didn't know.
For example, the latest additions include a library for RSS and Atom, an ESB for .NET, an image management library, one more tool for building database-driven applications, a code review and quality control tool for VB, and a visual software localization tool.
Don't miss the updates also. Tools that have been updated lately include IronPython 1.1 Beta, Rhino Mocks 3.0 Beta, .NET Reflector 5, Parabuild 3.1,
There is also a lot to explore in JavaToolbox too: 667 Java tools and libraries!
PS: If you have submitted something to SharpToolbox, please be patient. There are still many submissions to process.
Joe Duffy works on parallel libraries, infrastructure, and programming models in Microsoft's Developer Division. This involves doing prototyping on PLINQ, a set of extensions to LINQ that automatically optimizes and parallelizes query operations based on dynamic runtime information.
Joe gave a presentation about PLINQ and has published the PPT on his blog. Here is the overview he gives about PLINQ:
Microsoft’s language integrated query (LINQ) technology provides an expressive syntax and suite of APIs which facilitate classic data parallel operations: filtering, mapping, reductions, loop tiling, sorts, nested loops parallelism, prefix scans, and more. In this talk, we look at a new set of extensions to the LINQ technology, called parallel LINQ (PLINQ), which automatically optimizes and parallelizes query operations based on dynamic runtime information. We believe that the use of a familiar SQL-like syntax will broaden the reach of PLINQ in industry, and provides programmers with a more declarative and flexible way of expressing data-intensive computations.
The presentation shows how PLINQ integrates with LINQ, introduces PLINQ's specific additional query operators and outlines the strategies that can be used for parallelization.
PLINQ is not for today, but may well be the future.
Cross-posted from http://linqinaction.net