Ch. 01 Lab-02 Chapter 02 · Types of Applications

Introduction to Software Engineering · Chapter 02

Types of Applications

Different kinds of software face different constraints. This chapter classifies applications and shows how the type of an application drives its architecture, its quality attributes and how it is delivered.

ISO/IEC 25010:2023 SWEBOK Guide v4.0 C++20 · HTTP · Mermaid Case study: ITC Club Hub

Navigate with ← → · Space next · Home/End · G jump to slide · O overview · F fullscreen
Hover the bottom of the screen to reveal the navigation panel.

Agenda

What we will cover

      Click any item to jump directly to that topic.

      Introduction

      One problem, several kinds of users: why the type of application matters

      • In Lab-01 your team wrote the problem statement for ITC Club Hub and listed its stakeholders. Before we write requirements (Chapter 05) we must decide what kind of software it is.
      • Students use phones anywhere on campus; organisers check people in at the door of a room with weak Wi-Fi; administrators prepare reports on a desktop.
      • The type of application decides three things early: where the code runs (architecture), which qualities matter most (availability, speed, security...), and how the software reaches users (browser, app store, installer).
      • Changing the type late is expensive: it is close to a rewrite of the user-facing part.
      SWEBOK Guide v4.0 treats this under Software Architecture and Software Quality: architecture decisions are driven by quality requirements, not only by features.
      Studentsphones, anywhere Organisersdoor phone, poor Wi-Fi Administratorsdesktop browser, office ITC Club Hubone core: clubs, events,registrations, check-in Where does code run?architecture, tiers Which qualities matter?availability, speed, security How is it delivered?browser, app store, installer the application type answers all three questions

      Topic 1

      System software versus application software: the software stack

      • System software runs and manages the computer itself and offers services to other programs: firmware, the operating system kernel, device drivers, runtimes, compilers and utilities.
      • Application software helps a person or an organisation do a task: chat, learning, banking, games, Club Hub.
      • Each layer only talks to the layer below through a defined interface: an application calls the OS through system calls (open a file, send a packet); the OS talks to hardware through drivers.
      • System software must be fast, small and extremely reliable, because every application above it depends on it. That is why it is mostly written in C, C++ and, more and more, Rust.
      Firmware is software stored in a device's non-volatile memory (UEFI in a PC, the code in a washing machine or an ABS unit). It is the first code to run when power is applied.
      ApplicationsClub Hub, Telegram, Moodle, a game, a word processor Runtimes, libraries and utilitiesC++ standard library, JVM, browser engine, compilers, shell Operating system kernelprocesses, memory, files, network, security Device driversWi-Fi, GPU, printer FirmwareUEFI or BIOS, SSD controller, microcontroller code HardwareCPU, memory, storage, sensors, network card Applicationsoftware Systemsoftware not software system calls godown; resultscome back up

      Topic 1

      Worked example: where C++ is used, and where other languages win

      DomainTypical languagesWhy that choice
      Embedded and firmwareC, C++, RustNo OS or a tiny one, kilobytes of RAM, direct access to hardware registers, predictable timing.
      Games and game enginesC++ (Unreal Engine), C# for Unity scriptsA frame must be ready every 16.7 ms; no garbage-collector pauses; control over memory layout.
      Systems softwareC, C++, RustBrowsers, databases, compilers and OS components need speed and control of every byte.
      Performance-critical librariesC++ core, Python bindingsMachine-learning and image libraries run C++ underneath while users write Python on top.
      Web front endsJavaScript, TypeScriptThe browser runs JavaScript; C++ only through WebAssembly for special cases.
      Enterprise back endsJava, C#, Go, PythonBig frameworks, fast development, memory safety through garbage collection.
      Mobile appsKotlin, Swift, DartThe platform SDKs and UI toolkits are built for these languages.
      Data analysis and AIPython, SQL, RProductivity and libraries matter more than raw speed of your own code.
      • C++ is chosen when you need zero-overhead abstractions, predictable timing and direct hardware access.
      • The price: memory safety is the programmer's job (use RAII, std::vector, std::string, smart pointers, no raw new/delete), builds are slower, and there are fewer ready-made web and mobile frameworks.
      • Most real products mix languages: a C++ engine with a scripting language on top, or a Java back end calling a C++ library.
      Club Hub in this course: we implement the core (domain model and business rules) in C++20 with a command-line front end, and model the web and mobile front ends. A production team would probably pick a web stack for the front ends; the Software Engineering course builds one in Java.
      "Which language is best?" has no answer without an application type and its quality attributes.

      Topic 2

      Desktop, web and mobile applications: where does the code run?

      • Desktop application: installed on the user's computer; interface, logic and often the data all run locally. Works offline and uses the full hardware. Updates need an installer or an update service. Examples: VS Code, a spreadsheet, most PC games.
      • Web application: runs in a browser; nothing to install. The server holds the logic and the shared data, so one deployment updates every user at once. Needs a network. Examples: Moodle, web mail.
      • Mobile application: installed on a phone, usually from an app store. Uses the camera, GPS and push notifications, keeps a local cache, and talks to a back-end API over a network that comes and goes. Examples: Telegram, a banking app.
      • Many products are all three at once, sharing one back end: Telegram has desktop, web and mobile clients.
      Desktop Web Mobile User's PC (Windows, macOS) UI + logic + data installed program (.exe, .app) works offline, full hardware Browser on any device UI only HTML, CSS, JavaScript nothing to install Phone (Android, iOS) UI + local cache camera, GPS, push messages installed from an app store updates, sync HTTPS: everyclick, every page JSON over HTTPS,sometimes offline Optional serverupdates, licences, cloud sync Web serverlogic + database, one deployment Back-end APIlogic + shared data green: where most of the code runs

      Topic 2

      Web applications: multi-page (MPA) versus single-page (SPA)

      sequenceDiagram
        actor S as Student
        participant B as Browser
        participant W as Web server
        Note over S,W: Multi-page app: every action loads a whole new page
        S->>B: click Events
        B->>W: GET /events
        W-->>B: 200 full HTML page
        S->>B: click Register
        B->>W: POST /events/E001/registrations
        W-->>B: 303 redirect, then a full HTML page
        Note over S,W: Single-page app: load the app once, then exchange data
        B->>W: GET /app
        W-->>B: 200 app shell: HTML + JavaScript bundle
        S->>B: click Register
        B->>W: POST /api/registrations with JSON
        W-->>B: 201 JSON: status Registered
        B->>B: JavaScript updates only the button
      
      MPASPA
      Server returnsHTML pagesJSON data (after the first load)
      First loadfast, smallslower: JavaScript bundle
      Next clicksfull reloadinstant, partial update
      Search engineseasy to indexneeds server-side rendering
      Offlinenopossible (see PWA)
      Complexitymostly on the servermuch logic in the browser
      Examplesnews sites, Moodle pagesweb mail, Google Maps
      An SPA and a mobile app can call the same JSON API. That is one reason teams separate the back end from every front end.

      Topic 2

      Worked example: the same idea as a console program and as an HTTP exchange

      Console program: one process, one user, output is text for a human.

      // list_events.cpp: the whole application runs in one process
      #include <iostream>
      #include <string>
      #include <vector>
      
      struct EventRow {
          std::string title;
          std::string start;
          int seatsLeft;
      };
      
      int main() {
          const std::vector<EventRow> events{
              {"Robotics Workshop", "2026-10-14 14:00", 12},
              {"Debate Night", "2026-10-16 18:00", 0},
          };
          for (const auto& e : events) {
              std::cout << e.start << "  " << e.title << "  ("
                        << e.seatsLeft << " seats left)\n";
          }
      }
      $ ./list_events
      2026-10-14 14:00  Robotics Workshop  (12 seats left)
      2026-10-16 18:00  Debate Night  (0 seats left)

      Web or mobile: a client sends a request over the network; the server answers with data.

      GET /api/events?from=2026-10-01 HTTP/1.1
      Host: clubhub.example.edu
      Accept: application/json
      User-Agent: Mozilla/5.0 (Linux; Android 15; Mobile)
      
      HTTP/1.1 200 OK
      Content-Type: application/json
      Cache-Control: max-age=60
      
      [
        {"id": "E001", "title": "Robotics Workshop",
         "start": "2026-10-14T14:00+07:00", "seatsLeft": 12},
        {"id": "E002", "title": "Debate Night",
         "start": "2026-10-16T18:00+07:00", "seatsLeft": 0}
      ]
      • The loop moved to the server; the output became data (JSON), and each client decides how to display it.
      • The network adds new concerns: latency, failures and retries, many users at once, HTTPS, authentication, versioning of the API.
      • Status codes carry meaning: 200 OK, 201 created, 400 bad input, 404 not found, 503 server unavailable.

      Topic 2

      Mobile applications: native, cross-platform or progressive web app

      Native Cross-platform Progressive web app Kotlin code Swift code Android SDK iOS SDK Android phone iPhone one Dart or JavaScript codebase engine: Flutter, React Native Android phone iPhone one web codebase: HTML, CSS,JavaScript + service worker browser engine any device with a browser 2 codebases, 2 store releases full device access, best speed 1 codebase, 2 store releases near-native, plugins for devices 1 codebase, no store needed install from a link, offline cache cost and reach improve to the right; device access and platform feel improve to the left
      NativeCross-platformPWA
      LanguagesKotlin (Android), Swift (iOS)Dart (Flutter), JS/TS (React Native), C# (.NET MAUI)HTML, CSS, JS/TS
      Distributionapp stores, reviewapp stores, reviewa URL, "Add to home screen"
      Device accesseverythingmost, via pluginscamera, location, Web Push; less on iOS
      Offlinelocal databaselocal databaseservice worker cache + IndexedDB
      Updatesstore release, users updatestore releaseinstant on next load
      Team skillstwo specialistsone frameworkweb developers
      A progressive web app is a web app with a manifest (name, icon: installable) and a service worker (a script that intercepts network requests, so the app can answer from a cache when offline). It is served over HTTPS.

      Topic 2

      Worked example: Club Hub as a native app, a PWA or a responsive web app

      Criterion (weight)Native apps (Android + iOS)PWAResponsive web app
      Cost for a 5-person team, one semester (3)3 front ends: 2 apps + web admin. 11 codebase + offline work. 41 codebase. 5
      Reach: every student, no install (3)only those who install. 3a link in the club chat, installable. 5a link, any browser. 5
      Offline check-in at the door (2)local database. 5service worker + IndexedDB queue. 4needs a connection. 1
      Event reminders (1)push notifications. 5Web Push; on iOS only when installed. 3e-mail only. 2
      QR scanning with the camera (1)full camera API. 5camera in the browser. 4camera in the browser, online only. 3
      Weighted total (max 50)3 + 9 + 10 + 5 + 5 = 3212 + 15 + 8 + 3 + 4 = 4215 + 15 + 2 + 2 + 3 = 37

      Scores 1 (poor) to 5 (excellent), multiplied by the weight. Weights come from the stakeholders: here reach and cost matter most.

      • The PWA wins with these weights. If the club office required reminders that always arrive on iPhones, native would gain; if the venues had good Wi-Fi, the plain responsive web app would be enough.
      • One application does not have to be one type: administrators can use the same web app on a desktop browser with a wider layout.
      • Whatever the front end, the core rules (capacity, no double registration, 24-hour cancellation) live in one place behind an API. In this course that core is your C++ code.
      A weighted matrix supports a decision; it does not make it. Always check the winner against the one criterion that would be a deal-breaker (here: check-in must work without Wi-Fi).

      Topic 3

      Enterprise systems: ERP, CRM and information systems

      • An information system is people, processes, data and software that together support an organisation, for example a university's student information system.
      • ERP (enterprise resource planning) is a suite of integrated modules (finance, HR and payroll, procurement, inventory) that share one database, so a purchase immediately appears in the accounts. Examples: SAP S/4HANA, Odoo.
      • CRM (customer relationship management) tracks leads, customers, sales and support tickets. Example: Salesforce.
      • Typical traits: hundreds of users with roles and permissions, audit trails, a life of 10 to 20 years, and more integration and configuration work than new code.
      • Dominant qualities: security, data integrity, interoperability, maintainability.
      Club Hub is small, but it already has the enterprise shape: it reads the ITC student directory and sends mail through an e-mail service. You will draw these in the Lab-02 context diagram.
      flowchart TD
        WEB[Online shop] -- orders via API --> CRM[CRM: customers, sales, support]
        CRM -- confirmed order --> INV
        CRM -- customer master data --> FIN
        subgraph ERP[ERP suite: one shared database]
          INV[Procurement and inventory] -- goods delivered, invoice --> FIN[Finance and accounting]
          HR[HR and payroll] -- salary costs --> FIN
        end
        HR -- staff accounts --> IAM[Directory and single sign-on]
        FIN -- nightly export --> BI[(Data warehouse and dashboards)]
        INV -- stock levels --> BI
      

      Topic 4

      Embedded and real-time systems: sense, decide, act before the deadline

      Wheel-speed sensorsense ECU controllerdecide: slip > 20 %? Brake valveact: hold or release Wheel and brakethe physical process period 5 ms: the whole loop must finish before the next tick runrunrunoverrun deadline missed 0 ms5101520
      In a real-time system correctness depends on the result and on the time it is delivered. A braking decision that arrives late is a wrong decision.
      #include <chrono>
      #include <thread>
      
      using namespace std::chrono_literals;
      using Clock = std::chrono::steady_clock;
      
      // Sense, decide, act: once every 5 ms, forever
      void controlLoop(const WheelSensor& sensor, BrakeValve& valve,
                       FaultLog& log) {
          constexpr auto period = 5ms;
          auto deadline = Clock::now() + period;
          for (;;) {
              const double slip = sensor.slipRatio();
              // wheel about to lock: release pressure briefly
              valve.set(slip > 0.20 ? Valve::Release : Valve::Hold);
              if (Clock::now() > deadline) {
                  // a late answer is a wrong answer
                  log.deadlineMissed();
              }
              std::this_thread::sleep_until(deadline);
              deadline += period;
          }
      }
      • steady_clock never jumps (unlike the wall clock), so it is the right clock for periods and deadlines.
      • An embedded system is a computer inside a larger device with one dedicated job, little memory and often no screen. Real ECUs run this loop on a real-time OS or bare metal, not on std::thread; the idea is the same.
      • No heap allocation, no exceptions and no unbounded loops inside the period: timing must be predictable.

      Topic 4

      Hard, firm and soft real-time, and the Internet of Things

      KindA missed deadline meansExample
      Hard real-timesystem failure, possibly harmABS brakes, airbag, pacemaker
      Firm real-timethe late result is useless, but no harma sensor sample, a video frame in a live call
      Soft real-timequality drops graduallymusic streaming buffer, a game at 50 instead of 60 fps
      • The Internet of Things (IoT) connects embedded devices to the network so that their data reaches cloud services and apps: smart meters, room sensors, parking sensors.
      • New concerns appear: battery life, unreliable radio links, remote firmware updates (OTA, over the air) and security of thousands of devices that nobody patches by hand.
      • Dominant qualities: safety, reliability, timing, energy efficiency, security.
      Devicessensors, actuatorsC or C++ firmware Edge gatewayfilter, aggregate,buffer when offline Cloud platformingest, store,rules, alerts Dashboardweb ormobile app radioBLE, LoRa MQTT, TLS HTTPS commands and firmware updates (OTA) flow back one IoT product is really three applications: embedded firmware, a cloud back end and a user app

      Topic 5

      Cloud applications and software as a service: who manages what?

      On-premises IaaS PaaS SaaS Application you you you provider Data you you you provider Runtime you you provider provider Middleware you you provider provider Operating system you you provider provider Virtualisation you provider provider provider Servers you provider provider provider Storage you provider provider provider Networking you provider provider provider you manage the provider manages
      ModelYou rentExamples
      IaaS infrastructurevirtual machines, disks, networksAWS EC2, Azure Virtual Machines, a VPS
      PaaS platforma place to run your codeAzure App Service, Google App Engine, Heroku
      SaaS softwarea finished applicationGmail, Microsoft 365, Zoom, Salesforce
      • A cloud application runs on rented, elastic infrastructure: capacity grows and shrinks with demand, and you pay for what you use.
      • SaaS products are multi-tenant (one installation serves many customer organisations, each isolated), paid by subscription and updated continuously.
      • Short calculation (illustrative prices): a small VM at 0.02 USD per hour runs 730 hours a month: 0.02 × 730 = 14.60 USD per month, with no hardware to buy.
      In every model you still own your data, user accounts and configuration. A leaked password is never the provider's fault.

      Topic 6

      Data-intensive and AI-enabled applications

      flowchart TD
        A[Sources: apps, sensors, logs] --> B[Ingest: batch or stream]
        B --> C[(Storage: database, data lake)]
        C --> D[Process: clean, join, aggregate]
        D --> H[Reports and dashboards]
        D --> E[Train and evaluate a model]
        E --> F[Serve the model behind an API]
        F --> G[App feature: search, recommendation, chat]
        G -. usage data .-> A
        F -. monitor accuracy and drift .-> E
      
      • A data-intensive application is limited by the amount, speed or variety of its data rather than by CPU: a bank ledger, a video platform's view counts, a university's exam results over 20 years.
      • An AI-enabled application has behaviour learned from data instead of written as rules. Its output is probabilistic, so it needs evaluation data, monitoring after release and a fallback when the model is wrong.
      • Dominant qualities: scalability, data quality, privacy, explainability, cost of computing.
      A possible Club Hub extension: "recommend events based on the clubs a student attended". It needs attendance history, which is personal data: Chapter 03 asks whether you may use it.

      Topic 6

      Games: a soft real-time application built around a loop

      #include <chrono>
      
      using namespace std::chrono_literals;
      using Clock = std::chrono::steady_clock;
      
      // Classic game loop: fixed-step simulation, render as often as possible
      void run(Game& game) {
          constexpr std::chrono::milliseconds step = 16ms;
          auto previous = Clock::now();
          Clock::duration lag{};
          while (game.running()) {
              const auto now = Clock::now();
              lag += now - previous;
              previous = now;
              game.processInput();
              while (lag >= step) {
                  // physics and rules advance in 16 ms steps
                  game.update(step);
                  lag -= step;
              }
              // drawing must also fit in the frame budget
              game.render();
          }
      }
      TargetFrame budget = 1000 ms / fps
      30 fps (console, older phones)1000 / 30 = 33.3 ms
      60 fps (typical)1000 / 60 = 16.7 ms
      144 fps (gaming monitor)1000 / 144 = 6.9 ms
      • Input, game rules, physics, audio and drawing must all fit in the budget, every frame. Missing it causes stutter, not a crash: soft real-time.
      • Engines such as Unreal Engine are written in C++; gameplay is often scripted in a higher-level language on top.
      • Dominant qualities: performance, usability (fun), portability across PC, consoles and phones; for online games also availability and cheat-resistant security.

      Topic 7

      Client-server and multi-tier architecture basics

      • Client-server: many clients send requests; one shared server answers. Clients start the conversation; the server owns the shared data. Web, mobile and most enterprise systems work this way.
      • Three-tier splits the server side further:
        • presentation: shows data and collects input (browser page, mobile screen, CLI);
        • application (logic): business rules and workflows;
        • data: stores and retrieves data (database, files).
      • Each tier talks only to its neighbour. You can replace the presentation (add a mobile app) or the data store (CSV to a database) without touching the rules.
      • Tier usually means a separately deployed part (another machine or process); layer means a logical part of the code. A C++ program can have three layers in one process.
      Client-server Phone Laptop Tablet Servershared data clients request, the server responds Three-tier: ITC Club Hub Presentation tierPWA pages, admin web page, C++ CLI Application (logic) tierRegistrationService: capacity, 24 h rule Data tierdatabase, or CSV files in this course HTTPS + JSONor function calls SQL queriesor file reads

      Topic 7

      Three layers in C++: keep the core free of input and output

      // includes and the Event struct omitted
      namespace clubhub {
      
      // ---- data layer: an interface; CSV today, a database later
      class EventRepository {
      public:
          virtual ~EventRepository() = default;
          virtual std::vector<Event> findAll() const = 0;
      };
      
      // ---- logic layer: business rules, no console, no files
      class EventService {
      public:
          explicit EventService(const EventRepository& repo) : repo_{repo} {}
          std::vector<Event> upcoming(TimePoint now) const {
              std::vector<Event> result;
              for (const auto& e : repo_.findAll()) {
                  if (e.start > now) result.push_back(e);
              }
              return result;
          }
      private:
          const EventRepository& repo_;
      };
      
      } // namespace clubhub
      
      // ---- presentation layer: today a console, later a web or mobile UI
      void printUpcoming(const clubhub::EventService& service,
                         clubhub::TimePoint now) {
          for (const auto& e : service.upcoming(now)) {
              std::cout << e.title << '\n';
          }
      }
      • EventService never prints and never opens a file. The same class can serve the CLI, an HTTP handler that returns JSON, or a unit test.
      • EventRepository is an interface (a class with pure virtual functions). A CSV-backed version and a database-backed version can be swapped without changing the rules.
      • The presentation function only formats what the service returns.
      • Folder convention for Club Hub: include/clubhub/ for the core headers, src/ for their implementation, src/cli/ for the console front end.
      Test for a clean core: could you delete src/cli/ and still compile and test every business rule? In Lab-02 Task 5 you build exactly this split.

      Topic 8

      Quality attributes by application type

      Application typePerformanceAvailabilitySecurityUsabilityPortability
      Desktop toolMLMHM
      Public web appMHHHH
      Mobile appMMHHH
      Enterprise (ERP, CRM)MHHML
      Embedded real-timeHHMLL
      Cloud SaaSMHHHM
      GameHMMHH
      AI-enabledMMHML

      H = usually decisive, M = matters, L = rarely the driver. Typical values; a specific product can differ (an online bank's mobile app has H availability).

      • A quality attribute is a measurable property of the system (how fast, how often up, how secure, how easy), as opposed to a function (what it does).
      • Performance: response time and throughput. Availability: share of time the system is usable. Security: confidentiality, integrity, who may do what. Usability: how easily users reach their goal. Portability: how easily it runs on other platforms.
      • Qualities trade off: offline caching helps availability but makes security and consistency harder.
      ISO/IEC 25010:2023 is the standard quality model. Its 2023 edition names usability interaction capability, names portability flexibility, and adds safety. Chapter 09 uses it for quality assurance.

      Topic 8

      Two demands side by side: timing and availability

      quadrantChart
        title Quality demands by application type
        x-axis Low timing demand --> High timing demand
        y-axis Low availability demand --> High availability demand
        quadrant-1 Critical and fast
        quadrant-2 Always on
        quadrant-3 Best effort
        quadrant-4 Fast but tolerant
        ABS controller: [0.93, 0.93]
        Online banking: [0.55, 0.88]
        ERP: [0.35, 0.75]
        Moodle: [0.3, 0.62]
        Club Hub check-in: [0.62, 0.55]
        Mobile game: [0.82, 0.3]
        Text editor: [0.2, 0.15]
        Batch analytics: [0.3, 0.35]
      
      • Placing products on two axes makes a discussion concrete: "is our check-in really as critical as online banking?"
      • Club Hub check-in sits in the middle: a queue at the door is annoying, not dangerous, but it happens at a known peak moment (the start of an event).
      • Moodle needs high availability during exam weeks but little timing precision; a mobile game needs smooth frames but may be offline for maintenance.
      • Positions are judgements, not measurements. The next slide turns a judgement into a testable statement.

      Topic 8

      Worked example: quality attribute scenarios for Club Hub

      Source Stimulus Environment Artifact Response Responsemeasure who or what the event that happens which part, under which conditions what it does how we test it Bass, Clements and Kazman, Software Architecture in Practice
      QAS-01  Availability of registration
      Source       hosting fault (crash, restart of the VM)
      Stimulus     the Club Hub API process stops unexpectedly
      Environment  semester, Friday 18:00, registration peak
      Artifact     Club Hub API and its data store
      Response     failure detected, process restarted automatically;
                   clients show "try again in a minute";
                   no confirmed registration is lost
      Measure      service back within 5 minutes; monthly
                   availability >= 99.5 % (30 d x 24 h x 0.5 %
                   = 3.6 h downtime allowed); 0 lost records
      QAS-02  Performance of check-in at the door
      Source       organiser at the entrance
      Stimulus     scans a student's QR code to check in
      Environment  peak: 200 students arrive in 10 minutes,
                   one door, venue Wi-Fi at 1 Mbps
      Artifact     check-in (RegistrationService::checkIn)
      Response     status becomes CheckedIn, green tick shown,
                   duplicate scans are rejected with the reason
      Measure      95 % of check-ins confirmed within 1 s;
                   throughput >= 20 per minute per door
                   (200 / 10 min = 20/min, one every 3 s)
      "The system shall be fast and always available" is not a requirement: it has no measure and cannot be tested. Every scenario needs a number.

      Topic 9

      Platform constraints: browsers, app stores, devices, connectivity

      Your code Distribution Browser / OS Device Network store review: daysstore fees and rulesprivacy labels Chrome, Safari, Firefoxfeature support differsOS versions in use 360 px wide screens2 GB RAM, slow CPUbattery, storage full 300 ms latency1 to 10 Mbps, data costno signal in the hall what you control everything to the right of your code is outside your control, so it becomes a constraint
      ConstraintWhat it means for design
      BrowsersTest on at least two engines (Chromium and Safari's WebKit); check a feature is supported before using it; storage can be evicted.
      App storesReview before every release, store fees on sales, rules on payments and privacy; a critical fix can wait days.
      DevicesDesign for the smallest, slowest phone your users own; touch targets, not mouse hover; many OS versions at once.
      ConnectivityAssume slow, expensive and sometimes absent: small pages, caching, retries, an offline mode where it matters.
      Short calculation: page weight

      Time ≈ size in bits / bandwidth.

      A 3 MB page on a 2 Mbps link: 3 × 8 / 2 = 12 s. Most users leave before that.

      Trimmed to 600 KB (compressed images, no unused libraries): 0.6 × 8 / 2 = 2.4 s.

      Topic 10

      Choosing an application type for a problem

      flowchart LR
        A([New problem]) --> B{Hardware control<br/>or hard deadlines?}
        B -- yes --> EMB[Embedded, real-time:<br/>C or C++ on a device]
        B -- no --> BUY{SaaS or ERP<br/>already does it?}
        BUY -- yes --> CFG[Buy, configure,<br/>integrate]
        BUY -- no --> U{Where are<br/>the users?}
        U -- one person,<br/>heavy local work --> DT[Desktop app]
        U -- many people,<br/>many devices --> D{Camera, push<br/>or offline?}
        D -- every day --> N[Native or<br/>cross-platform]
        D -- sometimes --> P[PWA]
        D -- no --> W[Responsive<br/>web app]
        N --> API[Shared back end:<br/>three tiers]
        P --> API
        W --> API
      
      1. Users and context: who, where, on which devices, how often? (Your Lab-01 stakeholder list.)
      2. Hard constraints: hardware control, deadlines, offline, regulations, budget, team skills, semester length.
      3. Buy or build: an existing SaaS may already solve 80 % of the problem.
      1. Dominant quality attributes: write the top three as scenarios with measures.
      2. Compare two or three options with a weighted matrix and check deal-breakers.
      3. Record the decision: context, options, decision, consequences. Revisit it when the context changes.
      A product often combines types: an IoT device + cloud + mobile app, or a PWA for students + the same web app on desktop for admins.

      Topic 10

      Worked example: an architecture decision record for a campus shuttle tracker

      ADR-001  Application types for the ITC shuttle tracker
      Status   Accepted, 2026-10-02        Deciders: whole team, client
      
      Context  Students want to see where the campus shuttle is and when it
               arrives. Buses have no computer today. Most students have
               Android phones; mobile data is limited; the budget is small.
      Options  A. GPS module on each bus (embedded) + native Android app
               B. GPS module on each bus + PWA + small cloud back end
               C. Drivers share location from their own phones + web page
      Decision B. The GPS unit (C++ firmware) sends a position every 10 s
               over mobile data; students open a PWA from a QR code at
               each stop; no install and no store review needed.
      Consequences
        + one web codebase for Android and iPhone; updates are instant
        + bus position does not depend on the driver's phone
        - firmware must be updated over the air (OTA), a new skill
        - no background push on iPhones unless the PWA is installed
      Rejected A: two front ends later for iPhone, store releases.
               C: privacy of drivers' phones, stops when the battery dies.
      • An architecture decision record (ADR) is a short text file kept in the repository, one per important decision, numbered and never deleted (a later ADR can supersede it).
      • The valuable part is the context and the rejected options: a new team member learns why, not just what.
      • Notice the combination of types: embedded firmware, a cloud back end, a PWA front end.
      • Consequences list both benefits (+) and costs (-). A decision with no costs has not been thought through.
      In Lab-02 Task 2 your team writes the same kind of record for ITC Club Hub, for three user groups at once.

      Best practices and common mistakes

      Best practices and common mistakes

      Start from users and context

      Decide the type from who uses the system, where, on which devices and with what connection. Not from the technology the team wants to try.

      Write qualities with numbers

      Use six-part scenarios with a response measure. "Fast" and "secure" cannot be tested; "95 % within 1 s at 20 check-ins per minute" can.

      Keep rules in the core

      Business rules belong in the logic tier, not in the page or the app screen. Then a second front end costs a front end, not a second copy of the rules.

      Mistake: "we need an app"

      Building two native apps by default, for users who would have opened a link once a week. Compare native, cross-platform, PWA and web first.

      Mistake: testing on your own laptop only

      Fast Wi-Fi and a large screen hide the real constraints. Test on a cheap phone, a slow network and at least two browsers.

      Mistake: undocumented decisions

      Six months later nobody remembers why the team chose a PWA. An ADR with rejected options takes 20 minutes and saves weeks of re-arguing.

      Check your understanding

      Chapter quiz 10 questions

      Play this quiz live with the Realtime Quiz app: download the questions, use Import JSON on the instructor dashboard, then open a session. Open Realtime Quiz

      Wrap-up

      Summary

      • System software (firmware, OS, drivers, runtimes) runs the machine; application software serves a user's task.
      • Desktop, web and mobile applications differ in where the code runs and how it is delivered and updated.
      • An SPA loads once and exchanges JSON; an MPA reloads pages. A PWA adds a manifest and a service worker: installable, works offline.
      • Enterprise systems (ERP, CRM) integrate finance, HR and customers around shared data; integration and a long life dominate.
      • In embedded real-time systems a late answer is a wrong answer; C and C++ dominate there, in games and in performance libraries.
      • IaaS, PaaS and SaaS differ in which layers of the stack you manage and which the provider manages.
      • Client-server and three-tier split presentation, logic and data; keep business rules in the core, never only in the UI.
      • Quality attributes depend on the type; write them as six-part scenarios with a measurable response.
      • Choose a type from users, devices, connectivity, qualities and constraints, and record the decision with its rejected options.
      Open Lab-02: 5 tasks + 1 challenge

      Next chapter: 03 · Software Engineering Ethics

      Slides