Presentation is loading. Please wait.

Presentation is loading. Please wait.

CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)

Similar presentations


Presentation on theme: "CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)"— Presentation transcript:

1 CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)

2 The Need for Programming Languages Web pages with just HTML statements are static pages Pages that contain programming statements allow changes and they are called dynamic pages Programming languages can also be used to update databases and communicate with other systems

3 Web-based Programming Environment Common Gateway Interface (CGI) A protocol that allows the operating system to interact with the Web server Practical extraction and reporting language (Perl) First popular language for Web servers Java Server Pages (JSP) Language similar to Java

4 Web-based Programming Environment Active Server Pages (ASP) Script-based environment available on all IIS Web servers ASP.NET Compiled programs operate under.NET Framework PHP Hypertext Protocol (PHP) Popular language available on most platforms The structure of JSP, ASP, and PHP are similar

5 Using Forms The following HTML produces a form When the submit button is pressed, the data in the form is sent to the file designated as filename

6 Using ASP to Process a Form The following file displays the information from the form Notice how the items such as "first" match the text names on the form ASP uses for opening and closing tags is one way to retrieve data from the form

7 ASP.NET ASP.NET is one of the many languages available under the.NET Framework that can be used for the Web The programming model of ASP.NET is superior to that of ASP Has modules for data validation that differentiates between browsers Producing sophisticated reports is much easier

8 ASP.NET Program that Combines Form and Output

9 Perl Script to Display Contents of a Form Notice how $cgi->param("first") is similar to ASP’s request("first")

10 Programming with Databases Microsoft uses two methods to bridge the gap between programming languages and databases Open Database Connectivity (ODBC) The original standard Object Linking and Embedding Database (OLEDB) Current standard which is faster and more flexible Linux often uses Java Database Connectivity (JDBC) You can also have a direct connection between the language (such as PHP) and the database (such as MySQL)

11 Producing a Report Connect to the database Execute a SQL select statement to retrieve data from a table Put the data in a recordset Also known as a resultset, depending on the environment Loop through the recordset and display the contents

12 A Report in ASP

13 Using Data Source Names (DSNs) DSNs are connections to databases that an administrator creates on the server They encapsulate the information on the previous slide concerning the connection information The Data Sources (ODBC) wizard is in the Control Panel Once it is created, you can create a connection with Conn.open "DSN=humanresources;uid=sa"

14 Programming with ASP.NET Although there is a connection and you send it a SQL select statement, the DataGrid component creates the report

15 Programming with PHP Note the similarity between ASP and PHP, and how different they are from ASP.NET Warning: Codes poorly written

16 Installing PHP in Apache You may insert the following lines into your Apache httpd.conf configuration file to load the PHP module for Apache 2.2: LoadModule php5_module "C:/php/php5apache2_2.dll" AddHandler application/x-httpd-php.php PHPIniDir "C:/php"

17 Server-Side Includes (SSI) SSI provide a means to add dynamic content to existing HTML documents. SSI directives have the following syntax:


Download ppt "CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)"

Similar presentations


Ads by Google