LINQ Extensions for ActionScript 3

ActionLinq is a complete implementation of LINQ extensions for ActionScript 3. Although it follows ActionScript idoms, all of the expected functionality is there. Let's start with a simple example of what ActionLinq can do.

Take a handful of numbers, filter them so that only even values appear, square them, rip out duplicates and reverse it.

What is LINQ?

Now that you have seen an example of what LINQ can do, you might be wondering what LINQ is. LINQ is a technology originally developed by Microsoft for querying and transforming data. It stands for "Language-Integrated Query" and in C# there is really some language integration that supports it. Under the hood it has a powerful set of functional methods that allow developers to transform and manipulate data. These methods can be used to work against any data source -- SQL Server, XML, Objects, etc.

So, What is ActionLinq?

ActionLinq is a port of the .Net capabilities for LINQ to Objects (including XML) to ActionScript 3. It is VERY powerful for manipulating data in a functional way. The extensions will work with pretty much any type of collection in ActionScript. Here is an example of pulling out the categories of data so we can display it to a Flex DropDownList. Pull out the category attribute, remove duplicates, order them by string and convert it to an ArrayCollection so it is ready for the UI control as ["Bread", "Cereal", "Meat"].

But That's Not All!

ActionLinq implements ALL of the LINQ extensions. Here is a list of everything available to you. Although there are built-in ASDoc tags for auto-complete help, you can find out more information about these capabilities at the Microsoft site.