Nikhil Kothari, whose blog you should visit immediately if you're doing web development, demonstrates how to reproduce LINQ to Objects in JavaScript.
Nikhil is an architect on the Web Platform and Tools team at Microsoft known for his great projects, past and present, which include: ASP.NET Web Matrix, Web Development Helper, and Script#.
This time, Nikhil has a post in which he demonstrates how it's possible to write queries against JavaScript arrays, similarly to what LINQ to Objects offers for C# and VB.NET.
The following LINQ query in C#:
var someLocations =
from location in allLocations
where location.City.Length > 6
select new { City = location.City, Country = location.Country };
can also be written as follows using query operators:
var someLocations =
allLocations
.Where(location => location.City.Length > 6)
.Select(location => new { City = location.City, Country = location.Country });
The equivalent query could be written in JavaScript as follows:
var someLocations =
allLocations
.filter(function(location) { return location.City.length > 6; })
.map(function(location) { return { City: location.City, Country: location.Country }; });
Pretty close, isn't it? Learn more...
Cross-posted from
http://linqinaction.net
I've just downloaded Visual Studio 2006 err.. Visual Studio 2005's first service pack. Well, it's a 431MB download... Not bad for a patch.
Several issues have been fixed, of course, but new features also have been integrated such as the support for Web Application projects.
The service pack is available in multiple editions, depending on the version of Visual Studio 2005 you are using:
Update: You should make sure you have some time available for the installation. Here, it took more than one hour and a half with 99% of the CPU occupied all the time!
Some .NET tool publishers have started running special offers on SharpToolbox. Look for the "special offer" sticker on the home page.
The first offer will allow you to save 10% on Dali, an object-relational mapper. More offers to come...
Looks like VB is going to get support for lambda expressions after all. Paul Vick is
discussing about the syntax.
Cross-posted from
http://linqinaction.net
Troy Magennis has the scoop: some of the talks given at TechEd Developers last month in Barcelona are now available on MSDN's ShowTime.
The LINQ sessions available right now are:
Nothing terribly new if you are already accustomed to LINQ, but good introductions otherwise. Anders' presentations are always interesting and clear. Looks like this guy knows what he's talking about. I wonder why ;-)
Note: the Powerpoint documents for the sessions are available for download.
Cross-posted from
http://linqinaction.net
Charlie Calvert, who some of you may know for the years he spent at Borland or for his books on Delphi, joined Microsoft in July as the Community Program Manager for the Visual C# group.
Charlie has a blog full of C# and .NET community information. As part of his activities, he started a series of posts on LINQ:
- LINQ for Beginners
- Query Expressions
- Query Operators
- Using Distinct
- Focus on Grouping
Another great source of knowledge if you want to explore LINQ.
Charlie also collected a list links about LINQ: Links to LINQ.
Cross-posted from
http://linqinaction.net