Tuesday, March 6, 2007

ORCAS and Its Features

Orcas:::
1) Upcoming visual studio release version Name.




Features are>>
i) C# 3.0
ii) LINQ
iii) the new WYSIWYG HTML/CSS editor with lots of cool CSS features
iv) JavaScript Intellisense
v) JavaScript debugging
vi) Nested Master Page ()...
vii)Multi-targeting::

Among other things, the new HTML designer provides:

1).Split View Support (the ability to have both HTML Source and WYSIWYG design open simultaneously)
2).Extremely rich CSS support (CSS property window, CSS inheritance viewer, CSS preview, and CSS manager)
3).Dramatically improved view switching performance (moving from source->html design mode is now nearly instantaneous)
4.)Support for control designers within source view (property builders, event wire-up and wizards now work in source view)
5.)Richer ruler and layout support (better yet, values can be automatically stored in external CSS files)
Designer support for nested master pages
6)JavaScript IntelliSense in Orcas has been extended to the point that rich type inferencing is now supported.












The first feature that Guthrie mentioned was Multi-Targeting. Using multi-targeting, developers will be able to target a specific version of the .NET Framework. While the plan is to allow developers to only target versions 2.0, 3.0, and 3.5 of the Framework, the benefit of Multi-Targeting is that all the features found in Orcas can be leveraged as long as the project uses the one of the aforementioned frameworks.
7).The HTML designer has also been drastically improved with features such as a split HTML/Designer view, improved CSS support, faster view switching, and designer support for nested master pages. The improved CSS support is of particular interest as there is now a Manage Styles window that gives developers a nice tree layout of their styles where the values can be manipulated.
8).Orcas will also have better support for JavaScript, and the IDE will ship with ASP.NET AJAX natively installed. JavaScript IntelliSense in Orcas has been extended to the point that rich type inferencing is now supported. IntelliSense will also recognize the ASP.NET AJAX client-side libraries along with their comment summaries.
9).The final new feature Guthrie mentions is improved data support, or support for Language Integrated Query (LINQ). To help design LINQ queries, Orcas will include an object relational mapper that can be translated into LINQ queries. Complete data binding support for LINQ will also be available so that controls can be bound to LINQ objects.
10).The big benefit of Multi-Targeting is that you can now use most of the new features (for example: all the WYSWIYG designer and JavaScript editing ones) in Visual Studio "Orcas" immediately - even if you are still working on or updating an older project.
11).Assembly references, intellisense, and debugging within a project will automatically adjust based on the version of the framework you are targeting
The new "Manage Styles" property window allows you to easily create, manage, and refactor CSS rules within style-sheets.


C# 3.0 Features.

1).Automatically Implemented Properties ( Compiler Feature )
Creating a Customer Class using Automatically Implemented Properties in the Orcas C# 3.0 Compiler gives you the following code:
public class Customer {
public int Id { get; set; }
public string Name { get; set; }
public string City { get; set; }
public Customer() {}
}
2).Object and Collection Initializers
You can then use the new C# 3.0 Collection and Object Initializers to create the List class:
3).Query Expressions
And then you can query the list of customers using query expressions:
4).Implicity Typed Local Variables and Anonymous Types
Pulling apart the query expression above shows us a couple of new features in C# 3.0:
The var keyword used above signals the use of Implicitly Typed Local Variables for variable assignment
new { c.Name, c.City } is an example of Anonymous Types so we don't have to declare the new type.

LINQ ::: (Lanauage Integrated Query)

  • Query, Set and Transform Operations for .NET
  • Makes querying data a core programming concept
  • Works with all types and shapes of data
  • Relational database
    1).XML
    2).Objects
    3).Works with all .NET languages

  • New VB and C# have integrated language support
  • Support for both static typed and dynamic languages

LINQ Architecture::

Language integrated query syntax [ LINQ SYNTAX ]


from id in source

{ from id in source where condition }

[ orderby ordering, ordering, … ]

select expr group expr by key

[ into id query ]



LINQ Flavour's

1) DLINQ

2) XLINQ

3) Standard Query Operators

DLINQ::

Current ADO.Net::





  • Allows access to relational data as objects
  • Supports Language Integrated Query
  • Works with existing infrastructure
  • Unifies programming model for objects, relational and XML

DLINQ Feature::

EX::

var q =from c in db.Customers

where c.City == "London"

select c;



foreach (Customer c in q)

Console.WriteLine(c.CompanyName);

XLINQ::

  • New in-memory XML Programming API
  • Language Integrated Query (LINQ) for XML
  • XML Specific Query Operators (Axes)
  • .NET Function Library and custom functions
    = Powerful XML Query and Transform
  • Combine Data Access Technologies
    = More XML Query and Transform Scenarios

Standard Query Operators:::

Where, Select ,selectmany, Orderby, ThenBy, Group By

Working with SP's in DLINQ:::

Then assuming you have a SPROC defined like so in the Northwind database like so:

CREATE PROCEDURE GetCustomersInCity
@City NVARCHAR(30)
AS
SELECT
CustomerID, ContactName, Address
FROM
Customers
WHERE City = @City
GO

You can invoke the SPROC and get back and print out a list of name results using the below LINQ/DLINQ code:
Northwind db = new Northwind(connectionString);
var contactNames = from customer in db.GetCustomersInCity("London")
select customer.ContactName;
foreach (string contactName in contactNames)
{
Response.Write("Contact: " + contactName + " ") ;
}

You could also obviously databind the list of customers to an ASP.NET control like so as well (the below result will output a GridView with 3 columns):

Northwind db = new Northwind(connectionString);
GridView1.DataSource = from customer in db.GetCustomersInCity("London")
select customer;
GridView1.DataBind();
using (AWDB db = new AWDB(ConnStr))
{
var people =
from p in db.SalesPerson
where p.HireDate > hireDate
select p;
foreach (SalesPerson person in people)
{
Console.WriteLine(person.FirstName);
}
}


Review

• Linq == querying from programming language
• C# 3.0 was created to make Linq happen
• Several applications of Linq exist
• Linq to Objects, XML, DataSets, SQL, Entities
• More to come in the future
• Linq approaches functional programming





Hope this helps you ,

You can post your comments ...


Kiran Methuku.








2 comments:

Vijay's Special Blog said...

Good Studies About .NET
keep it up

thanq
VJ

Vijay's Special Blog said...

Good Studies About .NET
keep it up

thanq
VJ