Skip to main content

Questions tagged [controller]

In MVC architecture (Model-View-Controller), the object responsible for passing and receiving data to and from views, acting as a bridge between the "Model" and the "View".

0 votes
0 answers
24 views

PathFinding.java: controller in MVC

Intro This time, I need to get reviewed the controller class (from MVC pattern) responsible for user interaction with the 2D grid graph. Code ...
coderodde's user avatar
  • 31.9k
1 vote
1 answer
79 views

Handling HTTP requests in existing Web Api

I am working in a Web Api project that has the following project structure: Root Controllers Orchestrators Managers Services etc The ...
Yiannr's user avatar
  • 119
3 votes
2 answers
277 views

Laravel Event Filtering Controller

So I am currently writing a function in laravel that handles URL parameter filters. How the code works: So we have the following two URL parameters: timeframe and <...
Nifty Matrix's user avatar
1 vote
2 answers
240 views

Update person name in database

Can someone review this implemented solution and provide commentary the code is working well but will need refactor and improve this code. ...
CodeRealm's user avatar
1 vote
1 answer
137 views

Rails controller to handle offers and payments for rental housing

I've been adding stuff a bit "blindly" to my controller and currently everything is working as it should, but the controller is gotten very messy. I'm using the gem ...
Daniel's user avatar
  • 11
2 votes
2 answers
257 views

'Lean controller'/'Business logic on service' and filtering, sorting, pagination methods on controllers

I'm currently reading about "Lean controllers"/"Business logic on services" and trying to refactor some legacy code. However I am struggling to apply what is taught in the ...
Marco Aurelio's user avatar
1 vote
2 answers
173 views

Making the controller clean and readable in (Ruby on Rails)

I have this rails controller which works fine but a lot of business logic is confined in the controller which I believe is not a good practice. ...
Muhammad Ushay's user avatar
1 vote
1 answer
487 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 ...
Kleronomas's user avatar
2 votes
1 answer
132 views

Controller in Laravel with parsing, creation and relationships

The following code represents the store method of a resource controller. A user can create an training offer on my website and can pass various information like ...
Adam's user avatar
  • 345
1 vote
1 answer
81 views

Passing argument to a constructor and using it only in some class methods

I've created some controller for handling clicked links statistics. Does this class meet Single Responsibility Principle? ...
Szymon Czembor's user avatar
1 vote
1 answer
113 views

Decoupling of validation and data access in ASP.NET

I've been asigned to a project no dev has touched in a long time. It's an ASP.NET MVC 4 application. It appeared to be well coded, but had no testing and the database migration folder is not present. ...
Peter's user avatar
  • 165
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 ...
Zoran Jankov's user avatar
2 votes
1 answer
58 views

Laravel controller methods for registering businesses and stylists

I use the Laravel API and want make messy code cleaner. I have a form for registering business and businessOwner. And stylist who is working under this business registering from same function. And ...
Janet A's user avatar
  • 21
4 votes
0 answers
186 views

Swift iOS app for showing motivational quotes, with multiple screens

I'm one month into self-learning Swift, and I would like some advice to improve my coding skills. I have listed 2 situations that I think I need to improve. I'd like some feedback focusing on my use ...
andy's user avatar
  • 61
2 votes
0 answers
93 views

Retrieve file and other input fields from JavaScript to send to ASP.NET Core

I am currently developing an e-commerce website where users can upload their photos to customise their products. The use case begins when the user selects a product from our website (e.g. shirt). ...
Issaki's user avatar
  • 121

15 30 50 per page
1
2 3 4 5
11