Don't Remove Listeners - Use ListenerHandles
Explains why manually removing listeners is error-prone and introduces the ListenerHandle pattern for cleaner, safer event management in object-oriented code.
Nicolai Parlog (nipafx) is a Java Developer Advocate at Oracle who shares deep insights on Java through blogs, talks, books, videos, and open-source projects, helping developers learn and grow.
297 articles from this blog
Explains why manually removing listeners is error-prone and introduces the ListenerHandle pattern for cleaner, safer event management in object-oriented code.
Announcing the release of LibFX 0.2.0, a JavaFX utility library with new features like ControlPropertyListener and SerializableOptional.
A step-by-step guide to manually attach JavaFX source code to the JDK in Eclipse for better development features like Javadoc and code navigation.
Explores how Java 8 lambda expressions work internally, covering their type, runtime representation, performance, and design decisions.
Explains why Java's Optional isn't serializable and demonstrates a workaround using the serialization proxy pattern.
Explains the Serialization Proxy Pattern for Java, detailing its implementation, benefits, and use cases for safer serialization.
Explores key concepts of Java serialization, including its extralinguistic nature and customization methods like writeObject and readObject.
Explores the design decision behind Java's Optional class not implementing the Serializable interface and the reasoning of its creators.
Explores the design decisions and expert discussions behind Java 8's Optional type, contrasting them with the author's own views.
Explores Java's Optional type as a tool for writing intention-revealing code and avoiding null references, part of a detailed series.
A reflection on Robert C. Martin's classic talk about software architecture, use-case driven design, and treating the web and database as implementation details.
Explains how to implement the Decorator Pattern in Java 8 using default methods and lambda expressions for cleaner, more convenient code.
A summary of Martin Fowler's talk on refactoring workflows, covering the refactoring mindset, the 'two hats' metaphor, and reasons to refactor.
A developer shares a real-world example of using the Decorator Pattern to refactor a complex Java Swing UI component, improving code quality.
A developer announces the launch of their tech blog, CodeFX (now nipafx), detailing setup, plugins, and future Java/JavaFX tutorial plans.
Announcing the release of LibFX 0.1.1, a JavaFX utility library featuring 'Nestings' for managing complex property hierarchies.
Explains the programming placeholder terms 'foobar', 'foo', and 'bar', and encourages their use in collaborative coding and whiteboard sessions.