The document discusses key aspects of internet programming and web design. It explains the internet and world wide web, including protocols, URLs, software involved like browsers and servers, and the domain name system. It also covers designing good websites, which requires planning content, tone, accessibility, and usability. The goal is to offer valuable information to users in an engaging manner.
The document discusses key aspects of internet programming and web design. It explains the internet and world wide web, including protocols, URLs, software involved like browsers and servers, and the domain name system. It also covers designing good websites, which requires planning content, tone, accessibility, and usability. The goal is to offer valuable information to users in an engaging manner.
The document discusses key aspects of internet programming and web design. It explains the internet and world wide web, including protocols, URLs, software involved like browsers and servers, and the domain name system. It also covers designing good websites, which requires planning content, tone, accessibility, and usability. The goal is to offer valuable information to users in an engaging manner.
The document discusses key aspects of internet programming and web design. It explains the internet and world wide web, including protocols, URLs, software involved like browsers and servers, and the domain name system. It also covers designing good websites, which requires planning content, tone, accessibility, and usability. The goal is to offer valuable information to users in an engaging manner.
Download as PPTX, PDF, TXT or read online from Scribd
Download as pptx, pdf, or txt
You are on page 1of 28
Chapter 1
Introduction Internet Programming CS Staff Contents
Introduction
Designing a good website
Types of web page
Static vs. Dynamic
Web page design tools
Client Side Scripting
Server Side Scripting
CoSc 3081– Internet Programming 2 JKU- CS
What is Internet? Internet – a network of networks worldwide connection of computers & computer networks using IP that links billions of computers used by businesses, gov’t, educational institutions, organizations, and individuals using modems, phone lines, television cables, satellite links, fiber-optic connections, & other communications devices & media Several applications: E-mal www File transfer (FTP) Remote login E-commerce Instant messaging (chat) Mailing lists CoSc … 3081– Internet Programming 3 JKU - CS Layered Architecture The internet uses a layered hardware/software architecture (also called the "OSI model"):
CoSc 3081– Internet Programming 4 JKU- CS
Cont’d Physical layer: defines the mechanism for communicating with the transmission medium and interface hardware devices such as ethernet, coaxial cables, fiber-optic lines, modems Data link layer: validates the integrity of the flow of data from one node to another by synchronizing blocks of data and controlling the flow of data basic hardware protocols (ethernet, wifi, DSL PPP) Network / internet layer: defines protocols (IP) for data routing to ensure that the information arrives at the correct destination code Transport layer: defines protocols for structuring messages and supervises the validity of the transmission by performing some error checking adds reliability to network layer (TCP,UDP)
CoSc 3081– Internet Programming 5 JKU - CS
Cont’d Session layer: coordinated communications and maintain the session as long as it is needed, performing security, logging, and administrative functions Presentation layer: defines the way in which data is formatted, presented, converted and encoded Application layer: It defines the manner in which applications interact with network, including DBM, email, and terminal-emulation programs implements specific communication for each kind of program (HTTP, POP3/IMAP, SSH, FTP) HTTP (Hyper Text Transfer Protocol) – Client (web browser) and Server (web server) communicate via the HTTP to exchange request/response messages
CoSc 3081– Internet Programming 6 JKU - CS
Cont’d
CoSc 3081– Internet Programming 7 JKU - CS
Protocols A protocol Is a language spoken between computers to exchange information Is a formal description of message formats and the rules that two computers must follow in order to exchange those messages. Example: HTTP protocol defines the format for communication between web browsers and web servers
CoSc 3081– Internet Programming 8 JKU - CS
What is the World Wide Web? World Wide Web, also called Web – part of the Internet that supports multimedia and consists of a collection of linked documents www – refers to all of the publicly accessible websites in the world, in addition to other information sources that web browsers can access Hypertext Transfer Protocol (HTTP) – a set of rules for exchanging text, graphics, sound, video, and other multimedia files Web pages – linked documents, or pages of information, on the Web
CoSc 3081– Internet Programming 9 JKU - CS
Cont’d Web site – related collection of web pages that is created & maintained by an individual, company, educational institution, or other organization A collection of resources: • Web pages (static / dynamic) • Media files (images, animations, sound, …) • Style files (CSS) • Documents (pdf, doc, txt, rtf, …) • … Has a globally unique name • E.g. www.jku.edu.et Stored on machines called web servers Home page – first document users see when they access a web site CoSc 3081– Internet Programming 10 JKU - CS Internet vs Web Internet & web are not the same things. Internet: a inter-connected computer networks, linked by wires, cables, wireless connections, etc. They have communication between each other. Decentralized design that there is no centralized body controls how the Internet functions. Web: a collection of interconnected documents and other resources that are interconnected by hyper-links. These documents are accessed by web browsers and provided by web servers. Web server: web pages to be visible to people on the Internet, a machine with a connection to the Internet running special “web server software”.
CoSc 3081– Internet Programming 11 JKU - CS
Cont’d How does the Internet work? Through communication protocols Communication protocol is a specification of how communication between two computers will be carried out IP (Internet Protocol): defines the packets that carry blocks of data from one node to another TCP (Transmission Control Protocol) and UDP (User Datagram Protocol): the protocols by which one host sends data to another. Other application protocols: DNS (Domain Name Service), SMTP (Simple Mail Transmission Protocol), and FTP (File Transmission Protocol) How does the www work? Websites (with unique names) are stored on web servers Users access these websites via the Internet using software called a web browser. A user sends requests for resources from a server with the help of the a user agent (browser) The server sends the requested resource to the user agent The user agent renders the resource for the user to view. CoSc 3081– Internet Programming 12 JKU - CS Domain Name System DNS name structure A set of servers that map written names to IP addresses Example: www.cs.jku.edu.et 213.55.85.42 Hierarchical in nature (eg. cs.jku.edu.et) cs is under jku (subdomain of jku), jku is under edu, edu under et Labels separated by . (dot) Labels can be up to 63 characters long and are case insensitive A maximum of 255 characters is allowed in total The last (highest) labels of a DNS name can be: 3 letter code top level domains (TLDs): indicating type of org’n com, edu, gov, net, org, biz, … Two letter country codes (CCTLDs): indicating the country et, us, uk, …
CoSc 3081– Internet Programming 13 JKU - CS
URL (Uniform Resource Locator) An identifier for the location of a document on a web site The exact address of a resource on the Internet Format: <protocol>://<host>[:<port>][<path>][?<query>] E.g. http://www.somedomain.com/search.php?q=dns&lang=en Protocol – identifies the type of protocol to be used for communication http, ftp, mailto, … Host – identifies machine on which the requested resource is stored Domain names (eg. www.google.com) IP address Port – identifies the port number of the web server software on the web server machine Default port for http: 8080 Path – identifies the name and path of the resource on the server Query – specifies parameters, if any, that should be sent to the server along with the request has the form: ?var_name1=value1&var_name2=value2&… Hyperlink, also called link – an element used to connect one Web page to another Web page that’s located on the same server or different Web server located anywhere in the world CoSc 3081– Internet Programming 14 JKU - CS Software Involved At the server: an internet-connected computer that wishes to provide information (web pages and other files) to others Web server software: listens for incoming requests for resources from clients and serves the requests Publishing – copying Web pages & other files to a Web server Apache - open source IIS (Internet Information Services) – Microsoft Squid,…. At the client: system that wishes to access information Web browser, also called browser : a program interprets & sends/receives requests/responses to/from web servers on behalf of the client and renders content as necessary Microsoft Internet Explorer - Most commonly used browsers Mozilla Firefox Opera - The fastest browser on Earth Netscape, Mosaic - Many different computing platforms Safari,…. CoSc 3081– Internet Programming JKU - CS 15 Design Good Website Good website design isn’t just about pretty colors, groovy graphics, and knocking out code with software like Dreamweaver Good website design requires substantial planning, and takes into consideration not just visual design but also content, tone and the way information is arranged, as well as accessibility and usability for people with varying degrees of ability. Design Process requires relevant content of a brochure or magazine, colorful look of high-quality print, and attention-grabbing impact of television advertising. should offer a valuable product and/or information, be updated frequently and stay current with changing technology CoSc 3081– Internet Programming 16 JKU - CS Contd… Once you have decided to establish a web site there are 3 steps to getting it online. 1. Get a domain name - This is your personal/private address on the Web. 2. Find a web hosting service- Here is where your website will reside. Free vs Private Web Hosting 3. Design, build & upload your website - The process of website creation.
CoSc 3081– Internet Programming 17 JKU - CS
Contd… Five step process for effective website design 1. Analyse • Info / content 4. Implement • User Interaction • Target Audience • Top 10 Checklist • Final Checklist • FTP 2. Organise • Navigation • Fine Tune • Content 5. Maintain • Page layout • Marketing • Page design • Optimisation 3. Develop • Traffic analysis • Web page layout • Site layout • Web page construction • Graphics techniques
CoSc 3081– Internet Programming 18 JKU - CS
Web Application Are applications whose functionality is processed on a web server, and is delivered to the end users over a network such as the Internet or an intranet. End users use a thin client (web browser) to run web applications, which knows how to display and execute the data received from the server. In contrast, desktop applications are based on a thick client (also called a rich client or a fat client), which does most of the processing.
CoSc 3081– Internet Programming 19 JKU - CS
Advantages of Web Applications Are easy and inexpensive to deliver. With web applications, a company can reduce the costs of the IT department that is in charge of installing the software on the users' machines. Are easy and inexpensive to upgrade. as well. As soon as the application on the server machine is upgraded, everyone gets the new version. Have flexible requirements for the end users. Just have your web application installed on a server—any modern operating system will do—and you'll be able to use it over the Internet/Intranet on any machine and browser. Make it easier to have a central data store. When you have several locations that need access to the same data, having all that data stored in one place is much easier than having separate databases in each location.
CoSc 3081– Internet Programming 20 JKU - CS
Types of Web Pages Static Website Page content established at the time page is created A website that is written entirely using HTML. Each web page is a separate document and there are no databases or external files that are drawn upon. • Means – only way to edit is to go into each page and edit HTML (do yourself using a web page editor or pay ur web developer to updates) Useful for displaying data that doesn’t change often Dynamic Website – also called an interactive Website Is written using more complex code – such as PHP or AP - and has a greater degree of functionality. many can be controlled by a content management system • Means – you will potentially be able to make updates without needing any knowledge of HTML or any website software. • Each page of a dynamic website is generated from information stored in a db or external file CoSc 3081– Internet Programming 21 JKU - CS Which Should You Choose? Many people prefer dynamic websites because they have a lot of benefits Advantages of dynamic sites reduce ongoing maintenance costs, b/c u will enable u to maintain your own content Much more functional website make data management very efficient Much easier to update New content brings people back to the site and helps in the search engines Disadvantages of dynamic websites usually cost more to develop, because they require more complex coding, as well as for maintenance need to obtain web hosting which supports databases and dynamic languages CoSc 3081– Internet Programming 22 JKU - CS Dynamic Web Pages
Database-driven Web site Architecture
CoSc 3081– Internet Programming 23 JKU - CS Approaches for Creating Dynamic Web Pages In server-side processing, the Web server: Receives the dynamic Web page request Performs all of the processing necessary to create the dynamic Web page Sends the finished Web page to the client for display in the client’s browser Client-side processing Some processing is done on the client workstation, either to form the request for the dynamic Web page or to create or display the dynamic Web page Eg. Javascript code to validate user input. Often needs to be “executed” by the Browser.
CoSc 3081– Internet Programming 24 JKU - CS
Web site Development Need interaction between client and server Programming for providing Web service can also be divided into – Client-side programming: to define the operation to be performed on the client’s machine – Does not involve server processing – Client browser executes it locally – Are normally used to add functionality to web pages e.g. different menu styles, graphic displays, etc – Server-side programming: to define the operation to be performed on the server – Can use huge resources of the server – Complete all processing in the server and send plain pages to the client – Reduces client-side computation overhead CoSc 3081– Internet Programming 25 JKU - CS Cont’d To develop a Web site, three steps: 1. Obtain the appropriate equipment Web Server – hardware and software 2. Register Web Server to an Internet Service Provider (ISP) Obtain the IP address and DNS address 3. Develop the contents Internet Programming
Server-side Programming Client-side Programming
Skills that are often required: Skills that are often required: • CGI (Common Gateway Interface) • HTML (Hypertext Markup • PHP (Personal Home Page) Language), XHTML • Python • Javascript • ASP • Java • Perl • Dreamweaver • Java Servlet, … • XML … CoSc 3081– Internet Programming 26 JKU - CS Client Side vs. Server Side Web Which one to choose? What are the determining factors? Performance: • Responsiveness, speed, reliability • Ability to handle a large number of simultaneous users Functionality: • Simplicity of use and maintenance, • Breadth of user options • Ability to handle multiple simultaneous transactions Security: • Desktop security • Server security • Database security • Network security