thomasnield / DirtyFX

Dirty state-tracking properties and collections for JavaFX
Apache License 2.0
32 stars 3 forks source link

But why? #2

Closed tbee closed 6 years ago

tbee commented 6 years ago

I totally understand the technical idea behind this, but maybe it would be a good idea to describe when this is used. And how does this interact with bound properties?

thomasnield commented 6 years ago

I'm using this for advanced CRUD operations that allow staging and reviewing of edits before they are committed to a database.

For instance, this demo application would be simplified code-wise with automated dirty-state tracking: https://github.com/thomasnield/rxkotlinfx-tornadofx-demo

It really is not meant to be used to track "dirty state" of bindings. I'll improve documentation of when and how this is used later.

thomasnield commented 6 years ago

Something else to acknowledge, TornadoFX does have robust dirty-state tracking with its ItemViewModel and other bells and whistles. But last I checked the dirty-state tracking is confined within the context of one control and it is highly opinionated on how dirty state is committed or rolled back.

tbee commented 6 years ago

Ah. In essence being able to show "you have unsaved changes" when a screen closes. I build something like that as well (in a Swing application though). Good to have something standard!

thomasnield commented 6 years ago

@tbee Yes, and also have the ability to revert changes.

thomasnield commented 6 years ago

@tbee I updated the README with a contextual example and even a screen recording GIF.

https://github.com/thomasnield/DirtyFX/blob/master/README.md

tbee commented 6 years ago

Very good!