web engineering
play

Web Engineering 1. Introduction 2. Client Side Programming Prof. - PowerPoint PPT Presentation

Content Web Engineering 1. Introduction 2. Client Side Programming Prof. Dr. Dr. h.c. mult. Gerhard Krger, Albrecht Schmidt 3. Server Side Programming Universitt Karlsruhe Fakultt fr Informatik Institut fr Telematik Wintersemester


  1. Content Web Engineering 1. Introduction 2. Client Side Programming Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt 3. Server Side Programming Universität Karlsruhe Fakultät für Informatik Institut für Telematik Wintersemester 2000/2001 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 1 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 3 Technology Overview Server � content (e.g. HTML-pages) that contains statements that can be replaced or executed: � SSI, XSSI Web Engineering � server side scripting (Livewire, ASP, PHP, JSP, ...) � programs that create content � additional process: CGI Chapter 6: Programming and Implementation � In the context of the servers: Fast-CGI, Servlets, ... � extensions of web servers � NSAPI, IISAPI, Apache-Modules, ... � gateways and front-ends for databases � application server � dedicated/specific servers (see chapter 4) Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 2 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 4

  2. Technology Statistics- Apache Server Modules II Technology Statistics - Server January January December December Growth Module 2001 2001 2000 2000 % Count % Count % PHP 541528 37.06% 511155 36.43% 1.74% FrontPage 281874 19.29% 271677 19.36% -0.36% perl 170663 11.68% 161527 11.51% 1.46% mod_ssl 167937 11.49% 154005 10.98% 4.72% OpenSSL 153708 10.52% 139713 9.96% 5.65% ApacheJSer 59452 4.07% 55724 3.97% 2.46% v Rewrit 19197 1.31% 17201 1.23% 7.17% mod_fastcgi 15440 1.06% 13541 0.97% 9.50% DAV 8635 0.59% 7643 0.54% 8.50% source: http://www.securityspace.com/s_survey/data/index.html Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 5 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 7 Server Dec 1999 Dec 1999 Nov 1999 Nov 1999 Change Technology Penetration Count % Count % % Apache 1.3 748,251 39.18% 717,085 37.78% +1.96% IIS 4.0 433,971 22.73% 425,369 22.41% +0.52% Apache 1.2 239,911 12.56% 258,279 13.61% -1.23% Percentage IIS 3.0 61,174 3.20% 65,155 3.43% -0.42% Location Technology 2001 1999 Module Dec 1999 Dec 1999 Nov 1999 Nov 1999 Change Count % Count % % Client JavaScript 37,45% 22.65% Technology PHP 252,822 23.85% 245,153 23.34% +2.26% FrontPage 207,711 19.59% 209,213 19.92% -1.55% Client Frames 31,21% 22.30% mod_perl 71,089 6.70% 67,886 6.46% +3.84% Statistics mod_ssl 70,190 6.62% 70,521 6.71% -1.30% Client Java 5,17% 4.24% Ben-SSL 25,214 2.37% 27,057 2.57% -7.59% - Apache mod_frontpage 22,899 2.16% 22,035 2.09% +3.05% Client Style Sheets 12,62% N.N mod_fastcgi 20,863 1.96% 20,595 1.96% +0.50% ApacheJServ 16,195 1.52% 14,118 1.34% +13.75% Server Server Active Server Pages N.N 9.74% rus 13,857 1.30% 13,871 1.32% -0.94% AuthMySQL 13,495 1.27% 13,646 1.29% -1.93% Modules mod_czech 3,166 0.29% 3,237 0.30% -3.01% Server Cold Fusion N.N 3.25% mod_oas 737 0.06% 690 0.06% +3.34% mod_macro 578 0.05% 604 0.05% +5.92% mod_throttle 313 0.02% 387 0.03% -19.80% AuthPostgreSQL 250 0.02% 385 0.03% -35.61% mod_jserv 124 0.01% 132 0.01% -6.85% source: http://www.securityspace.com/s_survey/data/man.200101/techpen.html mod_traffic 54 0.00% 54 0.00% -0.01% Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 6 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 8

  3. SSI - Directives (Excerpt) Technology Statistics Usage of PHP � echo var � puts in the value of environment variables � include file � includes the content from a file � exec cmd � executes a command and includes the output � flastmod file, fsize file � puts in the date of the last change, size of a file Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide 9 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide11 SSI - Examples I Server Side Include (SSI) � echo var � HTML page is parsed by the server before it is sent to <HTML><HEAD><TITLE>SSI Echo Sample</TITLE></HEAD> the client <BODY> Welcome to my Server: <!--#echo var=“SERVER_NAME”--> <BR> Local Time here is: <!--#echo var=“DATE_LOCAL”--> <BR> � defined strings/expressions are dynamically replaced You are connected from: <!--#echo var=“REMOTE_HOST”--> <BR> And you requested the following file: <!--#echo var=“DOCUMENT_NAME”--> </BODY> </HTML> � transparent for the client � only HTML is provided by the server � include file � virtual: relative to server root directory � used for � file: from the current directory � navigational elements <HTML><HEAD><TITLE>SSI Include Sample</TITLE></HEAD> � header <BODY> � footer Here is our Navigation Header<BR> <!--#include virtual=“/header.html” --> Here is the Text of the page … <BR> � server configuration Here is our Footer<BR> <!--#include file=“footer.html”--> � e.g. Apache: AddType text/x-server-parsed-html .shtml </BODY> </HTML> Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide10 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide12

  4. SSI - Examples II Apache XSSI – (2) � Exec cmd (attention - security!) � Flow Control Elements � <!--#if expr="test_condition" --> <HTML><HEAD><TITLE>SSI Exec Sample</TITLE></HEAD> <BODY> � <!--#elif expr="test_condition" --> call a cgi file: � <!--#else --> <!--#exec cgi=“/scripts/add.pl?FirstName+LastName” --> <BR> � <!--#endif --> call a programm file: <!--#exec cmd=“/bin/finger $REMOTE_USER@REMOTE_HOST” --> <BR> </BODY> </HTML> � test_condition � string � flastmod file, fsize file � string1 = string2 <HTML><HEAD><TITLE>SSI flastmod Sample</TITLE></HEAD> � string1 != string2 <BODY> � ( test_condition ) The file test.pdf was last modified at � ! test_condition <!--#flastmod file=“test.pdf”--> � test_condition1 && test_condition2 the file size is � test_condition1 <!--#fsize file=“test.pdf”--> || test_condition2 </BODY> </HTML> � <!--#if expr="$a = test1 && $b = test2" --> � <!--#if expr="($a = test1) && ($b = test2)" --> Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide13 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide15 Apache XSSI (1) Apache XSSI – example (1) � printenv <!--#set var="category" value="help" -- > � function to print all values of variables that are set <!--#set var="request" value="${REMOTE_HOST}_${REQUEST_METHOD}" --> � useful for debugging � example: <!--#printenv --> <H2>Print All Variables</h2> <!--#printenv --> � set <H2>XSSI Control Structure</h2> � set a variable (name and value) <!--#if expr="\"$DOCUMENT_URI\" = \"/lehre/webe/beispiele/ xssi.html\"" --> � <!--#set var="category" value="help" --> The File is called xssi.html � <!--#elif expr="\"$DOCUMENT_URI\" = \"/lehre/webe/beispiele/ssi.html\""--> <!--#set var="gmt" value="${REMOTE_HOST}_${DATE_GMT}" --> The File is called ssi.html <!--#else --> � include variables (for the current document) I dont know the file! � DATE_GMT <!--#endif --> � DATE_LOCAL � DOCUMENT_NAME � DOCUMENT_URI � LAST_MODIFIED http://www.teco.edu/lehre/webe/beispiele/xssi.html Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide14 Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS99/00 Chapter5 - Slide16

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend