1 / 21

ITD 3194 Web Application Development

ITD 3194 Web Application Development. Chapter 4: Web Programming Language. Introduction to Web Programming. Web programming is used to build: web pages web sites web applications Do you know what is the difference between these three??. Web Page.

norton
Download Presentation

ITD 3194 Web Application Development

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. ITD 3194Web Application Development Chapter 4: Web Programming Language

  2. Introduction to Web Programming Web programming is used to build: • web pages • web sites • web applications Do you know what is the difference between these three??

  3. Web Page A document containing text and graphics created with HTML that is part of a group of hypertext documents or resources that can be accessed through a web browser on the internet.

  4. Web Site A collection of related web pages found at a single address. A URL serves as the top-level address of a Web site and points to that Web site's home page. That page serves as a reference point, containing pointers to additional HTML pages or links to other Web sites.

  5. Web Application A web application is a set of web pages that are generated in response to user requests. The Internet has many different types of web applications, such as - search engines - online stores - auctions - news sites

  6. Brief History of PHP PHP (PHP: Hypertext Preprocessor) was created by Rasmus Lerdorf in 1994. It was initially developed for HTTP usage logging and server-side form generation in Unix. PHP 2 (1995) transformed the language into a Server-side embedded scripting language. Added database support, file uploads, variables, arrays, recursive functions, conditionals, iteration, regular expressions, etc. PHP 3 (1998) added support for ODBC data sources, multiple platform support, email protocols (SNMP,IMAP), and new parser written by Zeev Suraski and Andi Gutmans . PHP 4 (2000) became an independent component of the web server for added efficiency. The parser was renamed the Zend Engine. Many security features were added.

  7. Example Code is embedded into HTML. The PHP code is enclosed in special start and end tags that allow you to jump into and out of "PHP mode".

  8. Example <html>   <head>       <title>Example</title>   </head>   <body><?php        echo "Hi, I'm a PHP script!";        ?>  </body></html>

  9. Different type of Tag (Open and Close)

  10. Getting Started Simple HTML Page with PHP The following is a basic example to output text usingPHP.

  11. Getting Started Using conditional statements Conditional statements are very useful for displaying specific content to the user. The following example shows how to display content according to the day of the week.

  12. Header Page 1 Content Page 2 Content Page 3 Content Page 4 Content Page 5 Content Footer Web structure arrangement Benefits: - Any changes to header or footer only require editing of a single file. This reduces the amount of work necessary for site maintenance and redesign. - Helps separate the content and design for easier maintenance

  13. Comments in PHP • Can use 2 type of notation: • /* your block comment start here */ • //line comment What is the purpose of comment

  14. Declaring and initializing variable • $variable_name=value; • Display variable • Use echo $variable_name;

  15. Data type • Where to put the data type in PHP language • No need to declare the data type of variable • Data type known by looking at the value

  16. Building Expression • Arithmetic Operator: $x=10; $y=20; $z = $x + $y;

  17. Building Expression • Assignment Operator = -= /= += *= • Comparison Operator • == > >= • != < <=

  18. Building Expression • Logical Operator • && • || • !

  19. Function DEFINING FUNCTION <?php function name_of_function(parameter) { statement; } ?>

  20. Function • Calling Function name_of _function(parameter_value);

  21. Take Risks in Your Life"If u Win, U Can Lead!If u Loose, U Can Guide! Thanks FOR LISTENING WITHOUT SLEEPING

More Related