Technology Towards Microsoft Headlines

Showing posts with label Microsoft Visual Studio 2008. Show all posts
Showing posts with label Microsoft Visual Studio 2008. Show all posts

Friday, October 10, 2008

Dynamic LINQ (Language Integrated Quary)

Dynamic LINQ (Language Integrated Query)

LINQ (language integrated query) is one of the new features provided with VS 2008 and .NET 3.5. LINQ makes the concept of querying data a first class programming concept in .NET, and enables you to efficiently express queries in your programming language of choice.

One of the benefits of LINQ is that it enables you to write type-safe queries in VB and C#. This means you get compile-time checking of your LINQ queries, and full intellisense and refactoring support over your code:



While writing type-safe queries is great for most scenarios, there are cases where you want the flexibility to dynamically construct queries on the fly. For example: you might want to provide business intelligence UI within your application that allows an end-user business analyst to use drop-downs to build and express their own custom queries/views on top of data.

Traditionally these types of dynamic query scenarios are often handled by concatenating strings together to construct dynamic SQL queries. Recently a few people have sent me mail asking how to handle these types of scenarios using LINQ. The below post describes how you can use a Dynamic Query Library provided by the LINQ team to dynamically construct LINQ queries.

Downloading the LINQ Dynamic Query Library

Included on the VS 2008 Samples download page are pointers to VB and C# sample packages that include a cool dynamic query LINQ helper library. Direct pointers to the dynamic query library (and documentation about it) can be found below:

Both the VB and C# DynamicQuery samples include a source implementation of a helper library that allows you to express LINQ queries using extension methods that take string arguments instead of type-safe language operators. You can copy/paste either the C# or VB implementations of the DynamicQuery library into your own projects and then use it where appropriate to more dynamically construct LINQ queries based on end-user input.

Simple Dynamic Query Library Example

You can use the DynamicQuery library against any LINQ data provider (including LINQ to SQL, LINQ to Objects, LINQ to XML, LINQ to Entities, LINQ to SharePoint, LINQ to TerraServer, etc). Instead of using language operators or type-safe lambda extension methods to construct your LINQ queries, the dynamic query library provides you with string based extension methods that you can pass any string expression into.

For example, below is a standard type-safe LINQ to SQL VB query that retrieves data from a Northwind database and displays it in a ASP.NET GridView control:





Using the LINQ DynamicQuery library I could re-write the above query expression instead like so:




Notice how the conditional-where clause and sort-orderby clause now take string expressions instead of code expressions. Because they are late-bound strings I can dynamically construct them. For example: I could provide UI to an end-user business analyst using my application that enables them to construct queries on their own (including arbitrary conditional clauses).

Dynamic Query Library Documentation

Included with the above VB and C# Dynamic Query samples is some HTML documentation that describes how to use the Dynamic Query Library extension methods in more detail. It is definitely worth looking at if you want to use the helper library in more depth:






Download and Run a Dynamic Query Library Sample

You can download and run basic VB and C# samples I've put together that demonstrate using the Dynamic LINQ library in an ASP.NET web-site that queries the Northwind sample database using LINQ to SQL:

You can use either Visual Web Developer 2008 Express (which is free) or VS 2008 to open and run them.

Thursday, September 11, 2008

Microsoft Visual Studio 2008 Development System, Team System and Visual Studio Extensibility.

Microsoft Visual Studio 2008 Development System

Visual Studio:

Visual Studio 2008 Professional Edition and Visual Studio 2008 Standard Edition empower individuals and small development teams to deliver connected applications that take advantage of the latest technology while more effectively meeting business goals.Learn more


Visual Studio Team System:

Microsoft Visual Studio Team System 2008 is an integrated Application Life-cycle Management (ALM) solution comprising tools, processes, and guidance to help everyone on the team improve their skills and work more effectively together.Learn more


Visual Studio Extensibility:

Find products that integrate with Visual Studio to amplify productivity and facilitate team collaboration. Stretch the boundaries of software development by building solutions with the Visual Studio Software Development Kit (SDK). Host custom tools in the Visual Studio 2008 Shell, or use Visual Studio Tools for Applications to make your applications extensible.Learn more

Microsoft Visual Studio 2008

Microsoft Visual Studio 2008

Microsoft® Visual Studio® 2008 delivers on the Microsoft vision of smart client applications by enabling developers to rapidly create connected applications that deliver the highest quality, rich user experiences. With Visual Studio 2008, organizations will find it easier than ever before to capture and analyze information to help them make effective business decisions. Visual Studio 2008 enables organizations of every size to rapidly create more secure, manageable, and reliable applications that take advantage of Windows Vista™ and the 2007 Office system.

Visual Studio 2008 delivers key advances for developers in three primary pillars:

1. Rapid application development

2. Effective team collaboration

3. Break through user experiences

Visual Studio 2008 provides advanced development tools, debugging features, database functionality, and innovative features for quickly creating tomorrow's cutting-edge applications across a variety of platforms.Visual Studio 2008 includes enhancements such as visual designers for faster development with the .NET Framework 3.5, substantial improvements to Web development tools and language enhancements that speed development with all types of data. Visual Studio 2008 provides developers with all the tools and framework support required to create compelling, expressive, AJAX-enabled Web applications.Developers will be able to take advantage of these rich client-side and server-side, frameworks to easily build client-centric Web applications that integrate with any back-end data provider, run within any modern browser, and have complete access to ASP.NET application services and the Microsoft platform.

Rapid Application Development:

To help developers rapidly create modern software, Visual Studio 2008 delivers improved language and data features, such as Language Integrated Query (LINQ), that make it easier for individual programmers to build solutions that analyze and act on information.Visual Studio 2008 also provides developers with the ability to target multiple versions of the .NET Framework from within the same development environment. Developers will be able to build applications that target the .NET Framework 2.0, 3.0 or 3.5, meaning that they can support a wide variety of projects in the same environment.

Break Through User Experience

Visual Studio 2008 offers developers new tools that speed creation of connected applications on the latest platforms including the Web, Windows Vista, Office 2007, SQL Server 2008, and Windows Server 2008. For the Web, ASP.NET AJAX and other new technologies will enable developers to quickly create a new generation of more efficient, interactive, and personalized Web experiences.

Effective Team Collaboration

Visual Studio 2008 delivers expanded and improved offerings that help improve collaboration in development teams, including tools that help integrate database professionals and graphic designers into the development process.

Use the Microsoft .NET Framework 3.5

The .NET Framework enables the rapid construction of connected applications that provide outstanding end-user experiences by providing the building blocks (pre-fabricated software) for solving common programming tasks. Connected applications built on the .NET Framework model business processes effectively and facilitate the integration of systems in heterogeneous environments.Together Visual Studio and the .NET Framework reduce the need for common plumbing code, reducing development time and enabling developers to concentrate on solving business problems.The .NET Framework 3.5 builds incrementally on the .NET Framework 3.0. Enhancements have been made to feature areas including the base class library, Windows Workflow Foundation, Windows Communication Foundation, Windows Presentation Foundation, and Windows CardSpace.

Page copy protected against web site content infringement by Copyscape

Subscribe To Get Updates Directly To Your E-Mail

Enter your email address:

Delivered by FeedBurner