Building a REST API
Build a REST API with Java's built-in HttpServer -- HTTP basics, request handling, JSON serialization, routing, and exposing the task manager over HTTP.
Build a REST API with Java's built-in HttpServer -- HTTP basics, request handling, JSON serialization, routing, and exposing the task manager over HTTP.
Learn Java OOP basics -- classes, objects, constructors, access modifiers, encapsulation, toString, equals/hashCode, static members, and records.
Learn Java collections -- ArrayList, HashMap, HashSet, iterating, generics, immutable collections, and choosing the right collection.
Java Collections guide: List, Set, Map deep dive, immutable collections, concurrent data structures, and choosing the right collection.
Java concurrency guide: threads, ExecutorService, CompletableFuture, virtual threads, thread safety, and common pitfalls.
Learn Java control flow -- if/else, switch expressions, for/while/do-while loops, enhanced for-each, break, continue, and common patterns.
Dependency injection in Java: constructor injection by hand, why DI matters, the Service Locator anti-pattern, and a brief intro to Spring, Guice, and OSGi.
Deploy your Java REST API to a VPS -- installing the JDK, running as a systemd service, configuring nginx as a reverse proxy, and HTTPS with Let's Encrypt.
Learn Java error handling -- try/catch/finally, checked vs unchecked exceptions, custom exceptions, try-with-resources, and best practices.
Java error handling guide: checked vs unchecked exceptions, try-with-resources, custom exceptions, Result/Either pattern, and logging exceptions.
Learn Java file I/O -- Path, Files, reading and writing text files, directories, BufferedReader/Writer, and simple CSV parsing.
Java functional interfaces guide: Function, Predicate, Consumer, Supplier, method references, composition, and writing custom functional interfaces.
Java Generics guide: generic classes, methods, bounded types, wildcards, PECS principle, type erasure, and common patterns.
Learn Gradle with Kotlin DSL -- project structure, dependency management, building fat JARs, and improving the REST API project with Jackson for JSON handling.
Java HTTP client guide: java.net.http HttpClient (sync and async), timeouts, retries, JSON handling, and comparison with OkHttp and Apache HttpClient.
Learn Java inheritance, method overriding, abstract classes, interfaces, polymorphism, sealed classes, and composition vs inheritance.
What Java is, how the JDK/JRE/JVM relate, installing the JDK, compiling and running your first program, and choosing an IDE.
This page collects practical Java guidelines for AEM projects. The goal is consistent, safe code that is easy to test and maintain.
Java JSON processing guide: Jackson ObjectMapper, annotations, custom serializers, polymorphism, Gson comparison, and common pitfalls.
Java logging guide: SLF4J facade, Logback and Log4j2 configuration, MDC, structured logging, performance tips, and common pitfalls.
Learn Apache Maven -- project structure, dependency management, building fat JARs, and improving the REST API project with Gson for JSON handling.
Maven guide: POM structure, dependency management, BOM imports, multi-module projects, profiles, useful plugins, and comparison with Gradle.
Learn Java methods -- defining and calling static methods, parameters, return types, overloading, varargs, scope, and recursion.
Avoid NullPointerException with Java's Optional -- creation, unwrapping, chaining, and best practices for handling missing values.
Java Optional guide: creation, chaining, best practices, anti-patterns, and when to use Optional vs null.
Build a complete command-line task manager in Java -- CRUD operations, file-based persistence, input validation, and packaging as a runnable JAR.
Guide to modern Java features: records, sealed classes, pattern matching, text blocks, var, and a version-by-version feature table from Java 11 to 21.
Functional Java -- lambda expressions, method references, the Stream API, and practical data processing pipelines.
Java Streams API guide: filter, map, flatMap, reduce, collect, groupingBy, parallel streams, and common pitfalls with practical examples.
Write your first Java tests -- JUnit 5 setup, assertions, test structure, parameterized tests, and testing the Task Manager and REST API.
Java testing guide: JUnit 5, Mockito mocking, AssertJ fluent assertions, parameterised tests, test patterns, and what to mock vs what not to mock.
Learn Java's primitive types, String basics, type casting, var, final, arithmetic, comparison, and logical operators.