1. What is a GUI framework?
  2. What is the main difference between a GUI library and framework?
  3. What about web vs managed vs native GUI frameworks?
  4. JavaFX
    1. Features and properties
    2. Other interfaces and features

What is a GUI framework?

A software suite that usually provides or interfaces with:

  • 2d and 3d graphics
    • primitive drawing functions (lines, shapes, patterns, bitmaps)
    • geometry, animations, rendering, imaging
    • transforms, effects, layouts, lights, projections
  • color spaces and transforms
  • font rendering and metrics
  • multimedia
  • windowing
  • widgets / controls
  • input & event handling
    • event loop
  • resource handling
    • hardware resources (surfaces, descriptors, handles)
    • high-level objects (garbage collection)
  • async task coordination
  • collections
  • data bindings and declarative
  • asset management, i18n
    • compression, bundling
  • building, packaging, deployment

Note: the scope of GUI frameworks has grown as a result of ever increasing complexity of the software development overall.

What is the main difference between a GUI library and framework?

There is no clear distinction. Technically both may be based on (dynamic) libraries. Frameworks may include additional tools such as build tools (Qt's qmake, moc, uic). E.g. in the web context, a library may be considered a framework once it performs sufficient number of tasks usually associated with GUIs. Macromedia (Adobe) even coined the term "rich internet application" to denote web application that has many of the characteristics of desktop application software, often with framework like properties.

What about web vs managed vs native GUI frameworks?

Native frameworks are able to use any interfaces available on the target operating system. One significant advantage is that the GUI framework can be freely implemented from scratch and look totally different from anything else on the platform. There is also minimal amount of overhead when interfacing with the platform. The obvious downside is, platform dependent part of the codebase is by definition not automatically portable. For example, for a resource constrained embedded system, a native framework (or library) may be the only viable choice for building GUIs.

The term 'managed platform' usually refers to a runtime platform such as JVM or .NET. This platform provides a portable, (operating system) platform independent set of basic functionality (algorithms, collections, I/O, graphics primitives, multi-threading). GUI frameworks can freely utilize any of the provided functions or access the underlying hardware using FFIs. Managed platforms may introduce some overhead (e.g. longer start-up time and larger memory consumption). On the other hand, the incorporated technologies such as JIT compilers, garbage collectors, and sandboxes are usually highly optimized and well tested. Multiple runtimes can also co-exist on a system.

Web GUI frameworks are built on top the browser context. Browsers provide a similar kind of high level sandbox as the managed runtimes, albeit usually with more limited access to the underlying system. They offer a standard Web APIs for executing code on the WWW (+ other networks). Unlike the former two, the Web is inherently a distributed system, it provides easy access to remote resources and APIs, and the systems can be indexed as hypertext documents. Web GUIs can be customized with high-level frameworks. The low-level technologies are usually standards based, but the number of standard APIs is constantly growing. As a downside, the Web GUIs have suffered from compatibility and performance issues, and some functionality has been lacking due to missing APIs. On the other hand, Web applications often assume no installation phase unlike the "local" programs on the managed and native platforms.


JavaFX

Features and properties

  • Operating system support
    • most common desktop systems (Windows, Mac, Linux)
    • most common mobile platforms (Android and iOS)
    • Linux-based embedded systems (e.g. Raspberry Pi)
  • Diverse language support
    • JVM based languages: Java, Kotlin, Scala, Clojure, ..
    • reactive data bindings
    • declarative GUI specification: ScalaFX, TornadoFX, CSS, FXML
  • Visual GUI designer
    • Gluon Scene Builder
  • Modern object-programmable GUI framework
  • Graphics support
    • vector graphics: patterns, texts, curves, set operations. (e.g. union)
    • transformations (e.g. affine)
    • effects (e.g. bloom, shadow, flame)
    • colors, tinting, fillings, transparency
    • charts, animations
    • 3d rendering with texturing and lightning
  • Styling
    • CSS style files
    • JavaFX extensions: graphical effects
  • Multimedia
    • Web, video, audio, image processing

Other interfaces and features

  • Multilingual text
    • e.g. the non-Western languages
  • Multi-touch support, virtual keyboard
    • mobile use, digital signage, etc.
  • HiDPI support
    • 4k / 5k / 8k / Retina displays, etc.
  • GPU acceleration
  • Printing