Is there a Java alternative to these technologies?
I find the data binding capabilities and INotifyPropertyChanged of most use (along with containers and elements of the sort), but the lack of cross-platform of .NET makes me think of Java.
What do you suggest? Is there any equivalent product? One that implements XAML?
Is there a Java alternative to these technologies? I find the data binding capabilities
Share
The technology (WPF)
If you are looking for an alternative to WPF for the Java platform you should take a look at JavaFX.
The technology is very similar to WPF in the following ways:
Nodeobjects (which is similar to the WPF visual tree which consists ofUIElementobjects).Panenode and it’s derivatives are conceptually similar to the WPF layout panels.Take a look at my answer to the question how does JavaFx compare to WPF which provides a much more detailed (but still high level) comparison of WPF and JavaFX.
The design pattern (MVVM)
The MVVM pattern is a specialisation of the presentation model pattern. It is possible to create a variation of this in JavaFX as the platform provides properties that support binding and the presentation model is basically an object that encapsulates the state of the model and provides operations that act upon that state.
Most examples I have seen though use a variant of the model-view-presenter pattern. Out of the box JavaFX supports a very simple MVP structure where each view is associated with a ‘controller’ class. This is fine for small applications but doesn’t really provide great separation of concerns.