Anatomy of applications

  • Applications execute code on microprocessors
  • The execution is (often) "mediated" by an operating system
  • The operating system is a software layer between applications and the hardware
  • On desktop systems it also provides a GUI for user interaction

Microprocessor

Parts of an application

  • Your code
  • Their code

Their code

  • Language standard libraries
    • e.g. printf() function from <stdio.h>
  • Operating system APIs and libraries
    • Platform dependent and not portable
    • Low level access to hardware
    • Desktop services
  • Additional libraries

Libraries

  • A collection of functions
    • Often in compiled format, i.e. a binary library
    • With header files for the "public" API
    • You might find yourself building libraries from source

Dependencies

  • Dependencies of an application are the libraries that are required for it to build and/or run
  • Getting the dependencies are often the biggest source of frustration when trying to build a large application
    • You might need a specific version
    • The dependency itself might have additional dependencies (AKA Dependency hell)

Dependency/Package managers

  • Resolve and download dependencies
    • fink, macports
    • newer: Homebrew
    • On Linux: apt or yum (there are others...)
    • On windows: OneGet and others (but I can't recommend any as I haven't used them)

Dynamic and static libraries

  • Static libraries get bundled into the application
  • Dynamic libraries are loaded by the application at run-time

Other types of applications

  • GPU programming
  • Microcontroller programming
  • "Web apps"

GPU programming

  • Have their own language or provide extensions to existing languages
  • The code is executed in the GPU rather than the CPU
  • GPU are great at parallel processing
  • So if your problem is parallelizable then it is well suited to GPU computing

Microcontroller programming

  • Direct access to a microcontroller's basic functions
    • or through libraries that implement common functionality
    • through custom OSs (e.g. RTOS)
    • through regular OS (Embedded Linux)
    • or through high level abstractions like Wiring/Arduino

Microcontroller boards

Microcontroller boards

Web Apps

  • Part of the code runs on your equipment
  • The other runs on a server
  • The network is an intermediate layer
  • There is an interconnection protocol to exchange commands and data

Anatomy of applications

By mantaraya36

Anatomy of applications

  • 1,150