Tagged Questions
13
votes
4answers
2k views
Explain Model View Controller
My experience with developing dynamic websites is limited mostly to Java servlets. I've used Tomcat to develop various Java servlets, and I wouldn't hesitate to say that I'm reasonably proficient ...
6
votes
4answers
2k views
Using MVC in a Java app
I need to write a cross-platform GUI application to process (in multiple threads) and visualize fairly large quantities of data. Ideally the application should be relatively fast and look good.
The ...
6
votes
2answers
3k views
How to completely decouple Model from View/Controller in Java Swing
Is there a collection of commonly-agreed-upon design guidelines for separating the Model classes from the View/Controller classes in a Java Swing app? I'm not so concerned that the View/Controller ...
5
votes
2answers
180 views
method to allow me ability to freely modify my classes, but make them immutable to others?
I am creating the model part of an MVC architecture. My one class will provide all the accesses to allow one to fetch system state. I want most of this state to be immutable as it shouldn't be ...
4
votes
2answers
191 views
MVC - Isolating view and model logic
I understand that the model should generally consist of data manipulation and the view for data display from the model, but how do I keep my model and view layers decoupled?
My simple view has a few ...
4
votes
1answer
277 views
MVC for our application?
There are some issues about how to manage our program designs and programming styles. I was assigned to find a solution to write reusable code - though, the programming team does not follow the rules.
...
4
votes
1answer
942 views
Opensource showcase for MVC in Java Swing
I've allready created small desktop CRUD applications using Java/Swing. In hindsight I'm not quite sure if the overall design of these applications is good. I've also done some reading on MVC and ...
3
votes
2answers
408 views
How does MVC work with the principle “Tell, Don't ask”?
Procedural code gets information then makes decisions. Object-oriented
code tells objects to do things.
— Alec Sharp
So, when a view wants to display some information that is suppose to be ...
3
votes
1answer
343 views
Is MVC the optimal pattern to build a RESTful web service?
Not being a Java practitioner, I recently came to learn about the JAX-RS specification and Apache CXF framework. While still wrapping my head around all these things, I also read the this question on ...
3
votes
2answers
201 views
MVC framework that uses classes instead of methods for actions
In most MVC frameworks, Controller class contains multiple methods, each representing one action. Then annotations and reflection is used to call those methods appropriately. But from OOP point of ...
2
votes
1answer
120 views
Do I need JUnit tests for the controller layer on a MVC when I have a database layer
I have a MVC which has this structure:
ui
controller
db
model
Basically the controller doesn't really do much more than connection ui with db layer.
Do I need to provide JUnit tests for the ...
2
votes
2answers
363 views
How to use MVC in practice
I'm very confused. I can't even begin to understand how MVC would be implemented outside of web development. This might seem like too general a question, but how would one apply MVC. I have the ...
2
votes
2answers
416 views
MVC: View-Controller Interaction
I have a Java application that I am implementing following the MVC pattern.
I want to have a window (view) that contains a form which allows the user to add several text fields. There will also be a ...
2
votes
1answer
752 views
Difference between Controller and Dispatcher in MVC for web frameworks?
In MVC applied to WSGI or Java EE, is the Servlet a controller, dispatcher, or both? I think I've seen system diagrams where the controller and the dispatcher are different. Could the controller ...
2
votes
1answer
61 views
Java MVC extra classes
I have a simple MVC project. My current packages:
gui
controller
db
domain
I want to put extra classes which I will use, e.g. md5 hashing, email validator (methods which I will use in more than ...