All Questions
9 questions
2
votes
1
answer
119
views
How to properly model an MVC model in this case?
I aim to understand pull model MVC. I'm stuck at defining a model for a simple color-guessing game in Java Swing I chose to practice it.
I borrowed the model's initial version from an example which ...
3
votes
1
answer
319
views
Is it always optimal to preserve encapsulation in MVC?
I've just finished up a project in which I created a visual simulation of the life cycle of an ARM instruction in a single cycle processor. I used the MVC pattern in this project and ran into a design ...
3
votes
2
answers
3k
views
Using MVC style, where is the best place to put SQL functionality?
I am wondering about best practices here.
MVC (Model - View - Controller) patterns involve separating components of your program that model the data, manipulate those models, and display those ...
0
votes
1
answer
215
views
Adding a graphical view to a system
I currently have an program in Java that simulates railway movements. Essentially, trains arrive on platforms, pick up and drop off passengers, and then proceed, respecting signalling where possible. ...
1
vote
3
answers
3k
views
Building a calculator using MVC
I've been programming in Java for about 6 months, and I thought a good and challenging test of my skills would be to build a GUI calculator. I have very recently heard about this MVC idea, and I ...
1
vote
1
answer
549
views
how to model a connection to a resource, with rudimentary event processing
For my simple MUD client I'm using Apache Telnet (no, not ssh). A mud client is a strange beast:
Generally, a MUD client is a very basic telnet client that lacks VT100 terminal emulation and the ...
6
votes
2
answers
2k
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 derived ...
4
votes
1
answer
916
views
Should I use JavaFx properties? [closed]
I'm usually very careful to keep my Model, View, and Controller code separate. The thing is JavaFx properties are so convenient to bind them all together. The issue is that it makes my entire code ...
4
votes
2
answers
982
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 ...