CSS Prepare

optional · CSS study notes

🗄️ OLD — User Interfaces & Major Software Issues (consolidated)

⚠️ SUPERSEDED: This page's content has been split into individual topic pages matching the exact textbook outline. See the main P-I.I. Introduction to Computing index for the current granular pages. Keeping this only for reference.


CSS Computer Science (Optional) — Paper-I, Section-A, Topic I (Introduction to Computing). Covers: User Interfaces, Application Program Interface (API).

User Interfaces (UI)

A user interface is the point of interaction between a human and a computer system — the means by which the user gives commands and receives feedback.

Types of User Interfaces

  • Command Line Interface (CLI): users type text commands to interact with the system (e.g., cd, dir, ls). Precise, scriptable, and resource-light, but requires memorizing exact syntax — steeper learning curve.
  • Graphical User Interface (GUI): users interact via visual elements — windows, icons, menus, pointers (the "WIMP" model). Intuitive and easy to learn, but generally more resource-intensive than CLI (e.g., Windows, macOS desktop).
  • Menu-Driven Interface: users select options from a displayed list/menu rather than typing free-form commands — common in ATMs, kiosks, older phone systems.
  • Touch/Gesture Interface: users interact by directly touching the screen — tapping, swiping, pinching (smartphones, tablets, modern ATMs).
  • Voice User Interface (VUI): users interact through spoken commands, processed via speech recognition (Siri, Alexa, Google Assistant).
  • Natural Language Interface: accepts input in ordinary human language (spoken or typed) and interprets intent, rather than requiring fixed command syntax — increasingly common with AI-based assistants.
  • Batch Interface: no real-time interaction; a set of jobs/commands is submitted together and processed without user intervention during execution — used in large-scale, non-interactive data processing.

Comparison: CLI vs GUI

AspectCLIGUI
InteractionTyped text commandsVisual elements (icons, menus, pointer)
Learning curveSteeper — must know exact syntaxEasier — discoverable through visual cues
Speed for expertsFaster (scriptable, batchable)Slower for repetitive tasks
Resource usageLightweightHeavier (graphics rendering)
ExampleTerminal/Command PromptWindows/macOS desktop

Application Program Interface (API)

An API is a defined set of rules, protocols, and tools that allows one piece of software to communicate with another — it specifies how software components should interact, without exposing the internal implementation details of either side.

Key Characteristics

  • Acts as a contract: defines what requests can be made, what data format to use, and what responses to expect
  • Abstraction: the calling program doesn't need to know how the API's underlying function works internally — only what it does and how to call it
  • Enables modularity and reuse: developers can build on existing services (e.g., a weather API) instead of building that functionality from scratch

Common Types of APIs

  • Web APIs: accessed over the Internet using HTTP, typically returning data in JSON or XML (e.g., a weather service API, a payment gateway API)
  • Operating System APIs: allow applications to request services from the OS (e.g., file access, memory allocation, display rendering) — e.g., the Windows API
  • Library/Framework APIs: the set of functions/classes a programming library exposes for use by other code (e.g., a graphics library's drawing functions)
  • REST API: a widely used web API design style based on standard HTTP methods (GET, POST, PUT, DELETE) operating on resources identified by URLs

Why APIs Matter (Exam Angle)

  • APIs let independently developed software systems interoperate without either needing to know the other's internal source code
  • They are central to modern software architecture — mobile apps, websites, and cloud services are largely built by combining calls to multiple APIs
  • A good API design principle: expose only what's necessary, hide internal complexity (information hiding — same principle as encapsulation in OOP)

MCQ Traps

  • CLI is not "outdated" — it remains faster and more scriptable than GUI for expert/repetitive tasks; the exam sometimes frames CLI as strictly inferior, which is a trap.
  • An API is not software itself — it's a specification/interface for software to communicate; don't confuse it with an application.
  • REST API operates over HTTP using standard methods (GET/POST/PUT/DELETE) — a commonly tested detail.
  • Batch interfaces have no real-time interaction — distinguishes them clearly from CLI/GUI, which are interactive.

Self-Test Questions

  1. List four types of user interfaces and give one real-world example of each.
  2. Compare CLI and GUI on learning curve and resource usage.
  3. Define an API and explain why abstraction is central to its purpose.
  4. Name one type of API and one HTTP method commonly used in a REST API.