8
votes
2answers
467 views

MVC controller code

Please review my servlet. ...
1
vote
1answer
394 views

Desktop student administration application

I'm writing my first Java MVC application which should be a desktop student administration application with a Swing GUI. DAO is already implemented: Need some feedback - student administration ...
1
vote
1answer
89 views

MVC Layout - Which way to add listeners is better?

So I'm doing a basic MVC layout for a pretty basic game that I am making. The game requires the user to move up/down/left/right via buttons on the GUI. Since I'm using an MVC layout and my buttons are ...
2
votes
3answers
94 views
10
votes
1answer
165 views

Markup calculator application using MVC

I want to make sure that the code is correct in terms of its design, code correctness, best practices & Junit testing. The complete description is given below: Functioning of the app quickly ...
5
votes
2answers
112 views

A simple web-app code - user registration. Is the layering ok?

So knowing the little pieces is something different and putting them together is something different. Here is the code where I try to follow good oop practices and 3 - layered structure. Any ...
4
votes
1answer
105 views

Is the “current connected user” an information that should be shared with the domain?

I'm working right now in a readers social network. The main points are this: When an user connects with his account I save his user id in the session variable. My MVC is working with DTO's all the ...
3
votes
1answer
166 views

Java MVC pattern

I recently posted a question about modeling a system that contains elements that can perform actions (here). The model runs in cycles and parts perform their action every cycle. The model should have ...
7
votes
1answer
315 views

Student administration application

I have set up a basic MVC project which is a student administration application based upon a CSV file as datastore. Each user has a specific role (student, lecturer, professor, leader of degree ...
5
votes
1answer
777 views

Combining a JFrame, AbstractTableModel, and SQL Query

Building on my previous questions. I've managed to make a GUI that queries a SQL database and displays the result in a table. Christ, it's a lot of work for such a simple activity. The code below ...
6
votes
4answers
1k views

Making a word processor

The Word Processor I had in mind would be similar to Microsoft's word and OpenOffice. I am trying to keep my logic separated from the User Interface and that separated from the controller, basically ...
10
votes
2answers
157 views

toString() in a model or view layer?

I would like to ask those of you, who are a little bit more expirienced in development. I would like to ask about toString() method usage. In what situations do you ...
6
votes
1answer
264 views

Feedback on college project

I would appreciate some feedback regarding best practices on the following code for a college project. What should go in the controller and what in the views? How to attach and remove the views to ...
3
votes
1answer
746 views

TicTacToe - introduction to MVC pattern

After reading about MVC pattern in Head First Design Patterns, I've decided to write a TicTacToe app. I will not reveal the source code of the classes Matrix, ...
5
votes
1answer
238 views

First introduction to MVC

I'm not sure that I fully understand this pattern. I've written a simple application that uses MVC. Please criticize my approach to the use of this pattern. For convenience, I'll post the source code ...
1
vote
1answer
2k views

Java MVC and code example

I have a MVC design for a GUI Java program. I was wondering if: Someone could either comment the code to help me out in understanding what I am doing better. Help me fix newbie mistakes to make ...
1
vote
1answer
113 views

Decoupling MVC model methods in java

I have a basic swing application that I am trying to develop using MVC structure. The principal class in the model connects to a derby database and retrieves values from columns and stores them in ...
1
vote
1answer
581 views

Java; Generic Observer/Observable - is this as messy as I think?

I have recently had a whole load of help trying to roll my own loosely-coupled Observable/Observer paradigm, here: Loosely coupled observer pattern To keep things simple and to aid in my ...
1
vote
1answer
93 views

how do I encapsulate this List<Message> properly?

I know that Swing isn't true MVC: Using this modified MVC helps to more completely decouple the model from the view. Leaving aside the veracity of the above claim, the problem I run into is ...
1
vote
1answer
4k views

How to update my Swing JTable dynamically. MVC Pattern

I have created a program using a version of MVC architecture. The purpose of the code is to scrape the h1 titles of a list of webpages and to return the results to ...
1
vote
1answer
75 views

Action based controller using reflections

I'm modeling a controller reflection based. I would like to know if you agree my implementation and what could to be enhanced. I'm starting with reflection and I would like to know if I'm using good ...
1
vote
2answers
288 views

Is there a more efficient way of loading views within my java app?

I'm building a web application in Java. I'm new to Java, so before I get too far into this... I'm hoping to take advantage of all the experience here and learn the problems with this setup. My ...
4
votes
1answer
547 views

Pubsub implementation using a Singleton

Is using a singleton to represent a Publish-subscribe message system a bad design choice? Background Im thinking about writing a pubsub implementation (using the singleton pattern) to allow for ...
2
votes
2answers
666 views

Java: Worries about my implementation of MVC in a GUI Application

This is a question I have in regards to my implementation of the MVC design paradigm that I came up with. The MVC type I am using is where everything must go through the controller. No communication ...
2
votes
1answer
258 views

How can i clean and organize up my View (MVC) better

So i got the grip on the basic MVC patterns in java using Observer / Observable method. Now in interest of keeping it clean and readable i would like some pointers before i move on regarding how to ...
5
votes
2answers
2k views

MVC Controller in Java Swing Apps - Singleton or public static

This article has left me a little confused. In explaining a method on how to design MVC into Java Swing apps the author defines the controller class as Singleton and relays a series of calls to the ...