1 / 29

Architecture Web

Architecture Web. Accès aux données. Développement spécifique Conserver l'architecture classique en y insérant un système propriétaire SapphireWeb, ColdFusion, WebObjects Adapter le serveur HTTP ISAPI(ASP), NSAPI (LiceWire), Modules Apache Adapter le serveur de données Oracle Web Server.

wind
Télécharger la présentation

Architecture Web

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Architecture Web

  2. Accès aux données • Développement spécifique • Conserver l'architecture classique en y insérant un système propriétaire • SapphireWeb, ColdFusion, WebObjects • Adapter le serveur HTTP • ISAPI(ASP), NSAPI (LiceWire), Modules Apache • Adapter le serveur de données • Oracle Web Server

  3. Approche Simple : CGI

  4. Approche Simple : Exemple set heading off select 'Liste des laboratoires' from dual / set heading on select * from laboratoires / exit #!/usr/bin/ksh echo Content-Type: text/html echo export ORACLE_HOME=/oracle export ORACLE_SID=INSA echo "<PRE>" /oracle/bin/sqlplus -s bcb/bcb @/home/demo/bidon.sql echo "</PRE>"

  5. Approche Simple Langage • Accès aux bases de données et Interrogation • Analyse des résultats • Présentation sous une forme compatible HTML • Approche par les scripts / langages Compilés

  6. Exemple Simple PERL #!/usr/local/bin/perl # ****************** Accès à la Base use DBI; $stat_size_indice = 7; $longueur_nom_medicament = 9; $MaxRecherche=20; my($drh) = DBI->install_driver('Oracle') || die "Can't install driver\n"; $dbh = $drh->connect('INSA', 'wwwapp', 'alix0') || die "Can't connect\n"; my $cursor = $dbh->prepare(<<"REQUETE" select tmed_cip, tmed_libelle, tgal_pluriel from t_medicament, t_forme_galenique where (rownum <= $MaxRecherche and t_medicament.tgal_id=t_forme_galenique.tgal_id) order by tmed_libelle REQUETE ) || die "Can't prepare\n"; $cursor->execute() || die "Can't execute\n";

  7. Exemple suite #Formatage de la réponse print "Content-type: text/html\n\n" ; print "<HTML><BODY><TABLE BORDER=1 CELLSPACING=1 CELLPADDING=0><TR>"; $nb_medicaments_dans_ligne = 0; while ( ($cip_medicament, $nom_medicament, $forme_galenique) = $cursor->fetchrow()) { $nom_medicament = substr( $nom_medicament, 0, $longueur_nom_medicament); if (($nb_medicaments_dans_ligne)++ == 5) { print "</TR><TR>"; $nb_medicaments_dans_ligne = 1; } print "<TD>"; chop ($forme_galenique); $nom_medicament_avec_plus = $nom_medicament; $nom_medicament_avec_plus =~ s/ /\+/g; print "<A HREF=\"descmedic.cgi?$nom_medicament_avec_plus=$cip_medicament\"</A>"; print "$nom_medicament\n"; print "</TD>"; } print "</TR></TABLE></HTML>";

  8. Approche Oracle • Oracle Web Server (=>OWApplicationS V3) • Serveur Standard : Web Listener • CGI 'like' : Web Request Broker (WRB) • Toolkit : Ensemble de procédures cataloguées • HTP : HyperText Procedures • HTF : HyperText Functions • htp.print(htf.italic('coucou')); • OWA_UTIL : utilitaires • owa_util.tableprint • OWA : procédures internes3

  9. Architecture OWS

  10. OWS Exemple 1 create or replace procedure afftab(nom_table in varchar2) is x boolean; begin x:=owa_util.tableprint(nom_table, 'BORDER'); end; / <html><body> <form METHOD="POST" ACTION="http://lisiaix0/owa/afftab> Nom de la table <INPUT NAME="nom_table" TYPE="TEXT" VALUE=""> <INPUT TYPE="SUBMIT" VALUE="Afficher"> </form></body></html>

  11. OWS Exemple 2 create or replace procedure listtables is cursor c_tables is select table_name from user_tables; begin htp.htmlopen; htp.headopen; htp.htitle('Liste des tables'); htp.headclose; htp.bodyclose; for enreg in c_tables loop htp.print (enreg.table_name); htp.br; end loop htp.bodyclose; htp.htmlclose; end; /

  12. Approche Microsoft "Interface entre Web et bases de données sous Windows NT" A.Homer, Darren Gill, S.JakabEyrolles 1998

  13. Approche IDC

  14. Exemple demo.idc DataSource: INSA UserName : wwwapp Passwor d : ????? Template : listeLabo.htx SQLStatement : +SELECT * from laboratoires listLabo.htx <html><body> <%BeginDetail%> Le nom du labo est: <%NOM_DU_LABORATOIRE%><BR> <%EndDetail%> </body>

  15. OLEISAPI

  16. Exemple Serveur OLE : toto.dll Public Sub ReturnBonjour (strValuePairsIn As String, strHTMLResponse As String) strHTMLResponse ="Content-Type: text/html" & vbCrLF & "Bonjour"; End Sub Public Sub main() End Sub http://serveurNT/utilisat/OLEISAPI.dll/toto.ReturnBonjour

  17. Netscape LiveWire <HTLM><BODY><SERVER> if (database.connected()) { database.beginTransaction(); qs="SELECT NOM_LABORATOIRE from laboratoires"; results=database.cursor(qs); while(result.next()) { write("<LI>results.NOM_LABORATOIRE")> } results.close(); database.commitTransaction(); }</SERVER></HTML>

  18. Cold Fusion <HTML> <CFQUERY NAME="Resultats" DATASOURCE="INSA"> SELECT NOM_LABORATOIRE from laboratoires </CFQUERY> <CFTABLE QUERY="Resultats"> <CFCOLS WIDTH="30" TEXT="<LI> #NOM_LABORATOIRE"> </CFTABLE>

  19. Sapphire Web

  20. Web Objects (Next)

  21. Quelle approche choisir ?

  22. Architectures Web • Web de consultation • Documentation • Piloté par l’utilisateur • Internet • Web Applicatif • Applications • Piloté par l’application serveur • Intranet

  23. Programmation • Langages : • Compilés : C, C++ ... • Interprétés : Javascript, Perl, TCL, Python ... • API et Serveurs Spécialisé • NS_API, MS_ API, LiveWire, HyperWave • Langages de balises • ColdFusion, WebObject • PHP/FI • Outils • Sapphire Web • LiveWire

  24. Execution de code • Clients • Plug-ins • Scripts Documentaires • Applets • Serveur • CGI • shtml • Serveur API • Servlets

  25. Sur le client • Langages standards : Java, Python, Tcl • Langages spécifiques : Javascript, Vbscript, DHML • Gestion des interaction avec utilisateurs • + Réduire les échanges sur le réseau (information, contrôle, cache, action sur les éléments du document) • - Code interprété / Machine Virtuelle • - Vitesse du client • ==> Compatibilité/Portage • Write Once, Run Everywhere

  26. Sur le serveur • Langages standards : C, C++, Java, Tcl, Python, Perl • Langages spécifiques : LiveWire, WebObject, Cold Fusion • Gestion des interactions : • Applications complètes • Traitement de chaînes • Accès au réseau • Flux de données • ! gestion des sessions

  27. Architectures 3 tiers

  28. Serveur Transactionnel

  29. Transactions sur le Web

More Related