1 / 11

CSI315

Learn about the middleware layer in web development, its role in processing incoming requests, and how it connects to web servers and resources. Explore server-side and client-side scripting, including technologies like ASP, CGI, and PHP.

tweed
Télécharger la présentation

CSI315

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. CSI315 Web Development Technologies Continued

  2. The Middleware Layer • The Middleware Layer accepts incoming requests and processes them, using the resources provided by the web server, the machine that the web server runs on, or by the network of servers and resources that the web server is connected to. • The web server is the entry point to the Middleware Layer. • Server software is created to 'serve' web pages and web sites. Basically the server computer has a bunch of web sites loaded on it and it just waits for people (web browsers) to request or ask for a particular page. When the browser requests a page the server sends it out

  3. Web Servers • Respond to clients requests • Communicate with Clients via HTTP • a web browser opens a connection to a web server based on the URI entered by the user The URI specifies the protocol to use • Has at its disposals a whole world of resources (data stores, applications, business objects, operating system resources, authentication services) • How can a web server get to all those resources? - Server Side Scripting

  4. Scripting • Scripting is a programming tool allowing every day language commands to create graphics, messages, or animation • Scripting languages or( script languages) are computer programming languages designed for "scripting" the operation of a computer. • Designed to provide programming capabilities on the web

  5. Client-Side Scripting • Client-side scripting generally refers to the class of computer programs on the web that are executed client-side, by the user's web browser, instead of web server • Client-side scripts (code) are often embedded within an HTMLdocument, but they may also be contained in a separate file, which is referenced by the document (or documents) that use it. • Advantages is that all processing is done on the computer of the client thus off loading the web server. • Client-side Scripting languages include JavaScript, VBScript

  6. Server Side Scripting • A server side scripting uses information sent by clients, information stored by on the server, server' memory, and information from the internet to dynamically create web pages. Technologies include • ASP (Active Server Pages) • CGI (Common gateway Interface) • COM Objects(Active X) • PHP (Personal Home Page) • Perl (Program Extraction and Reporting Language) • Python • Distributed Resources DCOM, CORBA, RMI

  7. ASP (Active Server Pages) • A Server –Side technology that allows Web developers to combine scripts and HTML code to create dynamic Web content and Web-based applications. • Scripts written in JScript or VBScript are embedded into HTML pages and perform some task before the web page is delivered to the end user. • ASP allows web pages to include dynamic content, often pulled from a database. With ASP technology, a Web page on being loaded into a user's browser connects with the website's database of latest facts and loads those details from the database • An ASP page is often created "on the fly" by the web server so that the information contained upon it can be specifically tailored to suit the needs of the end-user.

  8. Example of ASP Code A time stamp is added to the an ASP page <%@ Language=VBScript %> <html> <head> <title>Example 3</title> </head> <body> <% FirstVar = "Hello world!" %> The time is: <%=time%> <BR> <%FOR i=1 TO 10%> <%=FirstVar%> <%NEXT%> </body> </html>

  9. CGI (Common Gateway Interface)   • The Common Gateway Interface (CGI) is a standard for interfacing external applications with information servers, such as HTTP or Web servers. • A plain HTML document that the Web daemon retrieves is static, which means it exists in a constant state: a text file that doesn't change. A CGI program, on the other hand, is executed in real-time, so that it can output dynamic information • CGI allows users to access your Web site and run a program on your machine that performs a specified task. • Since CGI program is executable, it is basically the equivalent of letting the world run a program on your system, • A CGI program can be written in any language that allows it to be executed on the system, such as: C/C++ ,Fortran, PERL, Visual Basic

  10. Example of a CGI Script/Perl CGI script, accessing time/date resources of the operating system it runs on #!/usr/local/bin/perl use Time::localtime; print "Content-type:text/html\n\n"; my $time = localtime; print "Today is: " . ($time->year() + 1900) . "/" . $time->mon() . "/" . $time->mday();

More Related