JavaScript.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Introduction to JavaScript
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Server-Side vs. Client-Side Scripting Languages
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
Dynamic Web Pages. Web Programming  All our web pages so far have been static pages. 1. We create a web page 2. We upload it to the web server 3. People.
Multiple Tiers in Action
ECA 228 Internet/Intranet Design I Intro to the Web.
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
INTRODUCTION TO WEB DATABASE PROGRAMMING
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Lecture Note 3: ASP Syntax.  ASP Syntax  ASP Syntax ASP Code is Browser-Independent. You cannot view the ASP source code by selecting "View source"
Dynamic Web Pages (Flash, JavaScript)
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
CIM6400 CTNW (04/05) 1 CIM6400 CTNW Lesson 6 – More on Windows 2000.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
ASP Introduction Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Lecture Note 1: Getting Started With ASP.  Introduction to ASP  Introduction to ASP An ASP file can contain text, HTML tags and scripts. Scripts in.
Introduction to JavaScript CS101 Introduction to Computing.
The Module Road Map Assignment 1 Road Map We will look at… Internet / World Wide Web Aspects of their operation The role of clients and servers ASPX.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
ASP Syntax Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
IST 210: PHP Basics IST 210: Organization of Data IST2101.
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
ASP Mr. Baha & Dr.Husam Osta  What is ASP?  Internet Information Services  How Does ASP Differ from HTML?  What can ASP do for you?  ASP Basic.
G046 – Lecture 2A Recognising Web-Technologies Mr C Johnston ICT Teacher
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Section 10.1 Define scripting
The Object-Oriented Thought Process Chapter 13
Web Programming Language
Scripting - Client-side vs. Server-side Scripting
Tonga Institute of Higher Education IT 141: Information Systems
Web Concepts Lesson 2 ITBS2203 E-Commerce for IT.
Chapter 5 Scripting Language
WWW and HTTP King Fahd University of Petroleum & Minerals
Active Server Pages Computer Science 40S.
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
Nick Sims Scripting Languages.
Section 17.1 Section 17.2 Add an audio file using HTML
ASP.NET developing web applications based on Microsoft.NET Framework.
Developing Web-Based Applications
Introduction to JavaScript
Chapter 5 Scripting Language
AJAX.
PHP / MySQL Introduction
Dynamic Web Pages (Flash, JavaScript)
Chapter 27 WWW and HTTP.
Tonga Institute of Higher Education IT 141: Information Systems
Static and Dynamic Web Pages
Tonga Institute of Higher Education IT 141: Information Systems
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
IntroductionToPHP Static vs. Dynamic websites
An Introduction to JavaScript
PHP an introduction.
Introduction to JavaScript
Web Application Development Using PHP
Presentation transcript:

JavaScript

What is a Programming Language? A programming language is a set of codes that we can use to give a computer instructions to follow. Popular and well-known programming languages include Java, C++, BASIC and more. Most popular programming languages consist of words and phrases that are similar in form to the English language.

Cont… A well-written program will be easily readable by anyone with a little programming experience, regardless of whether they have any direct experience of the language in question. Modern programming languages share a large number of common concepts. In particular, they all have a notion of variables, arrays, loops, conditionals, and functions.

Cont… Traditionally, programming languages have been used to write (for the most part) “stand-alone” applications. Things like Microsoft Word, Matlab, etc are all examples of such applications. Once installed on a PC, these applications run without necessarily requiring any other software to be installed alongside them. Web Applications differ from these traditional applications in many respects, but the most outstanding is that they all run inside your web browser. Examples of popular web applications are things like Google, Hotmail, GMail and so on.

Cont… These applications are also written using programming languages, but as a rule they are built using multiple, interdependent technologies. These technologies are easily broken down into two categories: server-side and client-side.

Server-side vs. Client-side The World Wide Web is built on a number of different technologies. For most users, the web starts and ends with their choice of web browser. The browser is said to define the client-side of the web, with the browser, the computer it is running on, and the user searching/browse the web being collectively referred to as the client. Consider a client who has decided to visit the web site at www.google.com. The first thing that happens is that the client will make a request to Google’s web server for the default page of that web site.

Cont… The web server is an application running on a computer owned by Google. Like the client, the server application and the computer on which it runs define the server-side of the web, and are collectively referred to as the server. When the server receives the request from the client for a particular page, its job is to retrieve the page from the computer’s files and serve it back to the client. In many cases, this operation is a very simple procedure involving little or no work on the part of the server.

Cont… However, using a programming language like PHP, Perl or Java, we can cause the server to either modify the page it finds before it passes it back to the client, or even to generate the page entirely from scratch. This is referred to as a server-side application. The page passed back to the client looks (to the client) exactly the same as any other page that has not been modified. An example of a server-side application might be to insert the current date and time into a page. This would mean that each time the page was requested (say, by using the browser’s refresh button), a new time value would be added to the page.

Cont… Once the client has received the page from the server, it displays the page and waits for the user to request another page. However, all modern browsers allow for the running of client-side applications. These are small applications which are embedded within the HTML code of the page itself. Server-side applications ignore any client-side applications that they find while modifying pages to send to the client, so in general the two types of application cannot easily “talk” to each other.

Cont… However, once the client has received a client-side application, it can begin to modify the page dynamically, without the need to go back to the server. An example of a client-side application might be a clock on a web page that updated every second.

Cont… An unfortunate side effect of client-side applications is that all the code must be sent to the client for running, which means that the application’s inner workings are available for anyone to see. This makes it impractical for checking passwords, or doing anything else that could cause confidential information to be released into the wild. Despite these drawbacks, client-side applications (or scripts, as they are better known due to their general brevity) remain the best way to provide web users with a rich environment when developing web applications.

JavaScript A scripting language is a programming language designed for integrating and communicating with other programming languages. Some of the most widely used scripting languages are JavaScript, VBScript, PHP, Perl, Python and so on. Since a scripting language is normally used in conjunction with another programming language, they are often found alongside HTML, Java or C++. JavaScript is an interpreted, client-side, event-based, object oriented scripting language that you can use to add dynamic interactivity to your web pages.

Cont… JavaScript scripts are written in plain text, like HTML, XML, Java, PHP and just about any other modern computer code. In this code, we will use Windows NotePad to create and edit our JavaScript code, but there are a large number of alternatives available. NotePad is chosen to demonstrate JavaScript’s immediacy and simplicity.

Cont… You can use JavaScript to achieve any of the following: Create special effects with images that give the impression that a button is either highlighted or depressed whenever the mouse pointer is hovered over it. Validate information that users enter into your web forms Create custom pages “on the fly” without the need for a server-side language like PHP. And much more…