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".
159 questions
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
...
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 ...
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 <...
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.
...
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 ...
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 ...
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.
...
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 ...
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 ...
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?
...
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.
...
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 ...
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 ...
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 ...
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). ...