You are on page 1of 39

03/03/2003

Les Web Services en .Net


Michel RIVEILL riveill@unice.fr - http://www.essi.fr/~riveill Laboratoire I3S Ecole dIngnieur en Sciences Informatiques (ESSI)

Plan
n Petit rappel sur les services Web n UDDI n DISCO n WSDL n SOAP n Dvelopper un service Web n Consommer un service Web n Divers

03/03/2003

03/03/2003

Evolution des technologies


XML
Interconnexion des applications

gie olo chn Te


Inn ov atio n

IP TC P/
Connectivit
FTP, E-ma il, Go pher

TML

Prsentation

ages Interconnexion Web Servic Web Navigation es Web Programmation

Web P

Web
03/03/2003 3

Comprendre les technologies


La pile Web Service
Annuaire : publication et recherche de services Inspection : recherche de services sur un serveur

UDDI DISCO WSDL SOAP XML Internet

Description des services Description des changes Format de donnes Communication

Simple, Ouvert, Large support de lindustrie


03/03/2003 4

03/03/2003

Comprendre les technologies


La pile Web Service
n Dcouvrir les services n Un annuaire permet des client didentifier les services Web pertinents
n

UDDI

Un protocole dinspection permet de localiser les documents lis un services Web dfini par son URL
n

DISCO

Un langage de description spcifie la signature des mthodes du services Web


n

WSDL
5

03/03/2003

Comprendre les technologies


La pile Web Service
Annuaire
http:// www.uddi.org Localiser un service Lien sur u n e description du service (XML)

UDDI

UDDI ou Un autre annuaire

Web Service Client

Inspection
http:// www.ibuyspy.com/ibuyspy.disco Requte de demande dinformation

DISCO

Retour : un document dinformation (XML)

Description
Demander la description du service Rponse : service description (XML)

WSDL

Web Service

http:// www.ibuyspy.com/ibuyspycs/InstantOrder.asmx?wsdl

Format dchange
Appel du service Rponse : retour du service demand (XML)

SOAP

03/03/2003

03/03/2003

Comprendre les technologies


le transport des requtes
n Web Service Wire Format spcifie comment les

messages sont changs


n n n

HTTP-GET HTTP-POST SOAP

n HTTP-GET et HTTP-POST utilise linterface usuelle

de HTTP pour appeler un service Web


n

Support limits pour des diffrents types de donnes

n SOAP dfini une interface robuste pour HTTP/XML n Support de tous les types de donnes

03/03/2003

SOAP
n Un protocole simple pour changer des informations dans un

environnement distribu, htrogne


n Permet lintroprabilit inter-plate-forme n Interoprabilit n Neutre vis--vis de lOS, du modle dobjets, du langage de programmation n Indpendant du matriel n Indpendant du protocole n Fonctionne sur les infrastructures existantes de lInternet, utilise les

standards actuels
n n

SOAP HTTP + XML Sous le contrle du W3C

n Les spcifications SOAP concernent n Le format des messages n Comment envoyer un message n Comment recevoir la rponse n Lencodage des donnes
03/03/2003 8

03/03/2003

SOAP
nest pas
n Un systme rparti objets n Pas de rfrences sur des objets n Pas de ramassage de miettes en rpartis n HTTP nest pas bi-directionnel n Par dactivation de service distance n Compliqu/simple ? n Ne veut pas rsoudre tous les problme du calcul distribus n Peut tre facilement implment
03/03/2003 9

SOAP
Point de vue :HTTP
n Requte HTTP Post
POST /WebCalculator/Calculator.asmx HTTP/1.1 Content-Type: text/xml SOAPAction: http://tempuri.org/Add Content-Length: 386 <?xml version=1.0?> <soap:Envelope ...> ... </soap:Envelope>

03/03/2003

10

03/03/2003

SOAP
Structure dun message // revoir
SOAP Message Headers SOAP Envelope SOAP Header Headers SOAP Body Message Name & Data
Le message SOAP Lentte indiquant le protocole de transport <Envelope> encloses payload <Header> encloses headers Individual headers <Body> contains SOAP message name XML-encoded SOAP message name & data

03/03/2003

11

SOAP
Format dun message SOAP
n Un document XML utilisant le schma SOAP
<?xml version=1.0?> <soap:Envelope ...> <soap:Header ...> ... </soap:Header> <soap:Body> <Add xmlns=http://tempuri.org/> <n1>12</n1> <n2>10</n2> </Add> </soap:Body> </soap:Envelope>

03/03/2003

12

03/03/2003

SOAP
Rponse du serveur
n Message de rponse du serveur
HTTP/1.1 200 OK ... Content-Type:text/xml Content-Length: 391 <?xml version=1.0?> <soap:Envelope ...> <soap:Body> <AddResult xmlns=http://tempuri.org/> <result>28.6</result> </AddResult> </soap:Body> </soap:Envelope>

03/03/2003

13

SOAP
Coder des donnes complexes
n Les structures de donnes sont srialises

en XML
<soap:Envelope ...> <soap:Body> <GetStockDataResult xmlns=http://tempuri.org/> <result> <Description>Plastic Novelties Ltd</Description> <Price>129</Price> <Ticker>PLAS</Ticker> </result> </GetStockDataRseult> </soap:Body> </soap:Envelope>
03/03/2003 14

03/03/2003

SOAP
Scurit
n Base sur HTTP n HTTPS n Certificats X.509 n Le dveloppeur choisi les mthodes quil

souhaite rendre publique n Il nest possible de transmettre du code n Peut traverser les Firewall n Typage

03/03/2003

15

SOAP
Tout le monde se lve pour
n DevelopMentor Inc. n Digital Creations n Microsoft

n IONA Technologies PLC n Rogue Wave Software Inc. n Scriptics Corp. n Jetform n ObjectSpace Inc. n Rockwell Software Inc. n SAP n Compaq n Secret Labs AB n Zveno Pty. Ltd. n IBM n Hewlett Packard n Intel n UserLand Software Inc.

03/03/2003

16

03/03/2003

SOAP
Exemple dune requte SOAP
POST /StockQuote HTTP/1.1 Host: www.stockquoteserver.com Content-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "Some-URI <SOAP-ENV:Envelope xmlns:SOAPENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV: encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol>DIS</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

03/03/2003

17

SOAP
Exemple dune rponse SOAP
HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Content-Length: nnnn <SOAP-ENV:Envelope xmlns:SOAP-ENV= "http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV: encodingStyle= "http://schemas.xmlsoap.org/soap/encoding/"/> <SOAP-ENV:Body> <m:GetLastTradePriceResponse xmlns:m="Some-URI"> <Price>34.5</Price> </m:GetLastTradePriceResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

03/03/2003

18

03/03/2003

SOAP
Example dune rponse SOAP ngative
HTTP/1.1 500 Internal Server Error Content-Type: text/xml; charset="utf-8" Content-Length: nnnn <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode> SOAP-ENV: MustUnderstand </faultcode> <faultstring>SOAP Must Understand Error </faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

03/03/2003

19

WSDL
Web Services Description Language
n Schma XML pour dcrire des services Web 1. Dfinition de linterface du service

Abstrait la smantique du service Web Dfini lendroit ou le service peut tre appel (adresse IP, port, etc.)

2.

Dfinition du service

n Sparation claire entre message abstrait et

message concret

03/03/2003

20

10

03/03/2003

WSDL
Interface <definitions> <import> <types> <message> <portType> <binding>
03/03/2003 21

Implementation <definitions> <import> <service> <port>

WSDL
Interface <definitions> <import> <types> <message> <portType> <binding>
03/03/2003

<definitions> noeud racine de la


description WSDL <import> permet lutilisation de dfinitions externes <types> sont des dfinitions xsd <message> dfini les paramtres des fonctions du service Web <portType> dfini types des entres et des sorties des oprations <binding> spcifie comment chaque message doit tre envoyer
22

11

03/03/2003

WSDL
Implementation
<service> spcifie les dtails lis limplmentation <port> contient les adresses

<definitions> <import> <service> <port>

03/03/2003

23

WSDL
n Demonstration :
http://localhost//math.asmx?WSDL

03/03/2003

24

12

03/03/2003

Inspection
DISCO
n Inspection lets you find Web Services on

a given site
n n n

A Web site publishes DISCO documents, which returns the URLs of WSDL descriptions DISCO documents can contain references to other sites and DISCO documents Dynamic discovery enables trees of directories to be searched

03/03/2003

25

UDDI
Overview
n UDDI = Universal Description, Discovery, and

Integration n Industry Initiative to address discovery


n

A registration database for Web Services

n Specifications n Schema for service providers and descriptions n API for publishing and searching n Developed on industry standards (XML, HTTP, TCP/IP, SOAP) n Applies to both XML and non-XML services n Implementation n Public and private instances of specification
03/03/2003 26

13

03/03/2003

UDDI
The Vision
Advanced Discovery via Portals and Marketplaces Marketplace Marketplace Marketplace Search Portal Search Portal
Business Users
03/03/2003

UDDI Registries and Protocol

Technical Users
27

UDDI
UDDI Information Model
Provider: Information about the entity who offers a service

tModel: Descriptions of specifications for services.


1n

0n

Service: Descriptive information about a particular family of technical offerings


Bindings contain references to tModels. These references designate the interface specifications for a service.

0n

Binding: Technical information about a service entry point and construction specs

03/03/2003

28

14

03/03/2003

UDDI
UDDI Schema
Interface Implementation <businessEntity> <businessService> <tModel> <bindingTemplate> <businessService> <tModel> <bindingTemplate>

03/03/2003

29

UDDI
How UDDI Works: tModel
n tModel = Technology Model n Generic meta-data structure to uniquely

represent any concept or construct n Also includes interface protocol definitions n Powerful abstraction modeling system n Examples: WSDL files, XML schema, namespaces, categorization schemes

03/03/2003

30

15

03/03/2003

UDDI
<tModel>
n <tModel> represents meta-data and

interfaces
<tModel xmlns="urn:uddi-org:api" tModelKey="UUID:AAAAAAAA-AAAAAAAA-AAAA-AAAAAAAAAAAA"> <name>microsoft-com:creditcheck</name> <description xml:lang="en">Check credit limits</description> <overviewDoc> <overviewURL>http://schema.com/creditcheck.wsdl </overviewURL> </overviewDoc> <categoryBag> <keyedReference tModelKey="UUID:CD153257-086A-4237-B336-6BDCBDCC6634" keyName="Consumer credit gathering or reporting services" keyValue="84.14.16.01.00"/> <keyedReference tModelKey="UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4" keyName="types" keyValue="wsdlSpec"/> </categoryBag> </tModel>
03/03/2003 31

UDDI
Providers, Services And Bindings
n Providers n Examples: Accounting Department, Corporate Application Server n Name, Description, Contact Information n Categorization and Identification Information n Services n Examples: Purchase Order services, Payroll services n Name, Description(s) n Categorization Information n Bindings n Description(s), access points, parameters n Examples: Access Point (http://...) for Web Service
03/03/2003 32

16

03/03/2003

UDDI
<bindingTemplate>
n <bindingTemplate> represents data and

implementation details
<bindingTemplate serviceKey="33c3d124-e967-4ab1-8f51d93d95fac91a" bindingKey="48f2bc6b-a6de-4be8-9f2b2342aeafaaac"> <accessPoint URLType="http"> http://localhost/HelloWorld/Service1.asmx </accessPoint> <tModelInstanceDetails> <tModelInstanceInfo tModelKey="uuid:64c756d1-33744e00-ae83-ee12e38fae63/> </tModelInstanceDetails> </bindingTemplate>

03/03/2003

33

UDDI
Important UDDI Features
n Neutral in terms of protocols as a registry, it

can contain pointers to anything n Can search by business, service, Web Service (tModel), binding n Usage of Globally Unique Identifiers (GUIDs) n Specification allows public and private nodes n Delineation between interface and implementation

03/03/2003

34

17

03/03/2003

GXA
Global XML Web Services Architecture
Inter Application Protocols
Reliable Messaging

Discovery
Directory Inspection Description Referral Routing

Eventing

Transactions

Building Block Modules


Security License

SOAP The Internet


TCP/IP
03/03/2003

XML

HTTP/SMTP
35

GXA
New Web Services Specifications
n WS-Inspection n Inspection n WS-Routing n Route messages over protocols n WS-Referral n Dynamic configuration of message routing n WS-Security n Credentials, integrity, confidentiality n WS-License n Signed user credentials
03/03/2003 36

18

03/03/2003

Plan
n Petit rappel sur les services Web n Dvelopper un service Web n En .Net bien sur n Consommer un service Web n Divers

03/03/2003

37

Developing a Web Service


Basics
n Web Service n Implemented in ASP.NET n Similar to Web Forms, but
n n

have a .asmx file extension contains code, w/o UI

n n n n n

Lives in a virtual directory Can have a code-behind ASP.NET provides simple test harness ASP.NET automagically generates WSDL Can use .NET Framework classes and custom assemblies and classes
38

03/03/2003

19

03/03/2003

Developing a Web Service Code and


Syntax
n Codebehind
<%@ WebService Language="c#" Codebehind="MyWebService.cs" Class="FirstWebService.MathService" %>

n Inline (in C#)


<%@ WebService Language=C# Class=MathService %> using System.Web.Services; public class MathService : WebServices { [WebMethod] public int Add(int num1, int num2) { return num1 + num2; } }
03/03/2003 39

Developing a Web Service Demo


n Demo: HelloWorld.asmx n Demo: MathService.asmx

03/03/2003

40

20

03/03/2003

Developing a Web Service Tools


n Notepad n Just create a .asmx file n Visual Studio.NET n Create ASP.NET Web Service project

03/03/2003

41

Plan
n Petit rappel sur les services Web n Dvelopper un service Web n Consommer un service Web n Toujours en .Net n Divers

03/03/2003

42

21

03/03/2003

Consuming Web Services


Overview
n Locate the desired Web Service n UDDI n DISCO n Get detailed description of Web Service n WSDL n Create a proxy that represents the Web

Service
n

Proxy has the same methods/arguments/return values as the Web Service


43

n Application instantiates and uses the proxy as


03/03/2003

if it were a local object

Consuming Web Services


Overview

Web Service Developer Web Server S .asmx Service App

Create with WSDL.exe

Web Application Developer

Web Server C Proxy .cs Web Form .aspx

Service Application

03/03/2003

44

22

03/03/2003

Consuming Web Services


Overview
n Web Services are URL addressable n HTTP request/response n Can request WSDL via URL n Can invoke via: n HTTP-GET n HTTP-POST n HTTP-SOAP

03/03/2003

45

Consuming Web Services Invoking via


HTTP-GET
n HTTP-GET
http://localhost//MathService.asmx/Multiply?a=11&b=11

Result is an XML document

<?xml version="1.0" encoding="utf-8" ?> <int xmlns="http://www.microsoft.com/MathService/">121</int>

03/03/2003

46

23

03/03/2003

Consuming Web Services Invoking via


HTTP-POST
n HTTP-POST
POST /MathService.asmx/Multiply HTTP/1.1 Host: localhost Content-Type: application/x-www-form-urlencoded Content-Length: length a=11&b=11

Result is an XML document

<?xml version="1.0" encoding="utf-8" ?> <int xmlns="http://www.microsoft.com/MathService/">121</int>

03/03/2003

47

Consuming Web Services Invoking:


HTTP-SOAP
n XML grammar for n WebMethod, Method parameter, results n Supports all standard .NET datatypes

and value classes


n

Additionally: classes, structs, datasets

n Class and struct marshalling n Serialization in XML format

03/03/2003

48

24

03/03/2003

Consuming Web Services


Type Marshalling
n Using HTTP-GET or HTTP-POST n Primitive types
n

E.g. int, string, float, double, byte,

n n n

Enum types Arrays of primitives and enums By-value only

03/03/2003

49

Consuming Web Services


Type Marshalling
n Using SOAP n Primitive types n Enum types n Classes and structs n DataSet n XmlNode n Arrays of all of the above n By-value and by-reference are supported

03/03/2003

50

25

03/03/2003

Consuming Web Services


Trying It Out
n Request without method name or parameters n ASP.NET returns a page listing all methods
http://localhost/MathService.asmx

n Click one of the methods and you can test it


http://localhost/MathService.asmx?op=Multiply n

out

Specify parameters and Invoke


n

Only for primitive data types

Sample requests/responses
51

03/03/2003

Consuming Web Services


Trying It Out
n Request with parameter WSDL n Formal WSDL description of Web Service n XML-based grammar n Can be used as input for wsdl.exe
http://localhost/MathService.asmx?WSDL

03/03/2003

52

26

03/03/2003

Consuming Web Services


Creating a Proxy
n Use wsdl.exe to generate a proxy
wsdl http://localhost/MathService.asmx?WSDL n n

Creates MathService.cs Contains MathService class, derived from SoapHttpClientProtocol in the System.Web.Services.Protocols namespace
n

Or HttpGetClientProtocol or HttpPostClientProtocol You can instantiate these classes dynamically

Proxy embeds URL to the Web Service in the 03/03/2003 constructor 53


n

Consuming Web Services


Using Visual Studio.NET
n Use Add Web Reference to search UDDI or

to discover Web Services given a URL n This builds a proxy, and you can start using the Web Service immediately
n

Visual Studio.NET essentially calls disco.exe and wsdl.exe for you

03/03/2003

54

27

03/03/2003

Consuming Web Services


Demos
n Demo: TestServices.sln n Consumes: MathService.asmx n Consumes: DataService.asmx

03/03/2003

55

Plan
n Petit rappel sur les services Web n Dvelopper un service Web n Consommer un service Web n Divers

03/03/2003

56

28

03/03/2003

Miscellaneous
State Management
n Web Services are stateless n Use ASP.NET session state mechanism n What is a session?
n n

Restricted to a logical application Context in which a user communicates to a server Request identification and classification Store data across multiple requests Session events Release of session data

Functionality
n n n n

n
03/03/2003

.NET State Server Process


57

Miscellaneous
Security Model
n Reasons for security n Prevent access to areas of your Web server n Record and store secure relevant user data n Security configuration n Authentication, Authorization, Impersonation
Web Client IIS ASP.NET App .NET OS

n Code Access Security n Are you the code you told me you are?

03/03/2003

58

29

03/03/2003

Miscellaneous
HTTP and Firewalls

U
Client Port 80

DCOM Service Web Service RMI Service

U
Firewall
03/03/2003

59

Miscellaneous
Secure Sockets Layer
Raw HTTP Client
<soap:Body> <AddResult xmlns= ...> <result>28.6</result> </AddResult> </soap:Body>

Web Service

SSL Client
<soap:Body> <AddResult xmlns= ...> <result>28.6</result> </AddResult> </soap:Body>
03/03/2003

Web Service

60

30

03/03/2003

Miscellaneous
Security Model
n Similar to securing a Web site n Clients are computers and businesses n Possible options with IIS n IPSec n Basic n Basic over SSL n Digest n Integrated n Client certificates n Passport?
03/03/2003 61

Miscellaneous
Transactions
n Like ASP.NET Web Forms n COM+ services n COM+ automatic transactions n atomic, consistent, isolated, durable (ACID)
SQL Server Application Web Service COM+ transaction context MSMQ Server

03/03/2003

62

31

03/03/2003

Miscellaneous
Transactions
n [WebMethod(Transaction=

Transaction.Required)] n Transaction modes n Supported n NotSupported n Required n RequiresNew

03/03/2003

63

Miscellaneous
Execution Model
n Synchronous n Like any other call to class methods n Asynchronous n Split the method into two code blocks
n n

BeginMethodName EndMethodName

CLR determines if operation has finished

03/03/2003

64

32

03/03/2003

Miscellaneous
SOAP Toolkit
n An SDK for building Web Services using

Visual Studio 6.0


n n n

Components allowing an ASP page to act as a facade for a COM object Wizard for generating WSDL descriptions from COM servers Client-side engine for dynamically creating an Automation proxy from WSDL

03/03/2003

65

Miscellaneous
SOAP Toolkit
n Available at
http://msdn.microsoft.com/downloads/def ault.asp?URL=/code/sample.asp?url=/msdn -files/027/001/580/msdncompositedoc.xml

n Easily expose COM components as Web

Services through SOAP and schemas n Client infrastructure for Visual Studio n Focused on one way of creating Web Services

03/03/2003

66

33

03/03/2003

Miscellaneous
SOAP Toolkit
n Remote Object Proxy Engine (ROPE) n A set of COM components you can use to build SOAP messaging into your application n Client-side infrastructure to build Web Services n Server side infrastructure n Greatly simplifies SOAP programming n You can use SOAP without using ROPE

03/03/2003

67

Pour aller plus loin


n Web Services Essentials
http://msdn.microsoft.com/library/default.asp?URL= /library/techart/webservicesessentials.htm

n SOAP
http://msdn.microsoft.com/soap

n SOAP Specification
http://www.w3.org/TR/SOAP/

n Don Box on SOAP


http://msdn.microsoft.com/msdnmag/issues/0300/soap /soap.asp

n Introduction to SOAP
http://www.w3.org/2000/xp/Group/Admin/minutes-oct1100 /soap-xp-wg_files/frame.htm

03/03/2003

68

34

03/03/2003

Pour aller plus loin


n WSDL Specification
http://www.w3.org/TR/wsdl

n A Quick Introduction to WSDL


http://msdn.microsoft.com/library/default.asp?url=/library /enus/soap/htm/soap_overview_72b0.asp?frame=true

n UDDI
http://www.uddi.org http://uddi.microsoft.com

n HailStorm
http://www.microsoft.com/net/hailstorm.asp

n Building Web Services with SOAP and ASP.NET


http://msdn.microsoft.com/msdnmag/issues/01/02/WebComp /webcomp.asp

03/03/2003

69

Pour aller plus loin


n GXA Web Services Specifications
http://msdn.microsoft.com/library/default.asp?url=/library/enus/dnsrvspec/html/wsspecsover.asp?frame=true

03/03/2003

70

35

03/03/2003

Programmer le Web
Code ct client et code ct serveur
Ct client Ct serveur n Code rcupr depuis un n Pourquoi du code ct serveur ? serveur Web et excut dans le n Accessibilit contexte dun navigateur pour n On peut accder aux tre excut sur le client informations depuis nimporte
n Pourquoi du code ct client ? n Permet la rpartition de la charge entre le client et le serveur n Crer des IHM plus sophistiques quen HTML n Animations n Validation des donnes par lutilisateur
n

quel browser, terminaux, nimporte quand, nimporte ou Il nest pas ncessaire de dployer le code applicatif Facilit pour faire voluer le code Le code nest pas diffus Uniquement les utilisateurs authentifi peuvent effectuer certaines actions Architecture 3 parties permettent la monte en charge
71

Administration
n n

Scurit
n n

Extensibilit
n

03/03/2003

Programmer le Web
Technologies client
n DHTML/JavaScript n COM n Contrle ActiveX n Composants COM n Remote Data Services (RDS) n Java n Plug-ins n Helpers n Remote Scripting
03/03/2003 72

36

03/03/2003

Programmer le Web
Dynamic HTML (DHTML)
n Encapsuler un script dans une page HTML n Gnralement crit en JavaScript (ECMAScript,

JScript) pour des raisons de portabilit


n n

Internet Explorer supporte aussi VBScript et dautres langages de script Mozilla est extensible par plug-in

n Chaque lment HTML devient un objet qui peut tre

associ des vnements (i.e. onClick) n Les scripts fournissent du code qui sont excuter lors de la production dvnement de la part du navigateur
03/03/2003 73

Programmer le Web
DHTML
n Le DOM (Document Object Model) de DHTML
window

event

navigator

history

document

location

screen

frames

all

location

children

forms

selection

body

links

text password file

radio checkbox

button submit reset

textarea

select option

03/03/2003

74

37

03/03/2003

Programmer le Web
ActiveX
n Based on COM n Native only to Internet Explorer n Supported in Netscape with a plug-in n Good when you know your users (e.g.

intranet) or can specify which browser to use n Small, efficient code

03/03/2003

75

Programmer le Web
Java Applets
n Bas sur du bytecode Java n Portabilit garanti par les JVM : n Write once, run anywhere n Sr : le code sexcute dans un bac sable

(sandbox) n Compatibilit et performance permettent un usage intensif et une large diffusion

03/03/2003

76

38

03/03/2003

Programmer le Web
Technologies server
n Common Gateway Interface (CGI) n Internet Server API (ISAPI) n Netscape Server API (NSAPI) n Active Server Pages (ASP) n Java Server Pages (JSP) n Personal Home Page (PHP) n Cold Fusion (CFM) n ASP.NET

03/03/2003

77

Programmer le Web
Active Server Pages (ASP)
n Technologie qui permet de

crer aisement des applications cots serveurs


n ASP pages sont crites dans

HTTP request
(form data, HTTP header data)

HTTP response
HTML, XML

un langage de script, gnralement VBScript ou JScript n Une page ASP contient une squence HTML statique dans laquelle est inclue le script excut par le serveur n Les scripts ASP permettent laccs et la modification de donnes (prsentes dans des BD)
03/03/2003

ASP page
(static HTML, server-side logic)
78

39

You might also like