• Blog
  • Info Support
  • Career
  • Training
  • International Group
  • Info Support
  • Blog
  • Career
  • Training
  • International Group
  • Search
logo InfoSupport
  • Latest blogs
  • Popular blogs
  • Experts
      • All
      • Bloggers
      • Speakers
  • Meet us
  • About us
    • nl
    • en
    • .NET
    • 3D printing
    • Advanced Analytics
    • Agile
    • Akka
    • Alexa
    • Algorithms
    • Api's
    • Architectuur
    • Artificial Intelligence
    • ATDD
    • Augmented Reality
    • AWS
    • Azure
    • Big Data
    • Blockchain
    • Business Intelligence
    • Chatbots
    • Cloud
    • Code Combat
    • Cognitive Services
    • Communicatie
    • Containers
    • Continuous Delivery
    • CQRS
    • Cyber Security
    • Dapr
    • Data
    • Data & Analystics
    • Data Science
    • Data Warehousing
    • Databricks
    • DataOps
    • Developers life
    • DevOps
    • Digital Days
    • Digital Twin
    • Docker
    • eHealth
    • Enterprise Architecture
    • Event Sourcing
    • Hacking
    • Infrastructure & Hosting
    • Innovatie
    • Integration
    • Internet of Things
    • Java
    • Machine Learning
    • Microservices
    • Microsoft
    • Microsoft Bot Framework
    • Microsoft Data Platform
    • Mobile Development
    • Mutation Testing
    • Open source
    • Pepper
    • Power BI
    • Privacy & Ethiek
    • Python
    • Quality Assistance & Test
    • Quality Assurance & Test
    • Requirements Management
    • Scala
    • Scratch
    • Security
    • SharePoint
    • Software Architecture
    • Software development
    • Software Factory
    • SQL Server
    • SSL
    • Start-up
    • Startup thinking
    • Stryker
    • Test Quality
    • Testing
    • TLS
    • TypeScript
    • Various
    • Web Development
    • Web-scale IT
    • Xamarin
    • All
    • Bloggers
    • Speakers
Home » PDC day 2, Linq: The future of data intensive programming
  • PDC day 2, Linq: The future of data intensive programming

    • By Oud-medewerkers
    • .NET 18 years ago
    • .NET 0 comments
    • .NET .NET
    PDC day 2, Linq: The future of data intensive programming

    At the PDC, they shown some cool new ways to interact with data from .NET. As you know, there's lots of types of data. You could have DataSets, Object graphs, Xml etc. Furthermore, things become harder in a Service Oriented environment where al these types of data come together.

    Often enough you get some data from an external webservice in the form of objects, and a DataSet from a database that you own in your code. The challenge is then to bring that data together and transform it in the correct way for your application.

    Furthermore, when using these forms of data, you have different paradigms to adhere to. Xml needs XPath / XSL-T, DataSets use SQL and DataViews and for object graph you just program a bunch of loops and stuff.

    Earlier on I had some discussions with some of my collegues at InfoSupport about object-relational mapping. We then came tto the conclusion that we needed a way to do 'client-side' queries, joins etc for datamanipulation and that this should be possible from and to all types of data.

    Microsoft has recognized these problems too and came up with Linq (Language Integrated Query) as a framework to do these types of data manipulation. In this framework all types of data can be supported, for instance DLinq as a plug-in for relational data and XLinq as a plugin for Xml.

    The really cool thing though is that the whole thing is integrated into the language (currently only C#) and thereby offers things like statement completion (Intellisense) and compiletime checks on your data manipulation.

    Compare the following examples:

    Today one would do this:

    XmlDocument doc = new XmlDocument();

    XmlElement contacts = doc.CreateElement("contacts");

    foreach (Customer c in customers)

        if (c.Country == "USA") {

            XmlElement e = doc.CreateElement("contact");

            XmlElement name = doc.CreateElement("name");

            name.InnerText = c.CompanyName;

            e.AppendChild(name);

            XmlElement phone = doc.CreateElement("phone");

            phone.InnerText = c.Phone;

            e.AppendChild(phone);

            contacts.AppendChild(e);

        }

    doc.AppendChild(contacts);

     

    In the future, using XLinq one could do this:

    XElement contacts = new XElement("contacts",

        from c in customers

        where c.Country == "USA"

        select new XElement("contact",

            new XElement("name", c.CompanyName),

            new XElement("phone", c.Phone)

        )

    );

    So this is really cool, and I hope to see this as a finished product soon.. though it wont be available until C#3.0. On the upside, it will run on the whidbey CLR, so that we can already play with the CTP bits today.

    [Update: changed sample]

    Share this

Oud-medewerkers

View profile

Related IT training

Go to training website

Related Consultancy solutions

Go to infosupport.com

Related blogs

  • Configuring SQL Server encrypted connections using Powe…

    Configuring SQL Server encrypted connections using Powe… Léon Bouquiet - 1 month ago

  • Where to position SpecFlow in the Test Pyramid?

    Where to position SpecFlow in the Test Pyramid? Ronald Bosma - 4 months ago

  • Building a custom Kubernetes operator in C#

    Building a custom Kubernetes operator in C# Willem Meints - 8 months ago

Data Discovery Channel

  • Data+AI Summit 2023

  • Blijf je Azure cloud omgeving de baas met CloudXcellence

  • MLOps

Nieuwsbrief

* verplichte velden

Contact

  • Head office NL
  • Kruisboog 42
  • 3905 TG Veenendaal
  • T +31 318 552020
  • Call
  • Mail
  • Directions
  • Head office BE
  • Generaal De Wittelaan 17
  • bus 30 2800 Mechelen
  • T +32 15 286370
  • Call
  • Mail
  • Directions

Follow us

  • Twitter
  • Facebook
  • Linkedin
  • Youtube

Newsletter

Sign in

Extra

  • Media Library
  • Disclaimer
  • Algemene voorwaarden
  • ISHBS Webmail
  • Extranet
Beheer cookie toestemming
Deze website maakt gebruik van Functionele en Analytische cookies voor website optimalisatie en statistieken.
Functioneel Always active
De technische opslag of toegang is strikt noodzakelijk voor het legitieme doel het gebruik mogelijk te maken van een specifieke dienst waarom de abonnee of gebruiker uitdrukkelijk heeft gevraagd, of met als enig doel de uitvoering van de transmissie van een communicatie over een elektronisch communicatienetwerk.
Voorkeuren
De technische opslag of toegang is noodzakelijk voor het legitieme doel voorkeuren op te slaan die niet door de abonnee of gebruiker zijn aangevraagd.
Statistieken
De technische opslag of toegang die uitsluitend voor statistische doeleinden wordt gebruikt. De technische opslag of toegang die uitsluitend wordt gebruikt voor anonieme statistische doeleinden. Zonder dagvaarding, vrijwillige naleving door uw Internet Service Provider, of aanvullende gegevens van een derde partij, kan informatie die alleen voor dit doel wordt opgeslagen of opgehaald gewoonlijk niet worden gebruikt om je te identificeren.
Marketing
De technische opslag of toegang is nodig om gebruikersprofielen op te stellen voor het verzenden van reclame, of om de gebruiker op een website of over verschillende websites te volgen voor soortgelijke marketingdoeleinden.
Manage options Manage services Manage vendors Read more about these purposes
Voorkeuren
{title} {title} {title}