Internet Programming

Total Page:16

File Type:pdf, Size:1020Kb

Internet Programming CS6501/ CS6501 internet programming M.I.E.T. ENGINEERING COLLEGE (Approved by AICTE and Affiliated to Anna University Chennai) TRICHY – PUDUKKOTTAI ROAD, TIRUCHIRAPPALLI – 620 007 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING COURSE MATERIAL CS6501 - INTERNET PROGRAMMING III YEAR - V SEMESTER M.I.E.T./CSE/III/Internet Programming CS6501/ CS6501 internet programming M.I.E.T. ENGINEERING COLLEGE (Approved by AICTE and Affiliated to Anna University Chennai) DEPARTMENTTRICHY OF –COMPUTER PUDUKKOTTAI SCIENCE ROAD, &TIRUCHIRAPPALLI ENGINEERING – 620 007 SYLLABUS (THEORY) Sub. Code : CS6501 Branch / Year / Sem : CSE/III/V Sub.Name : INTERNET PROGRAMMING Staff Name : P.RAMESH SYLLABUS CS6501 INTERNET PROGRAMMING L T P C 3 1 0 4 UNIT I JAVA PROGRAMMING 9 An overview of Java – Data Types – Variables and Arrays – Operators – Control Statements – Classes – Objects – Methods – Inheritance - Packages – Abstract classes – Interfaces and Inner classes – Exception handling - Introduction to Threads – Multithreading – String handling – Streams and I/O – Applets. UNIT II WEBSITES BASICS, HTML 5, CSS 3, WEB 2.0 8 Web 2.0: Basics-RIA Rich Internet Applications - Collaborations tools - Understanding websites and web servers: Understanding Internet – Difference between websites and web server- Internet technologies Overview –Understanding the difference between internet and intranet; HTML and CSS: HTML 5.0 , XHTML, CSS 3 UNIT II I CLIENT SIDE AND SERVER SIDE PROGRAMMING 11 Java Script: An introduction to JavaScript–JavaScript DOM Model-Date and Objects,- Regular Expressions- Exception Handling-Validation-Built-in objects-Event Handling- DHTML with JavaScript. Servlets: Java Servlet Architecture- Servlet Life Cycle- Form GET and POST actions- Session Handling- Understanding Cookies- Installing and Configuring Apache Tomcat Web Server;- DATABASE CONNECTIVITY: JDBC perspectives, JDBC program example - JSP: Understanding Java Server Pages-JSP Standard Tag Library(JSTL)- Creating HTML forms by embedding JSP code. UNIT IV PHP and XML 8 An introduction to PHP: PHP- Using PHP- Variables- Program control- Built-in functions- Connecting to Database – Using Cookies-Regular Expressions; XML: Basic XML- Document Type Definition- XML Schema DOM and Presenting XML, XML Parsers and Validation, XSL and XSLT Transformation, News Feed (RSS and ATOM). M.I.E.T./CSE/III/Internet Programming CS6501/ CS6501 internet programming UNIT V INTRODUCTION TO AJAX and WEB SERVICES 9 AJAX: Ajax Client Server Architecture-XML Http Request Object-Call Back Methods; Web Services: Introduction- Java web services Basics – Creating, Publishing ,Testing and Describing a Web services (WSDL)- Consuming a web service, Database Driven web service from an application – SOAP TOTAL (L:45+T:15): 60 PERIODS TEXT BOOKS: 1. Deitel and Deitel and Nieto, ―Internet and World Wide Web - How to Program‖, Prentice Hall, 5th Edition, 2011. 2. Herbert Schildt, ―Java-The Complete Reference‖, Eighth Edition, Mc Graw Hill Professional, 2011. REFERENCES: 1. Stephen Wynkoop and John Burke ―Running a Perfect Website‖, QUE, 2nd Edition,1999. 2. Chris Bates, Web Programming – Building Intranet Applications, 3rd Edition, Wiley Publications, 2009. 3. Jeffrey C and Jackson, ―Web Technologies A Computer Science Perspective‖, Pearson Education, 2011. M.I.E.T./CSE/III/Internet Programming CS6501/ CS6501 internet programming M.I.E.T. ENGINEERING COLLEGE Sub. Code : CS6501 (Approved by AICTE and Branch/Year/SemAffiliated to Anna University : CSE/III/V Chennai) Sub Name : Internet programmingTRICHY – PUDUKKOTTAI ROAD,Staff Name TIRUCHIRAPPALLI :P.Ramesh – 620 007 COURSE OBJECTIVE Students will be able to: 1. Learn Java Programming. 2. Understand different Internet Technologies 3. Design and implement dynamic web page with validation using JavaScript objects and by applying different event handling mechanisms. 4. Learn server side programs using Servlets and JSP. 5. Be exposed to java specific web services architecture COURSE OUTCOMES On completion of course the students will be able to: 1. .Demonstrate how the real time logics are applied to basic java programs. 2. Understand, analyze and apply the role languages like HTML, CSS and protocols in the workings of web and web applications. 3. Create and communicate between client and server using Java and create a good, effective and dynamic website. 4. Understand about network and security programming using Java and know about the application of dynamic page functionality in web pages using Servlets, and JSP. 5. Design and implement simple web page in PHP, and to present data in XML format 6. Make clear a web services and client presentation using AJAX. Prepared by Verified By STAFF NAME HOD P.RAMESH Approved by PRINCIPAL M.I.E.T./CSE/III/Internet Programming CS6501/ CS6501 internet programming UNIT I JAVA PROGRAMMING 1.1 AN OVERVIEW OF JAVA Java is an Object-Oriented Language. As a language that has the Object Oriented feature, Java supports the following fundamental concepts: 1.1.1 C++ Vs Java Object - Objects have states and behaviors. Example: A dog has states - color, name, breed as well as behaviors -wagging, barking, eating. An object is an instance of a class. Class - A class can be defined as a template/blue print that describes the behaviors/states that object of its type support. Objects in Java: Let us now look deep into what are objects. If we consider the real- world we can find many objects around us, Cars, Dogs, Humans, etc. All these objects have a state and behavior. If we consider a dog, then its state is - name, breed, color, and the behavior is - barking, wagging, running If you compare the software object with a real world object, they have very similar characteristics. Software objects also have a state and behavior. A software object's state is stored in fields and behavior is shown via methods. So in software development, methods operate on the internal state of an object and the object-to- object communication is done via methods. Classes in Java: A class is a blue print from which individual objects are created. A sample of a class isgiven below public class Dog{ String breed; int age; String color; void barking(){ } void hungry(){ } void sleeping(){ } } M.I.E.T./CSE/III/Internet Programming Subject code/Name: CS6501 internet programming 1.2 Data Types and Variables Type Capacity Range Default value byte 1B ( 8 bits) -27 to 27 - 1 0 short 2B (16 bits) -215 to 215 – 1 0 int 4B (32 bits) -231 to 231 – 1 0 long 8B (64 bits) -263 to 263 – 1 0.0L float 32 bits IEEE 754 floating point 0.0f double 64 bits IEEE 754 floating point 0.0D boolea n 1 bit True / False False ‗\u0000‘ to char 16 bits ‗\uffff‘ NA A class can contain any of the following variable types. Local variables: Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and the variable will be destroyed when the method has completed. Instance variables: Instance variables are variables within a class but outside any method. These variables are instantiated when the class is loaded. Instance variables can be accessed from inside any method, constructor or blocks of that particular class. Class variables: Class variables are variables declared with in a class, outside any method, with the static keyword. A class can have any number of methods to access the value of various kinds of methods. In the above example, barking(), hungry() and sleeping() are methods. Below mentioned are some of the important topics that need to be discussed when looking into classes of the Java Language. 1.3 Array Normally, array is a collection of similar type of elements that have contiguous memory location. Java array is an object the contains elements of similar data type. It is a data structure where we store similar elements. We can store only fixed set of elements in a java array. M.I.E.T./CSE/III/Internet Programming Subject code/Name: CS6501 internet programming Array in java is index based, first element of the array is stored at 0 index. Advantage of Java Array Code Optimization: It makes the code optimized, we can retrieve or sort the data easily. Random access: We can get any data located at any index position. Disadvantage of Java Array Size Limit: We can store only fixed size of elements in the array. It doesn't grow its sizeat runtime. To solve this problem, collection framework is used in java. Example: class Testarray{ public static void main(String args[]){ int a[]=new int[5];//declaration and instantiation a[0]=10;//initialization a[1]=20; a[2]=70; a[3]=40; a[4]=50; //printing array for(int i=0;i<a.length;i++)//length is the property of array System.out.println(a[i]); } } Output: 10 20 70 40 50 1.4 OPERATORS AND CONTROL STATEMENTS M.I.E.T./CSE/III/Internet Programming Subject code/Name: CS6501 internet programming Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups − Arithmetic Operators Relational Operators Bitwise Operators Logical Operators Assignment Operators Misc Operators The Arithmetic Operators Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra. The following table lists the arithmetic operators − Assume integer variable A holds 10 and variable B holds 20, then − Show Examples Operator Description Example Adds values on either side of the + (Addition) A + B will give 30 operator. Subtracts right-hand operand from left- - (Subtraction) A - B will give -10 hand operand. Multiplies values on either side of the * (Multiplication) A * B will give 200 operator. Divides left-hand operand by right-hand / (Division) B / A will give 2 operand. Divides left-hand operand by right-hand % (Modulus) B % A will give 0 operand and returns remainder. ++ (Increment) Increases the value of operand by 1. B++ gives 21 -- (Decrement) Decreases the value of operand by 1.
Recommended publications
  • Describing Media Content of Binary Data in XML W3C Working Group Note 2 May 2005
    Table of Contents Describing Media Content of Binary Data in XML W3C Working Group Note 2 May 2005 This version: http://www.w3.org/TR/2005/NOTE-xml-media-types-20050502 Latest version: http://www.w3.org/TR/xml-media-types Previous version: http://www.w3.org/TR/2004/WD-xml-media-types-20041102 Editors: Anish Karmarkar, Oracle Ümit Yalç&#305;nalp, SAP (formerly of Oracle) Copyright © 2005 W3C ® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply. > >Abstract This document addresses the need to indicate the content-type associated with binary element content in an XML document and the need to specify, in XML Schema, the expected content-type(s) associated with binary element content. It is expected that the additional information about the content-type will be used for optimizing the handling of binary data that is part of a Web services message. Status of this Document This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/. This document is a W3C Working Group Note. This document includes the resolution of the comments received on the Last Call Working Draft previously published. The comments on this document and their resolution can be found in the Web Services Description Working Group’s issues list and in the section C Change Log [p.11] . A diff-marked version against the previous version of this document is available.
    [Show full text]
  • Active Server Pages (ASP)
    Active Server Pages (ASP) Outline 11.1 Introduction 11.2 How Active Server Pages Work 11.3 Client-side Scripting versus Server-side Scripting 11.4 Using Personal Web Server or Internet Information Server 11.5 A Simple ASP Example 11.6 Server-side ActiveX Components 11.7 File System Objects 11.8 Session Tracking and Cookies 11.9 Accessing a Database from an Active Server Page 11.10 Case Study: A Product Catalog 11.1 Introduction • Active Server Pages (ASP) – Processed in response to client request – ASP file contains HTML and scripting code – VBScript de facto language for ASP scripting • Other languages can be used – JavaScript – .asp file extension – Microsoft-developed technology – Send dynamic Web content • HTML • DHTML • ActiveX controls • Client-side scripts • Java applets 11.2 How Active Server Pages Work • Client sends request – Server receives request and directs it to ASP – ASP processes, then returns result to client • HTTP request types – Request methods • GET – Gets (retrieves) information from server – Retrieve HTML document or image • POST – Posts (sends) data to server – Send info from HTML form » Client-entered data » Info to search Internet » Query for a database » Authentication info 11.2 How Active Server Pages Work (II) • Browsers often cache Web pages – Cache: save on disk – Typically do not cache POST response • Next POST request may not return same result • Client requests ASP file – Parsed (top to bottom) by ActiveX component asp.dll • ActiveX component: server-side ActiveX control that usually does not have GUI
    [Show full text]
  • XML Specifications Growth of the Web
    Web Services Standards Overview Dependencies Messaging Specifications SOAP 1.1 SOAP 1.2 Interoperability Business Process Specifications Management Specifications Presentation SOAP Message Transmission Optimization Mechanism WS-Notification the trademarks of their respective owners. of their respective the trademarks Management Using Web Management Of WS-BaseNotification Issues Business Process Execution WS-Choreography Model Web Service Choreography Web Service Choreography WS-Management Specifications Services (WSDM-MUWS) Web Services (WSDM-MOWS) Language for Web Services 1.1 Overview Interface Description Language AMD, Dell, Intel, Microsoft and Sun WS-Topics (BPEL4WS) · 1.1 · BEA Systems, IBM, (WSCI) · 1.0 · W3C 1.0 1.0 1.0 · W3C (CDL4WS) · 1.0 · W3C Microsystems Microsoft, SAP, Sun Microsystems, SAP, BEA Systems WS-BrokeredNotification Working Draft Candidate Recommendation OASIS OASIS Published Specification Web Services for Remote Security Resource Basic Profile Siebel Systems · OASIS-Standard and Intalio · Note OASIS-Standard OASIS-Standard Metadata Portlets (WSRP) WS-Addressing – Core 1.1 ̆ ̆ ̆ ̆ ̆ ̆ ̆ 2.0 WS-I Business Process Execution Language for Web Services WS-Choreography Model Overview defines the format Web Service Choreography Interface (WSCI) describes Web Service Choreography Description Language Web Service Distributed Management: Management Using Web Service Distributed Management: Management Of WS-Management describes a general SOAP-based WS-Addressing – WSDL Binding 1.1(BPEL4WS) provides a language for the formal
    [Show full text]
  • TMS Xdata Documentation
    Overview TMS XData is a Delphi framework that allows you to create HTTP/HTTPS servers that expose data through REST/JSON. It is highly integrated into TMS Aurelius in a way that creating XData services based on applications with existing Aurelius mappings are just a matter of a few lines of code. XData defines URL conventions for adressing resources, and it specifies the JSON format of message payloads. It is heavily based on the OData standard. Such conventions, with the benefit of existing Aurelius mapping, allow building a full REST/JSON server with minimum writing of code. TMS XData uses TMS Sparkle as its core communication library. TMS XData product page: https://www.tmssoftware.com/site/xdata.asp TMS Software site: https://www.tmssoftware.com TMS XData is a full-featured Delphi framework that allows you to create REST/JSON servers, using server-side actions named service operations, and optionally exposing TMS Aurelius entities through REST endpoints. Consider that you have an Aurelius class mapped as follows: [Entity, Automapping] TCustomer = class strict private FId: integer; FName: string; FTitle: string; FBirthday: TDateTime; FCountry: TCountry; public property Id: Integer read FId write FId; property Name: string read FName write FName; property Title: string read FTitle write FTitle; property Birthday: TDateTime read FDateTime write FDateTime; property Country: TCountry read FCountry write FCountry; end; With a few lines of code you can create an XData server to expose these objects. You can retrieve an existing TCustomer
    [Show full text]
  • What Is XML Schema?
    72076_FM 3/22/02 10:39 AM Page i XML Schema Essentials R. Allen Wyke Andrew Watt Wiley Computer Publishing John Wiley & Sons, Inc. 72076_AppB 3/22/02 10:47 AM Page 378 72076_FM 3/22/02 10:39 AM Page i XML Schema Essentials R. Allen Wyke Andrew Watt Wiley Computer Publishing John Wiley & Sons, Inc. 72076_FM 3/22/02 10:39 AM Page ii Publisher: Robert Ipsen Editor: Cary Sullivan Developmental Editor: Scott Amerman Associate Managing Editor: Penny Linskey Associate New Media Editor: Brian Snapp Text Design & Composition: D&G Limited, LLC Designations used by companies to distinguish their products are often claimed as trademarks. In all instances where John Wiley & Sons, Inc., is aware of a claim, the product names appear in initial capital or ALL CAPITAL LETTERS. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration. This book is printed on acid-free paper. Copyright © 2002 by R. Allen Wyke and Andrew Watt. All rights reserved. Published by John Wiley & Sons, Inc. Published simultaneously in Canada. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copy- right Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4744. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 605 Third Avenue, New York, NY 10158-0012, (212) 850-6011, fax (212) 850- 6008, E-Mail: PERMREQ @ WILEY.COM.
    [Show full text]
  • Active Server Pages Architecture
    Active Server Pages Architecture Li Yi South Bank University Contents 1. Introduction ...................................................................................................................................... 2 1.1 Host-based databases ............................................................................................................... 2 1.2 Client/server databases ............................................................................................................ 2 1.3 Web databases........................................................................................................................... 3 2. Active Server Pages ........................................................................................................................ 5 2.1 ASP Components ...................................................................................................................... 6 2.2 ADO and Database................................................................................................................... 7 2.3 The steps of executing a query ............................................................................................. 11 3 ASP Attributes ................................................................................................................................ 12 References:.......................................................................................................................................... 13 1 1. Introduction The development of databases always comes
    [Show full text]
  • Implementing OGC Web Map Service Client Applications Using JSP, JSTL and XMLC
    Implementing OGC Web Map Service Client Applications Using JSP, JSTL and XMLC Hao Ding , Richard Pascoe & Neville Churcher Department of Computer Science University of Canterbury. Christchurch, New Zealand Phone: +64 3 364-2362 Fax: +64 3 364-2569 Email: [email protected] , {richard, neville}@cosc.canterbury.ac.nz Presented at SIRC 2002 – The 14th Annual Colloquium of the Spatial Information Research Centre University of Otago, Dunedin, New Zealand th December 3-5 2002 ABSTRACT Java technologies are widely used in web application development. In this paper are described three approaches to developing Java-based web applications and our experiences with applying each to the development of client that interact with servers implementing the OGC (Open GIS Consortium) Web Map Service (WMS) specification. Also described is the installation and configuration of open source software that implements the WMS specification. The paper is concluded with some preliminary insights into when one of the three approaches to WMS client implementation is more suited to another. Keywords and phrases: WMS, JSP, JSTL, XMLC, map layer, web map server 1.0 INTRODUCTION Of the many technologies, such as Common Gateway Interface (CGI), Active Server Pages (ASP), JavaServer Pages (JSP), that are used to develop web applications, three are of particular interest to the research presented here. These three technologies or approaches to developing clients that utilise web services are JavaServer Pages (JSP), JSP with the use of tags from the JSP Standard Tag Library (JSTL), and the eXtensible Markup Language Compiler (XMLC). JSP is a more convenient way to write Java servlets, and allows the insertion of Java code directly into static HTML (Hypertext Markup Language) pages.
    [Show full text]
  • Apache Flex 2
    flex #flex 1 1: flex 2 2 2 Examples 2 Apache Flex 2 Apache FlexApache Flex SDK 2 Apache Flex SDK 3 3 3 3 3 4 Adobe AIR SDK 4 Adobe Flash Player 4 Adobe Flash Player playerglobal.swc 5 Adobe Pixel Bender 5 5 5 Hello World 6 Hello World 6 7 You can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: flex It is an unofficial and free flex ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official flex. The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners. Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to [email protected] https://riptutorial.com/zh-TW/home 1 1: flex Apache FlexApache Foundation。SWFFlashAdobe AirAndroidiOSBlackBerryWindowsOSX。 FlexUIMXMLActionScript3。SWF。 FlexRESTSOAPJSONJMSAMFJavaPHPRuby.NET。 Apache Flex SDKHTTPServiceWebServiceRemoteObject。 Flex。 Apache FlexApache License v.2.0 。SDKSDK。 WebJava.NET。 Apache FlexApacheApache Software Foundation。 Apache Flex SDK 4.15 2016111 Apache Flex SDK 4.14.1 2015331 Apache Flex SDK 4.14.0 201523 Apache Flex SDK 4.13.0 2014728 Apache Flex SDK 4.12.1 201453 Apache Flex SDK 4.12.0 2014310 Apache Flex SDK 4.11.0 20131028 Apache Flex SDK 4.10.0 201386 Apache Flex SDK 4.9.0 2013228 Examples Apache Flex Apache Flex SDK。Apache Flex SDKAdobe AIRWindowsOS X / macOS。。 Apache FlexApache Flex SDK https://riptutorial.com/zh-TW/home 2 1.
    [Show full text]
  • WEB-BASED ANNOTATION and COLLABORATION Electronic Document Annotation Using a Standards-Compliant Web Browser
    WEB-BASED ANNOTATION AND COLLABORATION Electronic Document Annotation Using a Standards-compliant Web Browser Trev Harmon School of Technology, Brigham Young University, 265 CTB, Provo, Utah, USA Keywords: Annotation, collaboration, web-based, e-learning. Abstract: The Internet provides a powerful medium for communication and collaboration through web-based applications. However, most web-based annotation and collaboration applications require additional software, such as applets, plug-ins, and extensions, in order to work correctly with the web browsers typically found on today’s computers. This in combination with the ever-growing number of file formats poses an obstacle to the wide-scale deployment of annotation and collaboration systems across the heterogeneous networks common in the academic and corporate worlds. In order to address these issues, a web-based system was developed that allows for freeform (handwritten) and typed annotation of over twenty common file formats via a standards-compliant web browser without the need of additional software. The system also provides a multi-tiered security architecture that allows authors control over who has access to read and annotate their documents. While initially designed for use in academia, flexibility within the system allows it to be used for many annotation and collaborative tasks such as distance-learning, collaborative projects, online discussion and bulletin boards, graphical wikis, and electronic grading. The open-source nature of the system provides the opportunity for its continued development and extension. 1 INTRODUCTION did not foresee the broad spectrum of uses expected of their technologies by today’s users. While serving While the telegraph and telephone may have cracked this useful purpose, such add-on software can open the door of instantaneous, worldwide become problematic in some circumstances because communication, the Internet has flung it wide open.
    [Show full text]
  • Programming in HTML5 with Javascript and CSS3 Ebook
    spine = 1.28” Programming in HTML5 with JavaScript and CSS3 and CSS3 JavaScript in HTML5 with Programming Designed to help enterprise administrators develop real-world, About You job-role-specific skills—this Training Guide focuses on deploying This Training Guide will be most useful and managing core infrastructure services in Windows Server 2012. to IT professionals who have at least Programming Build hands-on expertise through a series of lessons, exercises, three years of experience administering and suggested practices—and help maximize your performance previous versions of Windows Server in midsize to large environments. on the job. About the Author This Microsoft Training Guide: Mitch Tulloch is a widely recognized in HTML5 with • Provides in-depth, hands-on training you take at your own pace expert on Windows administration and has been awarded Microsoft® MVP • Focuses on job-role-specific expertise for deploying and status for his contributions supporting managing Windows Server 2012 core services those who deploy and use Microsoft • Creates a foundation of skills which, along with on-the-job platforms, products, and solutions. He experience, can be measured by Microsoft Certification exams is the author of Introducing Windows JavaScript and such as 70-410 Server 2012 and the upcoming Windows Server 2012 Virtualization Inside Out. Sharpen your skills. Increase your expertise. • Plan a migration to Windows Server 2012 About the Practices CSS3 • Deploy servers and domain controllers For most practices, we recommend using a Hyper-V virtualized • Administer Active Directory® and enable advanced features environment. Some practices will • Ensure DHCP availability and implement DNSSEC require physical servers.
    [Show full text]
  • Standard Query Language (SQL) Hamid Zarrabi-Zadeh Web Programming – Fall 2013 2 Outline
    Standard Query Language (SQL) Hamid Zarrabi-Zadeh Web Programming – Fall 2013 2 Outline • Introduction • Local Storage Options Cookies Web Storage • Standard Query Language (SQL) Database Commands Queries • Summary 3 Introduction • Any (web) application needs persistence storage • There are three general storage strategies: server-side storage client-side storage a hybrid strategy 4 Client-Side Storage • Client-side data is stored locally within the user's browser • A web page can only access data stored by itself • For a long time, cookies were the only option to store data locally • HTML5 introduced several new web storage options 5 Server-Side Storage • Server-side data is usually stored within a file or a database system • For large data, database systems are preferable over plain files • Database Management Systems (DBMSs) provide an efficient way to store and retrieve data Cookies 7 Cookies • A cookie is a piece of information stored on a user's browser • Each time the browser requests a page, it also sends the related cookies to the server • The most common use of cookies is to identify a particular user amongst a set of users 8 Cookies Structure • Each cookie has: • a name • a value (a 4000 character string) • expiration date (optional) • path and domain (optional) • if no expiration date is specified, the cookie is considered as a session cookie • Session cookies are deleted when the browser session ends (the browser is closed by the user) 9 Set/Get Cookies • In JavaScript, cookies can be accessed via the document.cookie
    [Show full text]
  • Document Object Model
    Document Object Model CITS3403: Agile Web Development Semester 1, 2021 Introduction • We’ve seen JavaScript core – provides a general scripting language – but why is it so useful for the web? • Client-side JavaScript adds collection of objects, methods and properties that allow scripts to interact with HTML documents dynamic documents client-side programming • This is done by bindings to the Document Object Model (DOM) – “The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents.” – “The document can be further processed and the results of that processing can be incorporated back into the presented page.” • DOM specifications describe an abstract model of a document – API between HTML document and program – Interfaces describe methods and properties – Different languages will bind the interfaces to specific implementations – Data are represented as properties and operations as methods • https://www.w3schools.com/js/js_htmldom.asp The DOM Tree • DOM API describes a tree structure – reflects the hierarchy in the XTML document – example... <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title> A simple document </title> </head> <body> <table> <tr> <th>Breakfast</th> <td>0</td> <td>1</td> </tr> <tr> <th>Lunch</th> <td>1</td> <td>0</td> </tr> </table> </body> </html> Execution Environment • The DOM tree also includes nodes for the execution environment in a browser • Window object represents the window displaying a document – All properties are visible to all scripts – Global variables are properties of the Window object • Document object represents the HTML document displayed – Accessed through document property of Window – Property arrays for forms, links, images, anchors, … • The Browser Object Model is sometimes used to refer to bindings to the browser, not specific to the current page (document) being rendered.
    [Show full text]