ITE Unit-1&2 Notes

Impact-Site-Verification: 9cefdf4c-3601-47f5-9d31-d148d59533c3

https://docs.google.com/document/d/1Fnr9rnKJhOb2hmu0E6zNYBwbjNJ0tWQL/edit?usp=sharing&ouid=112711162618141236570&rtpof=true&sd=true







 INFORMATION TECHNOLOGY ESSENTIALS NOTES SEMESTER II


UNIT I: WEB ESSENTIALS

1. Website Creation and Management

A website is a collection of web pages (documents using HTML, CSS, JavaScript) grouped under a single domain name to achieve a specific task.

Key Steps for Website Creation:

  • Design and Hosting: Create the pages, convert images (preferably JPEG or GIF), and choose a web hosting service to make the site available on a web server via a URL.
  • Domain Name: Register a domain name, which is an alias managed by ICANN that points to the website's location.
  • Planning: Determine the site type (e.g., news, e-commerce), plan clear navigation (create a sitemap), and strategize high-quality content.
  • Uploading: Publish files to the web server using File Transfer Protocol (FTP).
  • Testing: Perform continual testing, checking consistency across multiple browsers, different operating systems, various screen sizes, download speeds, link validation, and security vulnerabilities.

Website Development Phases:

  • Strategy: Determine objectives and prepare creative briefs.
  • Design: Creative team designs the user interface (front-end); technical team designs the database architecture (back-end).
  • Production: The actual site is built with source code; changes requested by the client result in change orders.
  • Testing: A QA manager uses a test plan to thoroughly test all features and functionalities before launching.


2. Networking Fundamentals

  • IP Addressing: A unique 32-bit logical address assigned to a host on a TCP/IP network for communication.
  • DNS (Domain Name System): Translates human-readable domain names (e.g., www.example.com) into hard-to-remember IP addresses, following a hierarchical structure.
  • URL (Uniform Resource Locator): The unique address used to access a resource over the internet. URLs can be Absolute (specifying the exact location) or Relative (specifying location relative to the current directory).


3. HTTP Protocol

HTTP (Hyper Text Transfer Protocol) is the communication protocol between the web browser and web server.

  • Model: It follows a request-response model.
  • Stateless: HTTP is a stateless protocol; it cannot remember previous user information or visits to a particular website.
  • Request/Response: Messages consist of a start line, header fields, a blank line, and a message body. The status line in the response includes the status code (e.g., 200 OK, 401 Unauthorized).
  • Caching: HTTP includes cache control, allowing browsers to store recently visited pages to improve system performance.


4. Web Browser and Server Types

A web browser is client software that requests web documents from a server and displays them in a formatted way.

Browser Architecture:
Components include the User Interface, Browser Engine, Rendering Engine (which interprets HTML/XML/JavaScript to create the layout), Networking (handles protocols like HTTP/FTP and security), JavaScript Interpreter, UI Backend, and Data Persistence (stores bookmarks, cookies, preferences).

Types of Servers:

  • Web Server: Delivers web pages and handles HTTP requests (e.g., Apache, IIS).
  • Database Server: Dedicated to database storage and retrieval, running the DBMS (e.g., MySQL, Oracle). It processes SQL requests from clients.
  • Application Server: Provides the business logic in a distributed network, often seen as the middle tier in a three-tier structure (e.g., JBoss, GlassFish).


5. Authoring Tools

These are software packages used to create and package web or multimedia content. Examples include Macromedia Flash and Adobe Dreamweaver. Features include programming support, interactive controls, editing/organizing features (like storyboards), and cross-platform compatibility.


UNIT II: SCRIPTING ESSENTIALS

1. Scripting Languages Overview

Scripting languages are programming languages designed for integrating and communicating with other programs. They are generally interpreted and easier to learn than compiled languages.

  • Client Side: Runs on the user's browser (e.g., HTML, JavaScript). Used for creating interactive web pages.
  • Server Side: Runs on the web server (e.g., PHP, ASP). Used to generate dynamic HTML pages, process user requests, and access databases.


2. PHP: Syntax and Fundamentals

PHP (Hypertext Pre-processor) is a popular server-side scripting language, primarily used for form handling and database access.

  • Working: The PHP processor interprets PHP code (enclosed in <?php and ?>) on the server and sends only the resulting output (alongside XHTML) to the browser, hiding the original PHP script.
  • Variables: PHP is dynamically typed; variables start with the $ sign. They are local by default, requiring the global keyword to access outer scope variables within a function.
  • Data Types: PHP supports scalar types: Integer, Double, String, and Boolean (TRUE/FALSE).
  • Constants: Defined with the define() function to hold fixed values that cannot be altered.


3. Operators and Flow Control

PHP includes standard operators and control structures:

  • Operators: Arithmetic (+, -, *), Logical (AND/&&, OR/||), Relational (==, !=), and String concatenation (.). The identity operator (===) checks both value and type.
  • Selection: if, if...else, if...elseif...else, and switch statements.
  • Loops: for, while, and do-while. The break statement terminates a loop, while continue skips the current iteration.


4. Arrays

Arrays hold collections of elements, potentially of mixed types, indexed by a key and a value.

  • Types: Indexed Array (numeric index) and Associative Array (named keys).
  • Functions: Includes count() (counts elements), sort() (sorts by value, reassigns keys), asort() (sorts by value, keeps keys), and ksort() (sorts by keys, keeps values). explode() splits a string into an array.
  • Iteration: Elements can be accessed sequentially using current() and next(), or iterated over using each() and foreach().


5. Functions

Functions are reusable blocks of code.

  • Parameter Passing: By default, parameters are passed by value. To pass by reference (allowing changes within the function to affect the original variable), the & symbol must be used in the function's parameter definition.
  • Static Variables: Using the static keyword ensures a variable retains its value across multiple calls to the same function (lifetime ends only when the script terminates).


6. File Handling

PHP provides robust file handling capabilities:

  • Access: fopen() opens a file in a specified mode (r, w, a, etc.). fread() and fgets() read content, while fwrite() writes content.
  • Locking: flock() prevents conflict problems by applying shared (LOCK_SH) or exclusive (LOCK_EX) locks when multiple scripts access the same file simultaneously.
  • File Operations: copy(), rename() (for moving), and unlink() (for deleting) are supported.


7. Form Handling

PHP collects submitted HTML form data using superglobal arrays:

  • $_GET: Used when method="get" is specified. Data is visible in the URL and has size limits.
  • $_POST: Used when method="post" is specified. Data is invisible in the URL and has a larger capacity, making it suitable for sensitive or large amounts of information.


8. PHP and MySQL Integration

PHP and the open-source MySQL database are commonly combined to create dynamic, cost-effective, and stable web solutions.

Database Operations:

  • Connecting: mysql_connect() establishes the link to the server, and mysql_select_db() selects the specific database.
  • Querying: mysql_query() executes SQL commands (e.g., CREATE TABLE, INSERT, SELECT, UPDATE, DELETE).
  • Retrieval: For SELECT queries, mysql_query() returns a result handle. The data is then extracted row by row using mysql_fetch_array().
  • Metrics: mysql_num_rows() counts rows in a result set, and mysql_affected_rows() indicates how many rows were modified by an operation like INSERT or UPDATE.


9. Cookies

A cookie is a small file embedded by the server on the user's machine to identify the user, typically consisting of a name and a textual value.

  • Setting: PHP uses setcookie() to create a cookie.
  • Retrieving: Cookies are retrieved using the superglobal array $_COOKIE.

Comments