I was wondering if Spring MVC
can be used to implement MVC pattern in Java Swing
Applications. I've done some study and found Spring MVC to be used for web development.
Is there any way Spring MVC to be used with Swing Applications?
Swing architecture is rooted in the model-view-controller ( MVC) design that dates back to SmallTalk . MVC architecture calls for a visual application to be broken up into three separate parts: A model that represents the data for the application. The view that is the visual representation of that data.
Spring MVC framework consists of four components : Model, View, Controller, and Front Controller. There are four main layers in Spring Boot: Presentation Layer, Data Access Layer, Service Layer, and Integration Layer. 6. It takes more time in development.
The Model Layer In the MVC design pattern, the model is the data layer which defines the business logic of the system and also represents the state of the application. The model objects retrieve and store the state of the model in a database.
What Is An MVC Framework in Java? An MVC framework follows the Model-View-Controller pattern. In an MVC framework, the three "layers" separate the user interface from the application logic. This is done to control how information is represented internally vs how it is presented to the user.
Not really. As you say, Spring MVC (or Spring Web MVC) is primary targeted for web server development and thus have little to do with client side or standalone GUI applications.
That said, nothing prevents you from using ordinary Spring technologies for dependency injection, as a backend in your model, etc. Spring provides abstractions for persistence, remote network communication, transactions, security and so on that might come in handy in many projects.
Additionally, there is the Spring Rich Client Project that was released some years ago, but I do not know its current status.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With