Web Application Development Using PHP Clientside Scripting Clientside

  • Slides: 16
Download presentation
Web Application Development Using PHP

Web Application Development Using PHP

Client-side Scripting Client-side scripting is performed to generate a code that can run on

Client-side Scripting Client-side scripting is performed to generate a code that can run on the client end (browser) without needing the server side processing. Basically, these types of scripts are placed inside an HTML document. The client-side scripting can be used to examine the user’s form for the errors before submitting it and for changing the content according to the user input. As mentioned before, the web requires three elements for its functioning which are, client, database and server. • • • Client-side scripting languages: HTML: It is the fundamental building blocks of web programming which provides the frame to the website. It describes the arrangement of the content. CSS: CSS provides the way to design the graphic elements which help in making the appearance of the web application more attractive. Java. Script: It is also a client-side scripting language which essentially devised for the specific purpose, but currently there are various Java. Script frameworks used as server-side scripting technology.

Server-side Scripting Server-side scripting is a technique of programming for producing the code which

Server-side Scripting Server-side scripting is a technique of programming for producing the code which can run software on the server side, in simple words any scripting or programming that can run on the web server is known as server-side scripting. The operations like customization of a website, dynamic change in the website content, response generation to the user’s queries, accessing the database, and so on are performed at the server end. The server-side scripting constructs a communication link between a server and a client (user). Earlier the server side scripting is implemented by the CGI (Common Gateway Interface) scripts. The CGI was devised to execute the scripts from programming languages such as C++ or Perl on the websites.

Server-side scripting languages: After the advent of CGI, multiple programming languages were evolved such

Server-side scripting languages: After the advent of CGI, multiple programming languages were evolved such as PHP, Python, Ruby, Cold. Fusion, C#, Java, C++ and so on for server-side scripting among which some of them are described below: • • • PHP: It is the most prevalent server-side language used on the web which was designed to extract and manipulate information in the database. The language is used in association with SQL language for the Database. It is used in Facebook, Word. Press and Wikipedia. Python: The language is fast and contains shorter code. It is good for beginners as it concentrates on the readability and simplicity of the code. Python functions well in the object-oriented environment and used in famous sites like Youtube, Google, etc. Ruby: It contains complex logic which packages the back-end with database utility which can also be provided by PHP and SQL.

Difference between Client side and Server side scripting Basis for comparison Server side scripting

Difference between Client side and Server side scripting Basis for comparison Server side scripting Client side scripting Basis Works in the back end which could not be visible at the client end. Works at the front end and script are visible among the users. Processing Requires server interaction. Does not need interaction with the server. Languages involved PHP, ASP. net, Ruby on Rails, Cold. Fusion, Python, etcetera. Affect Could effectively customize Can reduce the load to the web pages and provide server. dynamic websites. Security Relatively secure. HTML, CSS, Java. Script, etc. Insecure

Understanding Web Servers Web server is a computer where the web content is stored.

Understanding Web Servers Web server is a computer where the web content is stored. Basically web server is used to host the web sites but there exists other web servers also such as gaming, storage, FTP, email etc. • Web site is collection of web pages whileweb server is a software that respond to the request for web resources. Web Server Working • • Web server respond to the client request in either of the following two ways: Sending the file to the client associated with the requested URL. Generating response by invoking a script and communicating with database

PHP 5 Introduction • • • • What is PHP? PHP is an acronym

PHP 5 Introduction • • • • What is PHP? PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use What is a PHP File? PHP files can contain text, HTML, CSS, Java. Script, and PHP code are executed on the server, and the result is returned to the browser as plain HTML PHP files have extension ". php" What Can PHP Do? PHP can generate dynamic page content PHP can create, open, read, write, delete, and close files on the server PHP can collect form data PHP can send and receive cookies PHP can add, delete, modify data in your database PHP can be used to control user-access PHP can encrypt data

PHP 5 Introduction Why PHP? • • • PHP runs on various platforms (Windows,

PHP 5 Introduction Why PHP? • • • PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc. ) PHP is compatible with almost all servers used today (Apache, IIS, etc. ) PHP supports a wide range of databases PHP is free. Download it from the official PHP resource: www. php. net PHP is easy to learn and runs efficiently on the server side

PHP 5 Installation What Do I Need? • • • To start using PHP,

PHP 5 Installation What Do I Need? • • • To start using PHP, you can: Find a web host with PHP and My. SQL support Install a web server on your own PC, and then install PHP and My. SQL Use a Web Host With PHP Support • • If your server has activated support for PHP you do not need to do anything. Just create some. php files, place them in your web directory, and the server will automatically parse them for you. You do not need to compile anything or install any extra tools. Because PHP is free, most web hosts offer PHP support.

PHP 5 Installation Set Up PHP on Your Own PC • • • However,

PHP 5 Installation Set Up PHP on Your Own PC • • • However, if your server does not support PHP, you must: install a web server install PHP install a database, such as My. SQL The official PHP website (PHP. net) has installation instructions for PHP: http: //php. net/manual/en/install. php

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction

PHP 5 Introduction