programmation web avec ajax

22
1 Programmation Programmation Web avec AJAX & Atlas Web avec AJAX & Atlas Dominic Sévigny Dominic Sévigny NetAppsID Inc. NetAppsID Inc. [email protected] [email protected]

Upload: sampetruda

Post on 08-May-2015

524 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Programmation Web avec AJAX

1

Programmation Programmation Web avec AJAX & AtlasWeb avec AJAX & Atlas

Dominic SévignyDominic Sévigny

NetAppsID Inc.NetAppsID Inc.

[email protected]@netappsid.com

Page 2: Programmation Web avec AJAX

2

AgendaAgendaIntroductionIntroduction

Qu’est-ce que AJAXQu’est-ce que AJAX

Programmation AJAX avec ASP.NET 2.0Programmation AJAX avec ASP.NET 2.0

Librairies AJAX pour le .NET Framework 1.xLibrairies AJAX pour le .NET Framework 1.x

PausePause

Programmation AJAX avec AtlasProgrammation AJAX avec Atlas

Questions et période de discussionQuestions et période de discussion

LiensLiens

À venir…À venir…

Page 3: Programmation Web avec AJAX

3

IntroductionIntroductionDéveloppement Windows (VB)Développement Windows (VB)

Développement Web (ASP)Développement Web (ASP)

Développement Windows orienté Web Développement Windows orienté Web (Windows Forms)(Windows Forms)

Développement Web orienté Windows Développement Web orienté Windows (Atlas)(Atlas)

Par exemple : Par exemple :

Outlook Web AccessOutlook Web Access

Google (Maps, Suggest, GMail)Google (Maps, Suggest, GMail)

Nouveau Hotmail (Microsoft Web Mail)Nouveau Hotmail (Microsoft Web Mail)

Start.comStart.com

Page 4: Programmation Web avec AJAX

4

Qu’est-ce que AJAXQu’est-ce que AJAX

AJAX (Asynchronous JavaScript And XML)AJAX (Asynchronous JavaScript And XML)

Objet COM local (Dépendant du Objet COM local (Dépendant du navigateur)navigateur)

Implémente la technologie Implémente la technologie XmlHttpRequest XmlHttpRequest Disponible depuis MS Internet Explorer 4 Disponible depuis MS Internet Explorer 4 (1998)(1998)

WebService.htc depuis .NET 1.0 (2002)WebService.htc depuis .NET 1.0 (2002)

JavaScript, DOM, HTML, and CSS JavaScript, DOM, HTML, and CSS

Simulation de AJAXSimulation de AJAX

Utilisation des « Frames » cachésUtilisation des « Frames » cachés

SmartNavigation depuis ASP.NET 1.0SmartNavigation depuis ASP.NET 1.0

Page 5: Programmation Web avec AJAX

5

Qu’est-ce que AJAXQu’est-ce que AJAX

Page 6: Programmation Web avec AJAX

6

Qu’est-ce que AJAXQu’est-ce que AJAX

Navigateur supportésNavigateur supportés

Apple Safari 1.2 et + Apple Safari 1.2 et +

Konqueror Konqueror

Microsoft Internet Explorer et +Microsoft Internet Explorer et +

Mozilla & Firefox 1.0 et +Mozilla & Firefox 1.0 et +

Netscape 7.1 et +Netscape 7.1 et +

Opera 7.6 et +Opera 7.6 et +

Page 7: Programmation Web avec AJAX

7

Qu’est-ce que AJAXQu’est-ce que AJAX

DémoDémo

Page 8: Programmation Web avec AJAX

8

Programmation AJAX avec ASP.NET Programmation AJAX avec ASP.NET 2.02.0

Interface Interface ICallbackEventHandlerICallbackEventHandler

MéthodeMéthode GetCallbackEventReferenceGetCallbackEventReference

Méthode Méthode RaiseCallbackEventRaiseCallbackEvent

Implémentation de baseImplémentation de base

Facile à utiliser Facile à utiliser

Bonne préparation pour AtlasBonne préparation pour Atlas

Page 9: Programmation Web avec AJAX

9

Programmation AJAX avec ASP.NET Programmation AJAX avec ASP.NET 2.02.0

DémoDémo

Page 10: Programmation Web avec AJAX

10

Librairies AJAX pour .NET Librairies AJAX pour .NET Framework 1.xFramework 1.x

Jason Diamond’s My Ajax.NETJason Diamond’s My Ajax.NET

(http://jason.diamond.name/weblog/(http://jason.diamond.name/weblog/category/asp-dot-net/) category/asp-dot-net/)

Ajax.NET Professional Ajax.NET Professional

((http://ajax.schwarz-interactive.de/cshttp://ajax.schwarz-interactive.de/csharpsample/default.aspxharpsample/default.aspx))

Page 11: Programmation Web avec AJAX

11

Librairies AJAX pour .NET Librairies AJAX pour .NET Framework 1.xFramework 1.x

DémoDémo

Page 12: Programmation Web avec AJAX

12

Programmation AJAX avec AtlasProgrammation AJAX avec Atlas

Nouveau projet de Microsoft afin de suivre Nouveau projet de Microsoft afin de suivre le marché…le marché…

« Framework » client et serveur complet« Framework » client et serveur complet

Compatible avec tous les navigateurs…Compatible avec tous les navigateurs…

Probablement un « Add-On » à ASP.NETProbablement un « Add-On » à ASP.NETComposantes serveurs (.dll)Composantes serveurs (.dll)

Composantes clients (.js)Composantes clients (.js)

Disponible en version « Go Live » en 2006Disponible en version « Go Live » en 2006

Page 13: Programmation Web avec AJAX

13

ASP.NET “Atlas” Server ExtensionsASP.NET “Atlas” Server Extensions

“Atlas” Server

Controls

“Atlas” Server

Controls

App Services Bridge

App Services Bridge

Web Services Bridge

Web Services Bridge

““Atlas” ArchitectureAtlas” Architecture

““Atlas” Server Atlas” Server FrameworkFramework

““Atlas” Client Framework and Atlas” Client Framework and ServicesServices

“Atlas” Client Script Library“Atlas” Client Script Library

Controls, Components

Controls, Components

Script CoreScript Core

Base Class LibraryBase Class Library

Component Model and UI FrameworkComponent Model and UI Framework

Browser Compatibility

Browser Compatibility

“Atlas” Client Application Services

“Atlas” Client Application Services

Local StoreLocal Store

BrowserIntegration

BrowserIntegration

ASP.NET 2.0ASP.NET 2.0

Application Services

Application Services

Page Framework,

Server Controls

Page Framework,

Server Controls

““Atlas”-enabled Atlas”-enabled ASP.NET PagesASP.NET Pages

““Atlas”-enabled Atlas”-enabled ASP.NET PagesASP.NET Pages

Web ServicesWeb Services(ASMX or WCF)(ASMX or WCF)

Web ServicesWeb Services(ASMX or WCF)(ASMX or WCF)

HTML, Script,HTML, Script,““Atlas”Atlas”MarkupMarkup

HTML, Script,HTML, Script,““Atlas”Atlas”MarkupMarkup

““Atlas”Atlas”ServiceServiceProxiesProxies

““Atlas”Atlas”ServiceServiceProxiesProxies

Page 14: Programmation Web avec AJAX

14

““Atlas” Client Script Atlas” Client Script LibraryLibraryScript core and base class libraryScript core and base class library““Atlas” script core – a full type system for Atlas” script core – a full type system for

JavascriptJavascriptClasses and interfaces, inheritance, virtual and abstract Classes and interfaces, inheritance, virtual and abstract methodsmethods

EnumerationsEnumerations

Multi-cast event handlers similar to .NETMulti-cast event handlers similar to .NET

Base class libraryBase class libraryStringBuilder, extensions to existing types StringBuilder, extensions to existing types

SerializersSerializers

Debugging and tracing classesDebugging and tracing classes

NetworkingNetworking

Page 15: Programmation Web avec AJAX

15

““Atlas” NetworkingAtlas” NetworkingClient networking stack layered on XMLHTTPClient networking stack layered on XMLHTTP

WebRequestWebRequest, , WebResponseWebResponse, , MethodRequestMethodRequest classes classes

ASP.NET “Atlas” Web Services BridgeASP.NET “Atlas” Web Services BridgeAccess to ASP.NET-hosted and serviced componentsAccess to ASP.NET-hosted and serviced components

ASMX and WCF services, .NET objects, ASP.NET page-level ASMX and WCF services, .NET objects, ASP.NET page-level servicesservices

Automatic client proxy generation Automatic client proxy generation <script src=“MyService.asmx/js” /><script src=“MyService.asmx/js” />

Integrated with ASP.NET intrinsicsIntegrated with ASP.NET intrinsics

Wire format: Javascript object notationWire format: Javascript object notationpublic class Location {public class Location { public Point Coordinates;public Point Coordinates; public String Name;public String Name;}}

public class Location {public class Location { public Point Coordinates;public Point Coordinates; public String Name;public String Name;}}

{ Coordinates : { X: 2.17, Y: 48.51 },{ Coordinates : { X: 2.17, Y: 48.51 },

Name : Name : ""Eiffel Tower" }Eiffel Tower" }

{ Coordinates : { X: 2.17, Y: 48.51 },{ Coordinates : { X: 2.17, Y: 48.51 },

Name : Name : ""Eiffel Tower" }Eiffel Tower" }

Page 16: Programmation Web avec AJAX

16

Building Web UI with Building Web UI with “Atlas”“Atlas”Components, controls, and Components, controls, and behaviorsbehaviorsWeb.ComponentWeb.Component

Reusable building blocksReusable building blocksCreated declaratively or Created declaratively or programmaticallyprogrammatically

Wired up through bindings Wired up through bindings and eventsand events

Manage their own lifetimeManage their own lifetime

UI componentsUI componentsAssociated with DHTML UI Associated with DHTML UI elementselements

Web.UI.ControlWeb.UI.Control

Page 17: Programmation Web avec AJAX

17

Building Web UI with Building Web UI with “Atlas”“Atlas”Creating and wiring up componentsCreating and wiring up components

<atlas:ScriptManager runat=“server” id=“TextBox1” /><atlas:ScriptManager runat=“server” id=“TextBox1” />

<atlas:TextBox runat=“server” id=“TextBox1” /> <atlas:TextBox runat=“server” id=“TextBox1” />

<atlas:Label runat=“server” id=“Label1” CssClass=“MyLabel”><atlas:Label runat=“server” id=“Label1” CssClass=“MyLabel”>

<Bindings><Bindings>

<atlas:Binding DataPath=“TextBox1” Property=“Text”><atlas:Binding DataPath=“TextBox1” Property=“Text”>

</Bindings></Bindings>

</atlas:Label></atlas:Label>

<atlas:ScriptManager runat=“server” id=“TextBox1” /><atlas:ScriptManager runat=“server” id=“TextBox1” />

<atlas:TextBox runat=“server” id=“TextBox1” /> <atlas:TextBox runat=“server” id=“TextBox1” />

<atlas:Label runat=“server” id=“Label1” CssClass=“MyLabel”><atlas:Label runat=“server” id=“Label1” CssClass=“MyLabel”>

<Bindings><Bindings>

<atlas:Binding DataPath=“TextBox1” Property=“Text”><atlas:Binding DataPath=“TextBox1” Property=“Text”>

</Bindings></Bindings>

</atlas:Label></atlas:Label>

… … Using ASP.NET server controlsUsing ASP.NET server controls

Page 18: Programmation Web avec AJAX

18

AtlasAtlas

DémoDémo

Page 19: Programmation Web avec AJAX

19

““Atlas” RoadmapAtlas” Roadmap

Public developer previews and betasPublic developer previews and betashttp://atlas.asp.net http://atlas.asp.net – Atlas community site– Atlas community site

Prototype release available nowPrototype release available now

Updates, samples, documentation on a regular Updates, samples, documentation on a regular basisbasis

We want your feedback!We want your feedback!

““Go live” Beta release sometime in 2006Go live” Beta release sometime in 2006

Page 20: Programmation Web avec AJAX

20

Questions et période de discussionQuestions et période de discussion

Est-ce que le style AJAX a de l’avenir?Est-ce que le style AJAX a de l’avenir?

Est-ce que Atlas a de l’avenir?Est-ce que Atlas a de l’avenir?

Quel type d’application Web utilisera cette Quel type d’application Web utilisera cette technologie?technologie?

Sécurité?Sécurité?

Allez-vous l’utiliser?Allez-vous l’utiliser?

Votre opinion?Votre opinion?

Page 21: Programmation Web avec AJAX

21

LiensLiens

http://atlas.asp.nethttp://atlas.asp.net

http://atlas.asp.net/forumshttp://atlas.asp.net/forums

http://msdn.microsoft.com/asp.net/http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/default.aspx?pull=/library/en-us/dnaspp/html/aspnetspicedajax.asphtml/aspnetspicedajax.asp

Page 22: Programmation Web avec AJAX

22

À venirÀ venir

Formation chez Technologia le 8 et 9 Formation chez Technologia le 8 et 9 Novembre Novembre (Actualisation des compétences ASP.NET 1.x (Actualisation des compétences ASP.NET 1.x à ASP.NET 2.0)à ASP.NET 2.0)

Blog personnel uniquement sur ASP.NET Blog personnel uniquement sur ASP.NET AtlasAtlas

((http://www.dominicsevigny.comhttp://www.dominicsevigny.com à venir) à venir)

Atlas Book ???Atlas Book ???