All Questions
Tagged with controller object-oriented
13 questions
1
vote
1
answer
75
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
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 ...
3
votes
2
answers
617
views
Business logic inside MVC Cart Controller method
I have a controller method, invoked when a user adds the product he is viewing to the cart.
The way I understand how MVC works, this can be considered a fat controller already, but I'm still not ...
3
votes
1
answer
108
views
Performing CRUD between 4 tables
This code works perfectly fine but I have repeated many lines of code in this controller. I need some suggestions on how to optimize this code and remove repetition, with focus on the ...
3
votes
1
answer
138
views
Initializing a controller that uses Selenium
I've outsourced the setup functions from my class to another file, I outsourced initDriver from the class PortalController to ...
2
votes
1
answer
942
views
Simple calculator in PHP utilizing MVC
I have been struggling with understanding Model, View, Service, Controller architecture and wrote some code.
Is my Model class the Model part of MVC (did I define ...
2
votes
1
answer
757
views
Price calculator for motors and pumps
Note
This question was born in request to post more details from this question on Programmers. Since details may uncover new/different complexity, I'm asking another question here. I also will use ...
1
vote
1
answer
74
views
Selecting orders submitted by a user, segregated by status
I have recently started using Laravel as my chosen framework. It is my first time using a framework. As I have made progress through my project, my controller methods have started to increase in size. ...
2
votes
1
answer
491
views
Controller for repository of members
I tried to implement the Repository pattern for my project:
MemberController.php -- this one is a bit too long and has repetitive code
...
2
votes
1
answer
179
views
Any improvements for my LoginController class?
This is probably going to be my final question regarding controllers. I feel like I have a good enough understanding of them now and am able to write them cleanly.
I've recently adapted a less error ...
15
votes
2
answers
558
views
My final sign up controller
I've asked a couple of questions here before regarding my controller, but I think I've finally gotten to understand controllers completely, but I'll never be sure unless I get my code reviewed.
I've ...
3
votes
2
answers
181
views
Controller: Sign up action clean up
I don't know if it's just me, but I feel like my sign up action method has gotten a bit messy.
I think that perhaps instead of setting error messages in a controller, I should set error codes which I ...
0
votes
1
answer
330
views
Review: Finished router class for custom mini framework
I have finished my router and would like your thoughts on anything that may be inefficient of could be done better!:
class Router {
...