All Questions
Tagged with controller java
18 questions
1
vote
1
answer
482
views
An efficient way to order content in controller [Spring Boot]
My code works as intended. CategoryController class has getAllCategories method, which tells ContentOrderMap class to map differently ordered categories to their respective OrderType enum.
The ...
3
votes
0
answers
76
views
Controller class for an input dialog
I am learning OOP, concretely Java, by developing a real life business application for aimed for repair shops. I have followed MVC pattern design for GUI elements of my application. I was wondering do ...
1
vote
1
answer
416
views
JavaFX controller for a poker game
I am making a poker application in JavaFX. When I try to display the cards on the screen it is working perfectly fine. Yet I have a method with a lot of duplicated code in it.
I have tried to ...
3
votes
2
answers
1k
views
Creating user accounts
I have a method which allows to create user account. It contains some conditions to control empty fields, wrong format of email, weak password, etc.
...
1
vote
1
answer
2k
views
Simple login with jsp
I made a simple login page with Java EE, jsp, servlet, tomcat and jdbc.
It does following:
login user
register user
after login it creates token for the session so ya can be directed from start page ...
3
votes
1
answer
9k
views
Is this the right approach for Controller-Service-Dao implementation?
I am a bit confused with Controller Service Dao implementation . I created a dummy User servlet along with Model controller dao and a service , though it will work ,...
2
votes
1
answer
122
views
Setting value of controller controls for domain objects with Reflection
Is my use of Java Reflection an OK design?
Each domain object contains an annotation to declare what controller would be initialized to edit/create the object:
Each field of the domain object has ...
0
votes
2
answers
122
views
Practicing Java servlets, MySQL and JSON - follow-up
(See the previous iteration.)
What's new
I have incorporated all the points of Dmytro Maslenko's answer. My code seems a little bit tidier.
Code
AddPersonController.java
...
1
vote
1
answer
909
views
Practicing Java servlets, MySQL and JSON
(See the next iteration.)
Introduction
This is my attempt at a simplistic web application just for the sake of practice. I have three main servlets:
...
4
votes
1
answer
2k
views
REST API that allows creating/removing users, CRUD ToDo tasks
My project is supposed to be used as back-end for a simple to-do web app that lets you create an account, add, edit, complete, and delete todos.
It could be used with some front end consumer like ...
6
votes
1
answer
21k
views
Spring MVC dynamically adding form elements
I made a simple form with an option of adding one text field dynamically on mouse click. And I will be grateful for suggestions on how I may improve the code.
...
1
vote
0
answers
1k
views
Creating JavaFX bindable property readed from joystick
I'm lately messing up with handling joystick in java.
So here is the thing. I wrote a simple class that handle input from joystick, but I'm no certain if I'm doing it well.
Here is what I want to ...
3
votes
1
answer
158
views
Spring controller code to group information by date
I'm using the Spring Framework in my web application and I'm curious as to whether my controller implementations are good or not.
I've used many Hashmaps to make a object that serves my purpose for ...
6
votes
1
answer
2k
views
Drawing Routes on a Map
I have this class:
...
2
votes
2
answers
868
views
Replacing an application service class with multiple command handlers
I have a Controller which uses an application service to accomplish its tasks. The service class is starting to grow big and developing multiple dependencies. So I am thinking of replacing the single ...