© 2006 microsoft corporation. la plate-forme rss de windows christophe lauer spécialiste technique...

21
© 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/ clauer My score: 2585

Upload: pascaline-torres

Post on 04-Apr-2015

104 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

La Plate-forme RSS de Windows

Christophe LauerSpécialiste Technique Web & Windows Live

blogs.msdn.com/clauer

My score: 2585

Page 2: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Agenda

Etendre RSS : SLE, SSE, GeoRSS, …

Consommer du RSS :Windows RSS Platform

Exposer du RSS :RSS ToolkitXLinq

Page 3: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

RSS, Une grammaire simple<RSS ... >

<Channel ... > <Title ... >

<Link ... > <Description ... >

<item … > <title ... > <link ... >

<description ... ></item><item> ...</item>

</Channel></RSS>

Page 4: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Windows RSS Platform

Arriver a avec IE7 pour XP et dans VistaDisponible sur Windows Vista et XP (si IE7)

APIs utilisables depuis COM et .NETPrend en charge les différents formats

ATOM, RSS 0.9x, RSS 1.0, RSS 2.0, plus SLE

Applique un nettoyage des fluxNormaliser le contenuSupprimer le contenu potentiellement nocif

Maintient les flux à jour en tâche de fondRéférentiel de flux partagé

Référentiel au niveau utilisateur

Page 5: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Windows RSS Platform

Page 6: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

API de la plate-forme RSS

Deux API basées sur COM- Automation (IFeed…)- Early-bound (IXFeed…)

FeedsManager

Feed

FeedFolder

FeedItem

FeedEnclosure

FolderEvents

FeedEvents

Page 7: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Modèle objet (simple) de la RSS Platform

Page 8: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Page 9: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Générer du RSS : comment ?

Comme vous générez du XMLPuis exposez-le via un handler ASP.NET .ashx

Bibliothèques de code pour vous aider :RSS Toolkit : http://blogs.msdn.com/dmitryr/ Seulement quelques dizaines de lignes de code

Avec XLinqAvec Windows Communication Foundation

et bénéficiez des services supplémentaires

Page 10: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Dans le futur : XLinq

TestDB testDatabase = new TestDB(    "server=localhost; initial catalog=TestDB; integrated security=SSPI;");

XElement rssRoot = new XElement("rss",    new XAttribute("version", "2.0"),    new XElement("channel",        new XElement("title", "My RSS Feed"),        new XElement("link", "http://dotnetaddict.dotnetdevelopersjournal.com"),        new XElement("description", "This is my RSS Feed"),        from article in testDatabase.Articles        orderby article.CreatedOn descending        select new XElement("item",            new XElement("title", article.Title),            new XElement("link", "article.aspx?id="+article.ID.ToString()),            new XElement("description", article.Description),            from articleCategory in article.ArticleCategories                select new XElement("category", articleCategory.Categories.Description)             )         )    );

Page 11: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Page 12: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Vérifiez vos flux !

http://www.feedvalidator.org

Page 13: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

… et vérifiez périodiquement

Page 14: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Auto-découverte des flux

Découverte des flux dans les pages Web<html>

<head>

<title>Hello World Page</title>

<link rel="alternate" type="application/rss+xml"

title="The Hello World RSS feed" href="MyFeed.xml"/>

</head>

<body>

<h1>Hello, World</h1>

...

</body>

</html>

Page 15: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Etendre le format RSS

Simple List ExtentionsPermet des manipulations directement depuis le client

Tri et Regroupement

Annule et remplace via la notion de « Listes »

Simple Sharing ExtensionsDe unidirectionnel à bi-directionnel

Autres extensions : GeoRSSMontré plus tard…

Page 16: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Tris et Filtrages définis par le fournisseur du flux

<channel> <cf:listinfo> <cf:sort ns="urn:my" label="Buy It Now

price" element="BuyItNowPrice" data-type="number" default="no"/>

<cf:sort ns="urn:my" label="Current auction price" element="CurrentPrice" data-type="number" default="no"/>

<cf:sort ns="urn:my" label="Listing end time" element="EndTime" data-type="date" default="no"/>

<cf:sort ns="urn:my" label="Number of bids" element="BidCount" data-type="number" default="no"/>

<cf:group ns="urn:my" label="listing format" element="AuctionType"/>

<cf:group ns="urn:my" label="option" element="ItemCharacteristic"/>

<cf:group ns="urn:my" label="listing category" element="Category"/>

</cf:listinfo>

Page 17: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Listes

Une sémantique de ListesEnsemble cohérent d’éléments

Top 10 de … (chez Yahoo)Liste de produits disponibles (chez eBay)Wish List (chez Amazon)

Là où l’ordre importeFonctionne en “annule et remplace”

<channel>

<cf:treatas>list</cf:treatas>

Page 18: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Page 19: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Ressources

Toutes les ressources du Mini Mix :http://del.icio.us/c_lauer/RessourcesMixiMix

Page 20: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

Page 21: © 2006 Microsoft Corporation. La Plate-forme RSS de Windows Christophe Lauer Spécialiste Technique Web & Windows Live blogs.msdn.com/clauer My score: 2585

© 2006 Microsoft Corporation.

blogs.msdn.com/clauer