DBI Chapter 1: Fundamentals

学习Databases and Interfaces 的课堂笔记

Introduction

Outline

  • The Internet
  • Transmission Control Protocol / Internet
  • Domain name
  • Uniform (or Universal) Resource Locator (URL)
  • Hyper Text Transfer Protocol

TCP/IP

  • Transmission Control Protocol / Internet Protocol (TCP/IP) allows devices on the internet to communicate with each other.
  • IP addresses are used to uniquely identify all devices connected to the internet
image.png

Domain Name

  • Beigins with the name of the host machine, followed by progressively larger collections of machines i.e.domains.
  • Easier to remember than IP addresses (for humans).
image.png

World Wide Wed

  • A vast collection of documents that are connected by links.

Hypertext Transfer Protocol

  • HTTP consists of :request or response.
    • Users issues URL from a browser http://host:port/path.file
    • Browser sends a request message.
    • Server maps the URL to a file or program under the document directory
    • Server returns a response message
    • Browser formats the response and displays

Uniform Resource Locators

  • URLs are a path to, or locations of, a resource on the Internet.
  • URL format is : scheme : object- address
  • The scheme is often a communication protocol, e.g. HTTP,FTP
image.png

Passing Parameters using URL

-URL parameters are probably the easiest way of passing variables from one webpage to another.
-GET method is used to request data from a specified resource.
-POST method is used to send data to a server to create or update a resource.

image.png

URL and Partial Path

  • The path to the dicument for the HTTP protocol is similar to a path to a file or directory in the file system of an operating system.
  • BUT, the URL may not include all directories i.e. partical path
image.png
  • The actual location of a file in the file system of a web server can be different from the URL e.g
    a file in. ./var/site/forum/index.phpmaybe access usinghttp://www.site.ru/forum/index.php
  • In PHP, the file can be accessed using
    $path = $_SERVER['DOCUMENT_ROOT']."/forum/index.php"

Using index.html as a Security Feature

  • Sometimes a user may specify a directory but a document name is not given.
    http://www.yourwebsite.com/yourfolder
  • The web server will search for a servable document e.g. index.html
  • If a servable document is not found, by default, a directory listing will be returned i.e. all files in that directory. => 404

Conclusions

  • Devices connected on the Internet rely on TCP/IP protocol to communicate.
  • IPv4 addresses are four-part numbers xxx.xxx.xxx.xxx
  • DNS translates IP addresses to domain names so as to be human readable
  • URN/URI identify resources on the Internet, URL identify paths or locations of the resources.
  • HTTP is a standard protocol for web communicaiton.
  • Commonly used HTTP requests are GET and POST.
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容