r/JavaFX • • Oct 09 '24

Tutorial New Article: Beginners' Guide to Properties

I realized after finishing all of the deep dive articles on the Observable classes and interfaces that I have never written a beginners' overview of how all of this stuff works. So I started this article out more from a desire for closure more than anything else. But it got away from me, and turned out to be pretty big.

I'm a "first principles" learner myself, so that's the way that I try to lay these concepts out when explaining it to others. I feel that if you understand a bit about the "why?" and the "how?" of how this stuff is architected, then you'll be in a position to make informed decisions about how to use it in real life.

This article focuses on how to use Properties to create Reactive GUI applications, because I really feel that this is the way that JavaFX is intended to be used.

In this article I try to answer the questions like, "What are these property things?", "Why would I want to use them?", and "Which classes should I use in various circumstances?". There's an overview of the most common types, a look at Listeners and Subscriptions, and section on Bindings. Finally, there's a small example program where I try to show Properties, Bindings and Subscriptions working together to create a Reactive application.

The article is here: https://www.pragmaticcoding.ca/javafx/elements/beginners-properties

16 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/dhlowrents Oct 16 '24

A tab for each would be better. Also, you should post as link instead of text posts. You don't get karma from reddit from text posts. Good content though!

1

u/hamsterrage1 Oct 17 '24

I've looked into tabbed code blocks, but it's not supported in the schema I'm using in Jekyll and I haven't found a way to make it work. Which is maybe a good thing since it means I'm not tempted to do it :)