Presentation is loading. Please wait.

Presentation is loading. Please wait.

Client-side & Server-side Scripting ©Richard L. Goldman August 5, 2003 Requires PowerPoint 2002 or later for full functionality.

Similar presentations


Presentation on theme: "Client-side & Server-side Scripting ©Richard L. Goldman August 5, 2003 Requires PowerPoint 2002 or later for full functionality."— Presentation transcript:

1

2 Client-side & Server-side Scripting ©Richard L. Goldman August 5, 2003 Requires PowerPoint 2002 or later for full functionality.

3 © Richard L. Goldman 2 Simple HTML Web Page Simple HTML files are interpreted by the client’s Web browser, formatted and displayed as a static Web page.

4 © Richard L. Goldman 3 Web ServerClient Computer Simple Web Page Browser Software (IE) Web Server Software (IIS) Web Site Web Page (.htm) Web Page (.htm) Web Page (.htm) Web Page (.htm) Web page requested Web server sends Web page to client Browser renders Web page

5 © Richard L. Goldman 4 Scripts Scripts may be included in a Web page to create a dynamic Web page which allows user interactivity. Scripts can be written in different languages: JavaScript (IE & Netscape – this is not Java) JScript (IE only - Microsoft version of JavaScript) VBScript or VBS (IE only - Visual Basic) ECMAScript (IE & Netscape - Cross-platform language) (European Computer Manufacturers Association) Each scripting language requires its own specific interpreter (engine) to run the script.

6 © Richard L. Goldman 5 Client-side Script Tags Scripts that run on the client’s computer are called Client-side scripts. Use the... tags to include the script in a HTML document. Use the LANGUAGE attribute to identify the scripting language that you are using......................................................................... JavaScript is the default language on most browsers and will be run if a language is not specified.

7 © Richard L. Goldman 6 Inserting a Script Scripts can be placed in either the Head or the Body. Client-side scripts placed at the end of the body will allow the page to be displayed before the script is run. Mr. Goldman Welcome Sample Hello ”; Good By ”;

8 © Richard L. Goldman 7 Web ServerClient Computer Client-side JavaScript Browser Software (IE) Web Server Software (IIS) Web Site Web page requested Web Page (.htm) Web Page (.htm) JavaScript Web Page (.htm) Web Page (.htm) JavaScript Server sends Web page (with script) to client JavaScript Engine

9 © Richard L. Goldman 8 Web ServerClient Computer Client-side JavaScript Browser Software (IE) Web Server Software (IIS) Web Site Browser renders Web page Web Page (.htm) Web Page (.htm) JavaScript Web Page (.htm) Web Page (.htm) JavaScript Engine JavaScript JavaScript engine processes the script

10 © Richard L. Goldman 9 External Client-side Scripts Common scripts that are used by many different web pages may be placed in an external file. External JavaScript files must be saved with a.js extension. External files are called with the source (src) attribute of the SCRIPT tag.

11 © Richard L. Goldman 10 Web ServerClient Computer Client-side External JavaScript Browser Software (IE) Web Server Software (IIS) Web Site Web page requested Web Page (.htm) Web Page (.htm) Script Call Web Page (.htm) Web Page (.htm) Script Call Server sends Web page (with script call) to client ExtScript (.js) ExtScript (.js) JavaScript Engine

12 © Richard L. Goldman 11 Web ServerClient Computer Client-side External JavaScript Browser Software (IE) Web Server Software (IIS) Web Site Browser renders Web page Browser calls external script Web Page (.htm) Web Page (.htm) Script Call Web Page (.htm) Web Page (.htm) Script call ExtScript (.js) ExtScript (.js) JavaScript Engine Script call External script is sent to client- side JavaScript engine ExtScript (.js) ExtScript (.js)

13 © Richard L. Goldman 12 Client-side Script Engines The client computer can have multiple types of script engines. The client computer is capable of running different types of scripts concurrently.

14 © Richard L. Goldman 13 Web ServerClient Computer Client Side Script Engines Browser Software (IE) JavaScript Engine VBScript Engine JScript Engine Web Server Software (IIS) ECMAScript Engine Web Page (.htm) Web Page (.htm) Web Site Web Page (.htm) Web Page (.htm)

15 © Richard L. Goldman 14 Server-side Script Software ManufacturerWeb ServerServer-side Language/File Extension MicrosoftInternet Information Server (IIS)Active Server Page /.asp Linux/UnixApachePHP: Hypertext Processor /.php AllaireCold FusionCold Fusion Markup language /.cfm Server-side scripts are designed to be run on a Web server. Different manufactures have created different types of software to implement server-side technology – there is no standard. The file extension indicates that they are to be processed by the server and what software should be used.

16 © Richard L. Goldman 15 Web ServerClient Computer Server-side VBScript (IIS & ASP) Browser Software (IE) Web Server Software (IIS) ASP Engine (asp.dll) VBScript Engine Web Site ASP page requested Active Server Page (.asp) Active Server Page (.asp) VBScript Active Server Page (.asp) Active Server Page (.asp) VBScript Web server sends ASP page to ASP Engine

17 © Richard L. Goldman 16 Web ServerClient Computer Server-side VBScript Browser Software (IE) Web Server Software (IIS) ASP Engine (asp.dll) VBScript Engine Web Site Active Server Page (.asp) Active Server Page (.asp) VBScript Active Server Page (.asp) Active Server Page (.asp) Active Server Page (.asp) Active Server Page (.asp) VBScript Browser renders Web page ASP page (less server- side script) is sent to client VBScript engine processes the script

18 © Richard L. Goldman 17 Web ServerClient Computer Server-side VBScript Browser Software (IE) Web Server Software (IIS) ASP Engine (asp.dll) VBScript Engine Web Site Active Server Page (.asp) Active Server Page (.asp) VBScript Active Server Page (.asp) Active Server Page (.asp) Active Server Page (.asp) Active Server Page (.asp) VBScript Server-side scripts allow for interaction between client and server.

19 © Richard L. Goldman 18 External Server-side Scripts Know as – Server Side Include (SSI) files. Common scripts that are used by many different server- side ASP pages may be placed in a SSI file. SSI files are saved with an.inc extension (or.asp). SSI files are called from an ASP file with the include keyword. SSI files are located and identified with the file attribute.

20 © Richard L. Goldman 19 Web ServerClient Computer Server Side VBScript Browser Software (IE) Web Server Software (IIS) Web Page (.htm) Web Page (.htm) ASP Engine (asp.dll) VBScript Engine Web Site Web Page (.htm) Web Page (.htm) SSI file (.inc) SSI file (.inc) ASP Page (.asp) ASP Page (.asp) Script Call ASP Page (.asp) ASP Page (.asp) Script Call ASP page requested Web server sends ASP page to ASP Engine

21 © Richard L. Goldman 20 Server-side Scripts With server-side scripts, the script engine only needs to be on the Web server – a client-side script engine in not required. Server-side scripts are never sent to the client computer. The client can not access or view the script. Client-side and server-side scripts can be used concurrently. Server-side scripts can be written in: JavaScript JScript VBScript (Not ECMAScript)

22 © Richard L. Goldman 21 Web ServerClient Computer Client-side & Server-side Script Engines Browser Software (IE) JavaScript Engine VBScript Engine JScript Engine Web Server Software (IIS) ECMAScript Engine ASP Engine (asp.dll) JavaScript Engine VBScript Engine JScript Engine Web Site Client-side script engines Server-side script engines Web Page (.htm) Web Page (.htm) Web Page (.htm) Web Page (.htm) Script Call CS Script ASP Page (.asp) ASP Page (.asp) SS Script Script Call

23 © Richard L. Goldman 22 Web ServerClient Computer Server Side VBScript Browser Software (IE) JavaScript Engine VBScript Engine JScript Engine Web Server Software (IIS) ECMAScript Engine Web Page (.htm) Web Page (.htm) ASP Engine (asp.dll) JavaScript Engine VBScript Engine JScript Engine Request Response Server Session Application Web Site Web Page (.htm) Web Page (.htm) Script Call CS Script ASP Page (.asp) ASP Page (.asp) SS Script ExtScript (.js) ExtScript (.js) SSI file (.inc) SSI file (.inc) Script Call

24 © Richard L. Goldman 23 Web ServerClient Computer Server Side VBScript Browser Software (IE) JavaScript Engine VBScript Engine JScript Engine Web Server Software (IIS) ECMAScript Engine Web Page (.htm) Web Page (.htm) ASP Engine (asp.dll) JavaScript Engine VBScript Engine JScript Engine Request Response Server Session Application Web Site Web Page (.htm) Web Page (.htm) Script Call CS Script ASP Page (.asp) ASP Page (.asp) SS Script ExtScript (.js) ExtScript (.js) SSI file (.inc) SSI file (.inc) Script Call

25 © Richard L. Goldman 24 Web ServerClient Computer Server Side VBScript Browser Software (IE) JavaScript Engine VBScript Engine JScript Engine Web Server Software (IIS) ECMAScript Engine Web Page (.htm) Web Page (.htm) ASP Engine (asp.dll) JavaScript Engine VBScript Engine JScript Engine Request Response Server Session Application Web Site Web Page (.htm) Web Page (.htm) Script Call CS Script ASP Page (.asp) ASP Page (.asp) SS Script ExtScript (.js) ExtScript (.js) SSI file (.inc) SSI file (.inc) Script Call

26 © Richard L. Goldman 25 Web ServerClient Computer Server Side VBScript Browser Software (IE) JavaScript Engine VBScript Engine JScript Engine Web Server Software (IIS) Active Server Page (.asp) Active Server Page (.asp) ECMAScript Engine Web Page (.htm) Web Page (.htm) Server Side Include file (.inc) Server Side Include file (.inc) ASP Engine (asp.dll) JavaScript Engine VBScript Engine JScript Engine Request Response Server Session Application Web Site Web Page (.htm) Web Page (.htm)

27 © Richard L. Goldman 26 Web ServerClient Computer Server Side VBScript Browser Software (IE) JavaScript Engine VBScript Engine JScript Engine Web Server Software (IIS) Active Server Page (.asp) Active Server Page (.asp) ECMAScript Engine Web Page (.htm) Web Page (.htm) Server Side Include file (.inc) Server Side Include file (.inc) ASP Engine (asp.dll) JavaScript Engine VBScript Engine JScript Engine Request Response Server Session Application Web Site Web Page (.htm) Web Page (.htm)


Download ppt "Client-side & Server-side Scripting ©Richard L. Goldman August 5, 2003 Requires PowerPoint 2002 or later for full functionality."

Similar presentations


Ads by Google