Skip to main content

All Questions

Tagged with
1 vote
0 answers
1k views

MVC - How should components inside controller communicate?

I'm developing a level editor in Java. I'm designing its code in MVC. From what I've learned: controllers can have a direct reference (fields) to views and models. Views can have direct reference to ...
Gad Wissberg's user avatar
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 ...
AJJ's user avatar
  • 3,028
0 votes
1 answer
912 views

Dynamic query from view layer

In my current job they are defining a new corporate architecture for java development. It is something like this: ProjectView: JSF view layer. Uses delegates on the ProjectClient layer. ProjectClient:...
Guillermo Gefaell's user avatar
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 ...
Thufir's user avatar
  • 224
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 ...
Amogh Talpallikar's user avatar
1 vote
1 answer
449 views

Creating a System Sequence Diagram from an [extended] use case

As I have been taught - one controller = one use case. But I have: OutsiderController SupplierController (which extends OutsiderController) SubContractorController (which also extentds ...
Nikola's user avatar
  • 367
4 votes
1 answer
2k 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 ...
Nikola's user avatar
  • 367
0 votes
1 answer
925 views

Where should I put my method

I am writing a Java program using the MVC design pattern. I have classes Item and Supplier. In the database they are connected through a item_supplier table. I'm writing a method which will give me ...
Nikola's user avatar
  • 367
1 vote
1 answer
3k views

How to design an application that read files using MVC pattern?

I am going to write an application that reads data from a csv file, and display that data to the user. I intend to apply an MVC design pattern to create this application. A user will interact with ...
zfranciscus's user avatar
6 votes
2 answers
3k 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 ...
sinθ's user avatar
  • 1,311
19 votes
3 answers
66k views

In MVC , DAO should be called from Controller or Model

I have seen various arguments against the DAO being called from the Controller class directly and also the DAO from the Model class.Infact I personally feel that if we are following the MVC pattern , ...
user avatar
1 vote
1 answer
677 views

MVC, Java Design Pratices, and Flaws of java.util.Observable and java.util.Observer

I am planning learning Model-View-Controller (MVC) development using Java. While reading I came across a post which mentions java.util.Observer and java.util.Observable for MVC development. As I ...
Ankit's user avatar
  • 551
4 votes
1 answer
2k views

Opensource showcase for MVC in Java Swing [closed]

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 ...
Regular John's user avatar
5 votes
1 answer
346 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. ...
Salivan's user avatar
  • 373