|
Sponsored Links
Resources
.NET Research Library
Get .NET related white papers, case studies and webcasts
|
News
News
News
|
Messages: 18
Messages: 18
Messages: 18
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Microsoft Announces LINQ at PDC 2005
During PDC 2005’s opening keynote Microsoft announced the development of the LINQ project (.NET Language Integrated Query), a set of standard query operators for use in working with data regardless of the data source. This feature combined with an extension for querying XML data (XLinq) and SQL Databases (DLinq) allow data to be queried, manipulated, and persisted using language constructs instead of ADO.NET.
After some extensive demos of Windows Vista and Office 12, Don Box, Anders Hejlsberg, Scott Guthrie, and Chris Anderson took the PDC Keynote stage to show how LINQ can be used to query and traverse data, how WCF (Indigo) can be used to wrap that query in a service, how Atlas can be used to call that query from a web page and how a WPF can be used to provide a more interactive smart client UI.
The demo starts with Anders explaining how the LINQ extensions in C# can be used to query any IEnumerable data source, in this case by calling the GetProcesses method to return a list of the currently running processes. Not only was he able to return the list but using a simple query syntax he was able to limit the results to only those processes using more than 4 Megs of memory and then sort them alphabetically. He then shows how to iterate through the list building an RSS formatted XML version of the results.
Don Box then led the redeployment of that method as an Indigo service, publishing the results as an RSS feed making use of the new PoxBinding setting in Indigo. PoxBinding returns the results as XML with all of the SOAP removed.
Next up was Scott Guthrie who showed some of the new features of Atlas including the Atlas based ListView. Using these controls he was able to define a web page that displayed the formatted results on a web page without requiring a page postback. Chris Anderson then used XAML to create a smart client interface with visualizations based on the amount of memory the process used.
Here is an example of LINQ in C# 3.0 from the whitepaper released today at PDC.using System; using System.Query; using System.Collections.Generic;
class App { static void Main() { String[] names = {“Burke”, “Connor”, “Frank”, “Everett”, “Albert”, “George”, “Harris”, David” }; IEnumerable<string> expr = from s in names where s.Length == 5 orderby s select s.ToUpper(); foreach (string item in expr) { Console.WriteLine(item); } } } Attendees will be receiving the LINQ early release bits today along with Office 12 Beta 1 and an interim release of Windows Vista. There will be much more information available about LINQ later in the week. You can also read more about it on The LINQ Project on MSDN.
|
|
Message #184404
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Microsoft Announces LINQ at PDC 2005
It seems to be very interesting thing. We already use the same approach within our persistent layer for querying data using native C# or VB 2.0 syntax.
Quering using typed queries
It looks like this in our case:
NorthwindPDS ds = newNorthwindPDS(); OrderQuery q = new OrderQuery();
q.Criteria = (q.EmployeeID == 4 && q.CustomerID == "HANAR" && q.ShipVia.In(list));
ds.Orders.Fill(q);
Best Regards, Andrey.
|
|
Message #184420
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
OOQL?
Sounds like a mixture of various object query languages that already exist. The real question is, when will MS come out with an ORM for complex scenarios where multiple database and models create integration headaches.
Is this new query language the precursor to a full blown ORM solution?
peter
|
|
Message #184605
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Microsoft Announces LINQ at PDC 2005
MyGeneration's dOOdads, 100% free, generated in seconds, runs on 8 DBMS Systems including Microsoft SQL, Oracle, Firebird, Access, PostgreSQL, VistaDB, SQLite, and MySQL.
OrderQuery qry = new OrderQuery();
qry.Where.EmployeeID.Value = 4; qry.Where.CustomerID.Value = "HANAR"; qry.Where.ShipVia.Operator = WhereParameter.Operand.In; qry.Where.ShipVia.Value = "1,2,3";
qry.Query.Load();
The default operator is Equal so there's no need to set it on EmployeeID and CustomID.
Mike Griffin MyGeneration Software http://www.mygenerationsoftware.com
dOOdads http://www.mygenerationsoftware.com/portal/dOOdads/Overview/tabid/63/Default.aspx
|
|
Message #184623
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
obvious limitations
I hope the linq package does indexing. If it doesn't, the performance is going to be horribly slow and have huge scalability issues. Luckily for Microsoft, some researchers have already figured out how to query (ie search) in memory objects efficiently. There's RETE, TREAT and LEAPS algorithm. The question now is, can microsoft actually implement RETE correctly.
I'll apologize in advance. Couldn't resist taking a pot shot at microsoft for re-inventing the wheel.
peter
|
|
Message #184748
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Native Queries! Cool!
After two other vendors posted their own native query samples here, I would like to add the syntax thate we are using for our open source object database db4o:IList<Order> orders = db.query<Order>(delegate(Order o){ return o.EmployeeID == 4 && o.CustomerID == "HANAR" && list.Contains(o.ShipVia); }); ...and yes, the above will run optimized, using indexes. We analyze and translate IL-code to true database queries.
Our team is taking a very close look at LINQ and DLINQ. Speaking for myself: I must say, the approach is quite interesting. Should DLINQ really be rolled out (after seeing ObjectSpaces cancelled, I do have some doubts), we may consider to support this syntax also.
However, we also supply our object database for CompactFramework and it seems questionable, if DLINQ will be available there. Our native queries (as above) are runnable in a sneak preview today. The native query optimizer will be shipped with the final release of db4o version 5.0 in November and it will certainly be available for CompactFramework also.
A paper on our approach for native queries is available from the new object database ressource portal ODBMS.ORG in the articles section.
-- Carl Rosenberger Chief Software Architect db4objects Inc. http://www.db4o.com
|
|
Message #184837
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
obvious limitations
Peter, I'm not remotely close to being an expert and I might even be missing the point of your post, but surely Linq is not designed to behave like a mini BizTalk engine. The idea is to enhance the programming language such that you can query different data sources using a common approach. It's just a massive syntax enhancement as far as I'm concerened.
|
|
Message #184838
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Massive syntax enhancement as far as I'm concerened
[blockquote]It's just a massive syntax enhancement as far as I'm concerened.[/blockquote]
I basically agree with you. I wasn't going to mention it but now that the ice has been broken ...
Frankly this syntax is going to be very confusing to great unwashed. I did a decade of C++ including lots of C++ template work before .NET with ATL based COM, Borlands OWL, STL, everything. But even so I don't find that type of syntax friendly anymore. Its over used in lots of cases for reasons I'm not going to go into. This buzz will wear off believe me ...
I started on My new 2.0 architecture as a sort of generics on steriods, now you will not find a single template (generic) in it. I know this will draw a lot of flame from folks but hey, we gotta drive some traffic here ...
|
|
Message #184839
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
obvious limitations
Peter, I'm not remotely close to being an expert and I might even be missing the point of your post, but surely Linq is not designed to behave like a mini BizTalk engine. The idea is to enhance the programming language such that you can query different data sources using a common approach. It's just a massive syntax enhancement as far as I'm concerened. that's a good way to put it. I didn't think of it that way. I know several open source people have tried to write query engines for querying in-memory data. in many of the cases, simplistic indexing helps, but runs into scalability issues. I'm guessing LINQ is meant for small datasets and quick & dirty queries.
peter
|
|
Message #184886
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
LinQ is the alpha version on c#3.0
Are you all reallly serious about linQ, There is a long way toward release. For C# 3.0 I think not at until least 2006~7. LinQ is unstable as it has freezed VS2005 when i tried it. Is there any blogs by someone to show cases where linQ can be used to join highly normalised database like more than 10 tables without causing error ?
|
|
Message #184895
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Microsoft Announces LINQ at PDC 2005
MyGeneration's dOOdads, 100% free, generated in seconds, runs on 8 DBMS Systems including Microsoft SQL, Oracle, Firebird, Access, PostgreSQL, VistaDB, SQLite, and MySQL. iBATIS.NET is 100% free, open source, runs on any database there is a driver for, does not require any code generation and has implementations in Java and Ruby as well. And it only requires that you know SQL...no new query APIs required.
<select id="loadOrder" resultClass="e.g.Order"> SELECT * FROM Orders WHERE EmployeeID = 4 AND CustomerID = 'HANAR' AND ShipVia IN (1,2,3) </select>
Order order = (Order) mapper.queryForObject("loadOrder", NOPARAMS);
That said, I think DLINQ is absloutely fantastic. I just hope they continue with a minimal, simple and pure paradigm...and that they don't screw it up with overcomplication and tool dependencies. Luckily Microsoft has very smart people working on this one.
Cheers, Clinton Begin http://ibatis.apache.org
|
|
Message #184944
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
no new query APIs required
True, but the dOOdads query mechanism is very simple to use. The exact same dOOdads code runs all all DBMS systems. In our testing we used the exact same NUnit harnesses agains all DBMS systems even though in reality the actual SQL for those systems is quite different. Of course, we can load from direct sql, views, and stored procedures too, but if they use the dOOdads query mechanism they have 100% provider independece which is increasingly important with hosting companies offering all kinds of DBMS systems now.
As far as not requiring generation I can walk into a shop and have the complete dOOdads framework for their entire data model generated in 10 minutes.
It's a big market place though, and there is room for all kinds of approaches and players so don't get me wrong. It's just that our query mechansim has some real key advantages ...
|
|
Message #185024
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
no new query APIs required
JPetStore, which used iBATIS for Java, ran against 11 different database engines without changes....SQL is an ANSI "standard" afterall. Although database vendors offer vendor specific optimizations, it is possible to write portable SQL. But it's nice to know that for the odd cases where a vendor specific feature is needed (e.g. Oracle CONNECT BY), you can use it with iBATIS.
Agreed though, there is no perfect solution, and a lot of room for innovation.
Cheers, Clinton
|
|
Message #185042
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
no new query APIs required
We've found that even the simplist things like SELECT TOP vs LIMIT ROWS are different, and Firbird, Oracle, SQL all use different syntax's to protect against keyword collisions, ie, '', "", or [].
We're both helping the dev world and that's what it's all about ... best of luck ....
|
|
Message #185227
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
no new query APIs required
JPetStore, which used iBATIS for Java, ran against 11 different database engines without changes....SQL is an ANSI "standard" afterall. Although database vendors offer vendor specific optimizations, it is possible to write portable SQL. But it's nice to know that for the odd cases where a vendor specific feature is needed (e.g. Oracle CONNECT BY), you can use it with iBATIS. Agreed though, there is no perfect solution, and a lot of room for innovation. Cheers, Clinton it's definitely possible, but some things do run considerably faster if you customize the sql. Take Sybase for example. Simple join queries that run fast in Sql Server require additional hints in Sybase. Adding tips in inner, outer, left and right to joins can greatly improve performance. It's best to judge each case by case and decide the cost of going with an optimized query.
|
|
Message #185387
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
no new query APIs required
Absolutely agree 100%.
And that's why iBATIS exists. :-)
Cheers, Clinton
|
|
 |
| |
|
New content on TheServerSide.NETNew content on TheServerSide.NETNew content on TheServerSide.NET |
 |
 |
Language "mashups" will become more prominent, and developers will become polyglots, one programmer suggests.
SearchWinDevelopment.com offers an introduction to the language, performance, testing and data management improvements in VS 2008.
VBCode.com code snippets cover all aspects of application development, from data binding to security to the user interface.
Get up to date on XAML best practices with a variety of articles, tutorials and webcasts. [SearchWinDevelopment.com]
One team's experience with the VSTS DB edition suggests that it can improve workflow for dev teams. It also enhanced Agile efforts.
(June 24, Article)
Microsoft has begun to include DSL tools in the VSTS kit. A new book by Steve Cook and other VSTS team members helps set the stage.
(June 24, Article)
Cartoon: Be it ever so humble there is no place like your home after you get a Microsoft Home Server .
(June 18, Cartoon)
Microsoft's Thom Robbins says new technology to highlight in NET 3.5 includes AJAX, LINQ for both C# and VB, as well as tooling enhancements intended to ease the task of building WPF, WF and WCF apps.
(June 29, Podcast)
Venkat Subramaniam discusses AJAX bottlenecks, the tenets of Agile development and more. He spoke at the Ajax Experience.
(June 25, Tech Talk)
In the second of a two-part series, Michele Leroux Bustamente discusses design decisions related to the claims-based security model. Read the story and walk through the process for creating a set of claims-based utilities to encapsulate claims authorization at the service tier.
(May 24, Article)
Understanding why the Entity Framework exists and learning where it can fit into your projects can get you prepared for the eventual release early next year.
(May 10, Article)
Resource: This learning guide gives you quick access to useful links on Windows Communication Foundation security information.
(April 24, Article)
TSS.NET's Jack Vaughan spoke recently spoke with Microsoft's Brad Abrams to find out what he is seeing in the field and what the chefs in Redmond are cooking. Along the way he discusses patterns of AJAX frameworks.
(April 11, Article)
In a two-part series, Michele Leroux Bustamente explains how claims-based security is supported by WCF, and how you can implement a claims-based security model for your services.
(March 29, Article)
Windows Workflow Foundation is a new technology that many developers will need to get their heads around. In a brief excerpt adapted from Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#, K.Scott Allen considers aspects of workflow definition.
(March 22, Chapter Excerpt)
|
|