sameer fakhoury
  • Home
  • CTF Writeups
  • Course Summaries
  • Cyber Reports
  • Articles
  • Event Notes
  • About Me
summary web programming introduction to web programming chapters (1)

summary web programming introduction to web programming chapters (1)

internet

  • Internet
    • millions of computers connected together in some way
    • example of devices ( phone lines , modems )
    • they can share information.
    • one big network of computers.
  • The physical structure of the Internet uses
    • fiber-optics cables, satellites, phone lines, and other telecommunications media that send data back and forth.
    • internet → network of networks
    • devices → PC - smart phones - modems - smart cars
    • structure → wired - wireless
  • the internet is
    • content providers ( web pages ) → servers
    • end users → client

www

  • World Wide Web → a collection of electronic documents that are linked together like a spider web
  • these documents are stored on computers called servers located around the world
  • Web has evolved into
    • a global electronic publishing medium
    • and increasingly → a medium for conducting electronic commerce.
  • website → static content - web application → dynamic content

web page

  • web page → an electronic document written in a computer language called HTML (Hypertext Markup Language)
  • Web pages can contain
    • text, graphics, video, animation, sound
    • as well as interactive features → such as data entry forms.
      • examples of interactive features → entering data → users enter data ( as login pages )
  • Each page has a unique address known as a URL (Uniform Resource Locator) → which identifies its location on the server.
    • URL → is the path to access a certain web page → every webpage have a unique URL
    • location of the URL → form the address bar

website

  • website → is multiple web pages that are saved in directory's and sub directory's
  • is there any limitation of web pages number ?
    • yes → and the number of web pages depend on the storage space of the server
  • A website → is one or more web pages that relate to a common theme, such as a person, business, organization, or a subject, such as sports.
  • The first page is called the home page → which acts like an index, indicating the content on the site.
  • From the home page → you can click hyperlinks to access other web pages.
  • small summary’s
    1. Webpage (home) is a specific page within a website; Website URL is the web address for the entire site.
      • The website URL is usually the same as the home page, but if it's not, it could be the URL of another important page on the site.
    2. A hyperlink is a clickable element on a webpage, and a URL specifies the web address.
    3. "www" is a subdomain, and "http" ( hyper text transfer protocol ) or "https" are part of a URL.
  • The development and maintenance of web pages → in order
    1. plan a website → ( targets - recourse - goal - budget )
    2. analyze and design a web site → the place where we put the security principles
      • example : least privilege's - check user input - isolation
    3. create a website
    4. deploy a web site → deploy to let the website available to public
    5. maintain a website → maintain is process of keeping a website up-to-date and running smoothly as well as performing optimally
      • plan → analyze and design → create → deploy → maintain
  • types of web sites
    • Portal - News - Informational - Business/Marketing - Wiki - Online Social Network - Educational - Entertainment - Web Application - Personal
  • Internet and web programming technologies are designed to be → portable
  • portable → allowing you to design web pages and applications that run across an enormous range of Internet-enabled devices
    • Client-side programming technologies → are used to build web pages and applications that are run on the client (in the browser on the user's device).
    • Server-side programming → the applications that respond to requests from client-side web browsers, such as :
      • searching the Internet - checking your bank-account balance - ordering a book from Amazon

HTML

  • HTML (Hypertext Markup Language) → is a special type of computer language called a markup language designed to :
    • specify the → content and structure of → web pages (also called documents) in a portable manner.
  • HTML5, now under development → is the emerging version of HTML.
  • HTML enables you to → create content that will render appropriately across the extraordinary range of devices connected to the Internet, including :
    • smartphones, tablet computers, notebook computers, desktop computers, special-purpose devices such as large-screen displays at concert arenas and sports stadiums, and more.
  • important for the exam → portable manner → run on multiple platforms OS ( Linux - iOS - etc. ) and devices
  • browser → is the client → to see the webpages of a website

CSS

  • Cascading Style Sheets (CSS) → are used to specify the presentation or styling of elements on a web page (fonts, spacing, sizes, colors, positioning).
    • CSS was designed to style portable web pages independently of their content and structure.
    • By separating page styling from page content and structure → you can easily change the look and feel of the pages on an entire website.
    • CSS3 → is the current version of CSS under development.
  • HTML5 → the structure - content of the website
  • CSS → the styling - design - presentation of the webpage
    • Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents → one design will be imported to all the other pages not as HTML the require designing for each page
      • example : I have 1000 pages → I want red color the update using CSS will be applied to all the pages at once - in HTML will be applied one by one
  • Although HTML5 provides → some capabilities for controlling a document's presentation, it's better not to mix presentation with content.

JavaScript

  • JavaScript → helps you build dynamic web pages (pages that can be modified "on the fly" in response to events → such as user input, time changes, and more) and computer applications.
    • enables you to do the client-side programming of web applications.
    • JavaScript was created by Netscape.
    • JavaScript is a portable scripting language.
    • Programs written in JavaScript can run in web browsers across a wide range of devices.
  • JavaScript → interactive website ( entre values - retrieve values ) - dynamic web pages

W3C

  • World Wide Web Consortium (W3C) was founded → In October 1994
    • Goal of W3C → is to make the Web universally accessible regardless of disability, language, culture.
    • W3C → Standardization Organization.
    • Web technologies standardized by W3C are called → Recommendations.
      • Recommendations include → Hypertext Markup Language 5 (HTML5), Cascading Style Sheets 3 (CSS3), and the Extensible Markup Language (XML).
  • W3C → responsible for → HTML - CSS - XML
    • to be more compatible between between nations and devices
  • Extensible Markup Language (XML) lets you define and store data in a shareable manner. XML supports information exchange between computer systems such as websites, databases, and third-party applications. → tags
  • CSV (comma-separated values) file is a text file that has a specific format which allows data to be saved in a table structured format. → comma
  • what is the needed for the web
    • personal computer.
    • Web browser → software to access the Web.
    • connection → to an Internet service provider (ISP).
    • Servers → to host the data.
    • Routers and switches → to direct the flow of data.
  • There are three main ways to move between web pages or websites:
    • Clicking a text hyperlink.
    • Clicking a hyperlinked graphic image → such as a button, photograph, or drawing.
    • Typing the URL of a web page in the location box (also known as → the address field) of your web browser and then pressing the Enter or Return key.
  • how the web pages works
    • Web pages are stored on web servers located around the globe.
    • Entering the (Uniform Resource Locator) URL of a web page in your web browser or clicking a link sends a request to the server which hosts the page.
    • The server sends the web page to your computer, and your web browser displays it on your screen.
  • The Web is a client/server application → Web browsers are → clients which send requests to Web servers → which send responses back.
    • Different browsers → Microsoft Internet Explorer, Netscape, lynx (UNIX).
    • Although browsers share a common set of features, each browser might render pages differently.
  • browser is a client that will request the content
  • browser use client-server communication
  • note: Peer-to-Peer (P2P) Service? A peer-to-peer (P2P) service is a decentralized platform whereby two individuals interact directly with each other, without intermediation by a third party

URL

  • Uniform Resource Locators (URLs) are used to identify Web pages → basically a URL is a web address.
  • URLs have 3 components:
    • A Prefix → (usually http://) → data transfer protocol → required to request to the server
    • A Hostname → (such as www.cityu.edu.hk) → identify the computer in the internet
    • A Path → (such as /scm/index.htm) → identify the file in hierarchal directory structure on the server

IP - DNS

  • Every computer connected to the Internet must have a → unique IP address, no matter whether → it's a client or a server (or both).
  • An IP address → is just a number that identifies a host on the Internet.
    • Example: 212.171.218.34 or 144.214.5.218
  • The Domain Name System (DNS) → is a database that matches IP addresses to host names.
  • the Domain Name System (DNS) translates host names into IP addresses, which are then used by TCP to establish connections between HTTP clients and servers.
  • Domain names are administered in such a way that they are guaranteed to be unique.
  • Domain names are organized in a → hierarchical structure.

top - second - third level domain

  • www.apple.com
  • Top-level domain → country domains → important for exam
    • .com - Commercial, .net - Network, .gov - Government, .edu - Education, .co - Company, .jo - Jordan, .us - United States, .uk - United Kingdom, .ca - Canada, .au - Australia, .de - Germany.
    • .com → generic Top level domain gTDL
  • second level domain → actual name of the organization or service → contains : letter - 0 to 9 - dashes ( - ) → apple
  • third level domain → strings of character that designate different hosts within second level domain or services
    • www → core - main website
    • sweb.cityu.edu.hk → sweb → sub network within the cityu

TCP / IP

  • TCP → transitions Control Protocol
  • Messages are sent → are made up of packets which include sender IP and destination IP.
  • IP address internet protocol → every machine has a unique IP address.
  • FTP: File transfer protocol
  • SMTP: simple mail transfer protocol
  • NNTP: network news transfer protocol
  • HTTP: Hypertext Transfer protocol

©sameer fakhoury

GitHubLinkedIn