Skip to content

14. Further Reading

This document introduced the Java language and the most commonly used libraries for writing layered applications, network clients and servers, and web services. Here are the main topics that build on this.

14.1. Processing XML documents

JSON has largely replaced XML for data exchange, but XML is still in use (configuration files such as Maven’s [pom.xml], document formats, and existing SOAP services). The JDK provides several APIs within the [javax.xml] package:

  • DOM ([DocumentBuilder], [Document], [Element]): the document is loaded into memory as a tree, which is then traversed and modified;
  • StAX ([XMLStreamReader], [XMLStreamWriter]): the document is read or written on the fly, without being loaded entirely into memory;
  • XPath ([javax.xml.xpath]) to query a document, and XSLT ([javax.xml.transform]) to transform it.

Apart from JDK, the Jakarta XML Binding library (JAXB) maps Java classes to XML documents, just as Jackson does for JSON (Chapter 5); Jackson can also read and write XML using its [jackson-dataformat-xml] module.

14.2. Web Applications

Chapter 13 covers only web services (applications that produce data). For web applications that generate HTML pages, the Java ecosystem offers:

  • Spring MVC with a templating engine such as Thymeleaf: server-side rendered pages; the author wrote the course “Step-by-Step Introduction to the Spring MVC Web Framework” (September 2026);
  • Jakarta EE (formerly Java EE), the set of specifications that includes servlets, JPA (Jakarta Persistence, Chapter 11), CDI (dependency injection) and JAX-RS (services REST), implemented by application servers such as WildFly, Payara, or Open Liberty;
  • other lighter or more recent frameworks: Quarkus, Micronaut, Helidon, Javalin;
  • interfaces written in JavaScript (Vue.js, Angular, React) that consume Java web services; the author wrote the course “Step-by-Step Introduction to the Vue.js Framework” (September 2026).

14.3. Desktop and Mobile Applications

This document does not cover graphical user interfaces: today, management applications are most often built with web interfaces. JDK still provides the Swing library, and the JavaFX library (distributed separately since Java 11 by the OpenJFX project) enables the development of modern desktop interfaces. The concepts covered in Chapters 7 (event listeners) and 9 (asynchronous programming) apply directly here. On mobile devices, Android apps are written in Java or, increasingly, in Kotlin, a language that also generates bytecode for the Java Virtual Machine.

14.4. Tests

Chapter 6 introduces JUnit. It is often supplemented by:

  • the AssertJ library, which provides more readable assertions ([assertThat(list).hasSize(7).contains(x)]);
  • the Mockito library, which creates “mocks” (simulated objects) of the layers on which the layer under test depends;
  • Testcontainers, which launches a real database (MySQL, PostgreSQL…) in a Docker container for the duration of integration tests;
  • Spring Boot testing tools ([@SpringBootTest], [MockMvc]) for testing a web service without deploying it.

14.5. Performance

The Java Virtual Machine compiles bytecode on the fly and optimizes it during execution, resulting in excellent performance for programs that run for extended periods. Among the tools that go a step further:

  • the JMH tool (“Java Microbenchmark Harness”) to precisely measure code performance, taking into account the virtual machine’s warm-up time;
  • JDK Flight Recorder and JDK Mission Control, which record and analyze a program’s behavior in production;
  • ahead-of-time compilation to native code with GraalVM Native Image: a standalone executable that starts up in a few milliseconds, at the cost of restrictions on reflection; Spring Boot and Quarkus can generate such executables;
  • the choice of garbage collector (G1 by default, ZGC for very short pauses on large memory heaps).

14.6. Deployment

A Java program can be deployed in several ways: as a [.jar] archive executed by a JDK installed on the machine ([java -jar application.jar]; Spring Boot produces a standalone [.jar] that contains all its libraries), as a standalone application that embeds a virtual machine stripped down to only what it needs (the [jlink] and [jpackage] tools from JDK), or in a Docker container (Spring Boot directly generates a container image via [mvn spring-boot:build-image]).

14.7. Resources