Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVVM pattern in java

I want to make a mvvm project on java. But I can not find a sample project. There are a few Android samples but I don't want to make an Android-project. So how can I make a project with the mvvm pattern?

I am trying to create a desktop application on which there are combo boxes and a data-grid. The app must connect to a database (i.e. MySQL) and the data-grid must be filled with data. Any changes on the combo boxes must change the grid's content. Maybe I want to make CRUD-operation on later steps.

So any suggestions...

like image 523
yasedox Avatar asked Nov 24 '11 12:11

yasedox


2 Answers

Take a look at JavaFX framework. It was already mentioned in a couple of other stackoverflow questions:

  • How does JavaFX compare to WPF?
  • Pros and Cons of JavaFX and Silverlight

You may also find this blog post very interesting. It mentions Presentation Model (a pattern highly related to MVVM) and walks you trough basic JavaFX concepts regarding FXML (smth. like XAML in WPF).

EDIT: Simmilar question on stackoverlow

Is there anything similar to WPF and MVVM in Java world?

like image 109
nowaq Avatar answered Oct 11 '22 12:10

nowaq


Here is an article on a Java framework doing MVVM ("presentation model"), MVP ("passive view") and a hybrid MVVMP/MVC ("supervising controller")

Implementing event-driven GUI patterns using the ZK Java AJAX framework

It has full source code which deploys on three different PaaS cloud services.

like image 33
simbo1905 Avatar answered Oct 11 '22 14:10

simbo1905