Skip to main content

Questions tagged [controller]

The controller tag is used with questions involving the controller component of the Model View Controller (MVC) design pattern. The controller component accepts input, usually from a user interface, and issues various change and modification requests to the model component and/or the view component controlling the data of the model and how the data is presented. In some cases controller and view are combined into a single component.

Filter by
Sorted by
Tagged with
1 vote
4 answers
195 views

I'm working on a Spring Boot application with a VoucherService and VoucherController. I currently have the service method return an ApiResponse<T> directly, like this: @Transactional public ...
Conquer the world's user avatar
1 vote
0 answers
87 views

Suppose I've got a spring controller as follows: ⋮ @RestController public class MyController { ⋮ @PostMapping(value = { "publicAPI/addItem", "internalAPI/addItem" }) ...
zZz's user avatar
  • 11
1 vote
2 answers
245 views

I'm working on a project with the task of creating a route to checkout ticket purchases for events. In this scenario, I have a controller that receives the request with order data, client information, ...
Victor Antunes B.'s user avatar
0 votes
2 answers
405 views

I have an existing application using Codeigniter Framework (MVC). I need to implement an integration in the software with the external cash register (e.g., making REST API calls). I need to either ...
objecttothis's user avatar
2 votes
4 answers
958 views

in the clear architecture, what uncle bob suggested. I have a lot of questions about how to correctly distribute the responsibility. it seems that there is no relationship between controller and ...
rahul  Kushwaha's user avatar
0 votes
0 answers
268 views

This is Indirection according to Wikipedia Assign the responsibility to an intermediate object to mediate between other components or services so that they are not directly coupled. Controller seems ...
zaphod's user avatar
  • 101
1 vote
2 answers
164 views

I have: A User entity. A Poll entity. Relationship: User creates polls. Use-case: When an arbitrarily user is clicked his/her profile is loaded and shown. The profile includes a list of polls ...
Julian Broudy's user avatar
-1 votes
2 answers
588 views

I'm having a huge doubt on how to connect the front-end of my application to its back-end. So my application has a single entry point where all requests go. The request is dispatched to a controller, ...
yes sure's user avatar
2 votes
2 answers
3k views

Let's say I have a controller called MessageReceiverController which is a controller of an API that other services can call and include messages in the requests. For each of the messages the ...
xenon's user avatar
  • 885
7 votes
1 answer
4k views

I am having a hard time trying to wrap my head around the relationship between Controllers and Presenters in Uncle Bob's Clean Architecture. In most of his videos, he talks too little about ...
Tacca's user avatar
  • 111
3 votes
3 answers
1k views

I am at the stage of implementing a my 1st ever view, after developing a Model and Controller, however there is a problem. I have been reading this article on MVC, which is what I have been aiming ...
Scott Anderson's user avatar
9 votes
4 answers
4k views

I've got a project with an HTTP API which returns data from a database. The layers it goes through to get to the API look like this: DB -> Repository -> Controller I'm looking to restrict the ...
Joundill's user avatar
  • 149
8 votes
2 answers
2k views

I am traditionally a desktop app developer, but circumstance has thrust me into the role of doing web client and corresponding REST api logic for a project I am involved in. Unfortunately, I'm a one-...
Geo...'s user avatar
  • 181
-1 votes
1 answer
308 views

I have to code a gui like this: It's an homepage with a left menu and a changing right part, on button1 click form1 must be displayed, on button2 click form2 a so on. Each form has its own button "ok" ...
Diablo3000's user avatar
0 votes
1 answer
130 views

I'm building a rest API using typescript and typeorm as orm. Each route of my API point's to a specific method located in a controller class. My question is about the content of this controller ...
Markus's user avatar
  • 103
1 vote
1 answer
295 views

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 ...
Zoran Jankov's user avatar
0 votes
2 answers
2k views

I have two panels, one for the admins and the other for partners. And there are two OrderController with Admin\OrderController and Partner\OrderController namespaces. They both look very similar. ...
Pouneh's user avatar
  • 11
1 vote
1 answer
756 views

I am wondering where does the fxml controller belong in the Entity-Control-Boundary model? When designing a JavaFX application with the help of Scene Builder, Scene Builder generates an fxml file ...
Julian Broudy's user avatar
0 votes
1 answer
78 views

I'm working on a software product that entails users opening up a case and taking actions to process the case, changing the status, creating tasks, etc. I'd like to provide a history of the actions ...
Hunter Nelson's user avatar
0 votes
1 answer
476 views

I like to separate business logic out of POCOs into controllers. If an object must be thread safe, where do I put the lock code? In the POCO itself? Or in a controller? Might make sense because ...
Hoppe's user avatar
  • 101
2 votes
0 answers
194 views

So I'm building my first application, in Python, and some issues have cropped up because of the lack of interfaces (I.e. explicit type declaration) My design involves several homebrew packages, and I'...
user309290's user avatar
0 votes
1 answer
1k views

We are developing a system with coarse microservice architecture. We have an API that uses controllers and back-end logic with Entity-Framework repository, and several types of clients that use this ...
Yamuk's user avatar
  • 141
0 votes
1 answer
2k views

I'm working on javaFX project using Hibernate and H2 database,I'm trying follow the concept of MVC design pattern ,so I have created 3 packages : models :contains POJO classes 2.1 views.fxml:contains ...
Ala Eddine Menai's user avatar
1 vote
1 answer
3k views

There are several posts and other contents in the internet that claims against naming classes ending with "er" (like manager, controller, helper...). I personally agree with that, but what ...
Talysson's user avatar
  • 157
2 votes
1 answer
257 views

We are developing a new REST Api for our Spring MVC legacy enterprise web application (before this it was communicationg with Adobe Flex frontends). As a general rule we stated that we were creating ...
frankieta's user avatar
  • 121
4 votes
1 answer
1k views

For context, this project is a personal budget program I am working on while I try to learn to use MVC patterns effectively. There is a SessionController that passes user commands to a ...
g_sue's user avatar
  • 49
0 votes
1 answer
4k views

Would it be correct to assume that in general, I would need as many controller classes as classes that can be accessed/modified by a user? For example, If a logged-in user can add/modify to a class ...
sly-gdk's user avatar
  • 13
1 vote
2 answers
764 views

I'm a newbie on web development and I've heard about MVC. If I'm right, it's the Controller that take charge of fetching data from DB. So I have a question: In the pattern MVC, how many objects to ...
Yves's user avatar
  • 203
1 vote
1 answer
238 views

A user has to perform a somewhat complex task on my website (submitting a rating). For the sake of example, let's consider it's a rating for a movie, done through a controller. There are several ...
Cyril Duchon-Doris's user avatar
0 votes
2 answers
411 views

I am using MongoDB in a project, where relationships between collections are created via referencing a unique document ID of a special BSON ObjectID type. So I can have a School document like this: {...
Tony Sepia's user avatar
15 votes
2 answers
42k views

I have a few layers in my WebApplication: Presentation, Service, DAO, Domain. Services call DAO objects which reads data from a Database/File whatever. I have a Controller that needs to fetch data ...
Diyarbakir's user avatar
6 votes
3 answers
3k views

In MVC usually the controller sets whatever needs to be sent back to the client/View, including HTTP status code, e.g.: class Controller { public function get(Request req, Response resp) { ...
imel96's user avatar
  • 3,608
3 votes
1 answer
179 views

I have a controller method as follow: public class RoomsController { @RequestMapping(method = RequestMethod.GET, path="/v1/rooms/{name}") public ResponseEntity<?> getRoomInformation(@...
Luiz E.'s user avatar
  • 133
6 votes
2 answers
7k views

I have a small application with classic layers Controller-Service-Dao. Controller actually is REST resource, which deals with JSON data. And the questions are: 1. where is the best place to create ...
sphinks's user avatar
  • 169
1 vote
1 answer
84 views

I often see the follwing example when reading about MVC (example is in Java, but question adapts to all OOP languages): class View{ JTextField tfName; public String getTfNameText(){ ...
danielr1996's user avatar
2 votes
2 answers
5k views

I need some advice on my idea to write a controller file in Python, and not like the C in MVC type controller but a more simpler idea. Just a Python script that controls the operation of some other ...
jonathan's user avatar
  • 129
0 votes
2 answers
567 views

All the documentation, examples and tutorials I've found on $resource were using it directly in the controller. So far I'm just using $http from services and those services are further used in the ...
peter's user avatar
  • 113
0 votes
1 answer
328 views

I have custom MVC framework in PHP and my controller file has about 5000 lines. The question is, is it a big concept flaw? It is structured code with kiss method and quite maintainable. Are there ...
JTC's user avatar
  • 145