Reputation: 8722
I like the concept of MVC, and Spring provides one, called Spring MVC. However it looks like it targets on web application.
If I want to use MVC concept in Spring environment, how to do that?
Upvotes: 2
Views: 1090
Reputation: 2739
MVC has nothing to do with Spring; it is a software design architecture/design pattern that you can apply to separate out disparate parts of a software codebase (Model, View and Controller). So long as you implement all your business logic in your model, your GUI logic in your view and your controller responds to any events occuring on your view and updating the view as necessary based on the model then you're adhering to the MVC pattern.
This article shows how MVC would be implemented in a Swing environment. Spring MVC can only ever be used as a web framework. The Spring Framework itself however can still be used wherever you want as it is not tied to a Servlet-based architecture (IoC container).
Once you get to grips with MVC another design pattern/architecture, which is closely related to MVC called MVP (Model View Presenter) is interesting, although very similar, seems to me to be a valid successor to MVC as it completely dumbs down the GUI side.
Upvotes: 3
Reputation: 31795
It is a bit more high level, but you may want to look at Spring RCP project.
Upvotes: 1