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".

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers

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
4 votes
0 answers

Salesforce controller to implement a dynamic form

The code below is a controller for a Visualforce page (form). The controller determines if the form was previously created and saved or saved in progress in a previous action. If the form is new it ...
user2355809's user avatar
4 votes
0 answers

Update UI once all API calls are done

I'm learning Swift at the moment but I would like to produce well-organised code. The goal of my little app is to display the weather of my current location. I use : the API of Darksky : https://...
Adrien G's user avatar
3 votes
0 answers

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
3 votes
0 answers

Fat Controller Action - Deep nested filters

I have this really really long controller action and would like someone to help me break it down. ...
Filipe Chagas's user avatar
2 votes
0 answers

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
  • 131
2 votes
0 answers

Controller to execute AJAX requests for a client

I have been developing this structure or pattern (I don't really know how to call it). It's my first time doing something like this, and I'm a bit worried about the future, if it becomes unmanageable. ...
Vistor's user avatar
  • 43
2 votes
0 answers

Controller method to add a product, stored across three database tables

I have some questions on how I can improve this "add" action method in a controller. Using a single form, the user can upload a product to be displayed on the site. A Product is composed of three ...
Ricardo's user avatar
  • 265
2 votes
0 answers

Business logic in controller

Led by the recently read premise "Lean controllers and fat models" I've come to the conclusion that my controller might be too fat at the moment. Basically, what I'm trying to achieve is simple Edit ...
wegelagerer's user avatar
2 votes
0 answers

Interactive transition between view controllers

I have made an interactive transition controller in Swift in two different ways. This interactive transition controller is the parent class and I have few child classes which adapt the parent for ...
Nico's user avatar
  • 199
2 votes
0 answers

Sports statistics controller

Is there too much logic in this controller (should I migrate them to the model)? How else can it be refactored? ...
j.hwang's user avatar
  • 21
2 votes
0 answers

Is my controller for editing information about videos doing too much?

My project uses Zend Framework 2. I'm trying to determine if I am doing too much in my controller as a rule for my development. I have built my controllers like this for a while and haven't run into ...
nathanjosiah's user avatar
2 votes
1 answer

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
0 answers

Restaurant Management follows MVC pattern

I am writing the Restaurant Management homework which must be following the MVC pattern. My Menu model has two parts: Drink menu and Food menu. With Food menu, it separates into three different types ...
David Moore's user avatar
1 vote
0 answers

Typescript Express - Controller in Controller via dependency Injection or logic in routes

I'm trying to give one Controller one operation. However, some Controllers exists of 2 or more operations. I'm not sure whats the best way to structure this part of the app. For example, I have 2 ...
Dusty48's user avatar
  • 111
1 vote
0 answers

React Native app screen for booking appointments

I've been building a two-sided (both clients and service providers would use the app) appointment booking app. This is a screen from which a service provider can confirm their profile after having ...
user2717129's user avatar
1 vote
0 answers

Symfony controller to register and activate users

I've been in an interview some time ago. They objected my Symfony API code with following line: Too much code in controller actions. Can be moved to services to keep the business logic apart ...
EresDev's user avatar
  • 121
1 vote
0 answers

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 ...
user avatar
0 votes
0 answers

Dynamically loading and naming controllers in nodejs and express

I'm trying to write a module to dynamically load all the files from my "controllers" folder, and then add them to the main express instance as routers. The files inside the controllers export an ...
Samuel E.'s user avatar
  • 141