Questions tagged [mvc]

MVC (Model-View-Controller) is a software architecture pattern that enforces separation of concerns.

Filter by
Sorted by
Tagged with
1
vote
0answers
41 views

Rest API backend and React frontend is MVP?

I'm doing a website that has a React frontend that calls some RESTful API and I would like to know if this is an MVP pattern. I think that the React application implements the View and the Presenter, ...
-4
votes
0answers
56 views

MVC GUI architecture for multiple Views per Controller

I'm starting a Geographical map application in Js which will handle hundreds, maybe thousands of 3 different types of elements. I'm considering MVC approach but I don't know how would be the best way ...
0
votes
1answer
59 views

How to inform the controller why the object creation has failed so an appropriate response can be returned?

In my MVC web application the controller calls a service layer which takes any relevant request parameters and builds the model for the view e.g. Controller var model = _modelService.Build(id); return ...
5
votes
4answers
767 views

In MVC, is the router considered one part of the controller? Or are they considered separate entities?

I'm learning to implement RESTful APIs, and the concepts of Controller and Router are common in many frameworks, along with the MVC pattern in general, so I'm encountering them everywhere. From this ...
1
vote
0answers
52 views

Issues Regarding Data Model Abstraction in Golang

I am currently writing a quiz web-app with a React front-end and a Golang backend, with a PostgreSQL database to keep track of the quizzes, the questions on the quizzes, and the choices in the ...
4
votes
1answer
93 views

MVC Patterns: Is There a Design Pattern For Returning Lists (Arrays) of Complex Entity Objects?

I’m struggling with how I should build out my entities, services, and DAOs in an MVC web application when it comes to returning a list (array) of data. On one hand, returning an array of entity ...
0
votes
3answers
157 views

OOD vs MVC; Live Objects vs Everything in Database

How to make memory-efficient code, but still have all the possible code nicely encapsulated ? I have a feeling that the OO (object oriented) approach is more intuitive and the code is nicely ...
0
votes
0answers
55 views

Conditionally filtering dependency-injected async data?

I have a NodeJS application which I've built around dependency injection. The app can run any combination of its functions (modules) at the same time, and any modules that request data from the same ...
-2
votes
1answer
55 views

Is there a less complicated alternative to handling this simple mySQL query in Node?

To Put My Question In Better Context... I am about done writing my first real-world Node application, which would be classified as a REST API. For myself, it was a bit challenging to wrap my head ...
-1
votes
2answers
104 views

MVC who knows about whom?

In the Model-View-Controller pattern, I do understand the role of each component. The Model represents our application's domain model. The View presents this information and the controller ...
0
votes
1answer
55 views

MVC (templates): is it OK to call functions with arguments from the View?

In a MVC scenario, is it OK to pass arguments to functions from the View to satisfy different formatting needs? For example: let's say that the model has a DateTime object and the view must show this ...
1
vote
0answers
47 views

Am I structuring this correctly for a .net mvc web app based on onion architecture?

]1 I am new to MVC. Most of my career I have used Web Forms in Asp.net. Reading about MVC has been really confusing because from what I have learnt is that in Traditional MVC, models were supposed to ...
0
votes
0answers
28 views

Paginate large data and store in temporary table for navigation

I have implemented pagination using SQL and stored that result of search into temporary table. Temporary table is named after unique tab id. So that other tab can have seperate result sets. That ...
1
vote
0answers
80 views

Identity and access management in Clean Architecture and MVC design

The application user has a lot of standard functionality we see in most applications. At a high-level, this includes some form of authentication, authorization, and session management. At a low-level, ...
1
vote
1answer
55 views

Should the View pass data inserted from user to Controller or should the Controller get data from View's fields? (MVC Pattern)

My View has a textfield and a button. According to MVC pattern on button click should be called a function of the controller. This function should do some operation on the View's textfield content. It ...
-1
votes
1answer
30 views

Using MVC with multi-table data

I read a few articles and Stack posts but I'm still unsure how to use MVC properly. One of my app features is handling meetings - each having a list of subjects to discuss. My database tables look ...
2
votes
1answer
74 views

How to properly model an MVC model in this case?

I aim to understand pull model MVC. I'm stuck at defining a model for a simple color-guessing game in Java Swing I chose to practice it. I borrowed the model's initial version from an example which ...
2
votes
1answer
72 views

Separating Plotting and Computation Logic in Scientific Computing MVC App

I’m developing a Matlab GUI for a scientific computing application and need to plot fairly heavy intermediate results. Currently, the computation is represented as a function. The GUI accepts user ...
-1
votes
1answer
74 views

Need some criticism for my backend app Architecture

I have been learning Backend development for quite a while now and I decided to build a bigger project using Express.js and the MVC architecture, the project is basically a Restful API with Vue.js in ...
-1
votes
1answer
831 views

Is it okay to have one Service with two different Repositories in Spring Boot MVC?

I have a backend Spring Boot API that should have one(?) endpoint that returns some statistics to display in a frontend. These statistics are calculated from data that comes from two different ...
0
votes
1answer
339 views

Is it good practice to save an entire ViewModel in Session (C# ASP.NET MVC)

I have an C# MVC Application which is basically a large application form. We are using a large ViewModel to store all the information the user enters as they pass through multiple steps in the ...
-1
votes
1answer
74 views

Display different panel on button click (MVC pattern)

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"...
1
vote
0answers
16 views

Best RoR pattern for special instances of a subclass

I'm trying to figure out the best way to "partially" use the validates_uniqueness_of validator for a particular case of problem. Let's say I have a Book class with multiple comments, with the Comment ...
-3
votes
3answers
128 views

What are some of the best ways to create single page websites with dynamic content?

I'm expirementing with creating a website as a IT Ticketing system. This website has a top nav and a side nav. I want the content area to change depending on the link clicked. I've managed to get the ...
-1
votes
2answers
124 views

Model View Controller: Can the Model access the view directly?

According to my understanding, in the MVC design the Model can only receive the functions calls from the Controller and not from the View directly. Is it true that the Model can change or access the ...
0
votes
2answers
149 views

Model View Controller pattern for a Java desktop application

I'm struggling to fully understand MVC pattern, I found a lot of information on the web but they are really confusing because it seems there are various ways to do it. What I understood is that the ...
2
votes
1answer
135 views

Should I put add() method in Laravel model

It's my first post here as I understand that SO is a platform to find fixes and this is where to ask questions about more general questions. Correct me if I'm wrong I'm working on project in Laravel ...
0
votes
1answer
55 views

MVC database connection .NET

Introduction I intend to create a .NET WinForms application (this will be a toy application) which connects to a SQL Server database backend. I have designed and implemented an object-oriented model ...
-1
votes
2answers
257 views

Needs to understand the difference between boundary, controller, logical class types

As the title implies I am trying to understand the difference between boundary, controller and logical class types, which are used in the MVC pattern. I will do so using an example. Please consider ...
0
votes
2answers
716 views

Why and how are Server-side Web MVC and client-side/desktop MVC not the same?

In MVC, does the view component deliver a new view to the user directly or indirectly via the controller component? says The first thing to realize is that Server-side Web MVC (e.g. ASP.NET MVC &...
-1
votes
1answer
62 views

How shall I implement a MVC program into presentation, business logic and data access layers?

Here is part of an ASP.NET MVC program, from https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/controller-methods-views?view=aspnetcore-3.1 : A model class Movie: public class ...
3
votes
1answer
176 views

What domain objects might I need to represent a user and users profile in a forum web application

I’ve been trying to get a firm understanding of the MVC design pattern so that I can write my own framework for implementing the back-end of a forum web application using Slim 3. In particular, after ...
1
vote
1answer
48 views

Web/network Architecture with loading indicators

Let's say I'm using a MVC pattern. Here's some pseudocode: View { main() { Controller.callAPI(url); display(item, position) { // display item at position } }...
1
vote
2answers
123 views

Is MVC an architectural pattern for user-interactive applications only?

Is it correct that MVC is an architectural pattern only for user-interactive applications? (That is my understanding.) An application can interact with users via GUI or CLI. Does MVC apply to both ...
1
vote
1answer
90 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 ...
0
votes
2answers
69 views

Preventing double submissions using PRG pattern

You probably know PRG (Post/Redirect/Get) pattern used in web applications to avoid double form submission (and usually conseguent item duplication in a data store). But I keep reading this is not a ...
1
vote
0answers
55 views

Do MV* architectural patterns apply not only to OO languages but also functional languages?

I am learning about MV* architectural patterns, thanks to the help from several answers here. I learned that they are used for designing the architectures of user interactive applications. I also ...
1
vote
3answers
71 views

In MVC, does the view component deliver a new view to the user directly or indirectly via the controller component?

In MVC, the view component doesn't receive user input directly, but the controller component does. When the view component creates a view, does the view component deliver the view to the user ...
1
vote
1answer
118 views

How does controller work with view in MVC?

http://geekswithblogs.net/dlussier/archive/2009/11/21/136454.aspx says MVC – Model View Controller Let’s look at MVC first. You’ll notice a few things about the diagram: The input ...
1
vote
1answer
233 views

Why does the Django Rest Framework encourage separating Model, Serializer and Views for the same object across multiple files?

Summary: Why shouldn't I put model, serializer and view classes for the same object in the same file in my Django Rest Framework application? I'm building an application using the Django Rest ...
0
votes
0answers
23 views

Template engine design question?

I don't know if this is the proper forum for the question as any answers will be rather subjective. But here it goes, please advise if there is a better place to ask this. I am designing a small ...
-2
votes
1answer
90 views

How Interfaces Will Help in Real time Scenario? [closed]

I'm working in a real-time project. They are using 3 tier architecture using interfaces but I am not getting how it will work as Dependency injection. I know interfaces can be multiply-inherited and ...
2
votes
1answer
356 views

How the MVC increase code testability?

I am learning MVC design pattern as an android developer and I've been seeing that it facilitates the testability of code. I understood this concept, but in real case I'm frustrated. Can someone ...
1
vote
1answer
134 views

Model-view-controller architecture, desktop application and database connection

Let's assume we have a class structure for a particular application (a University manager for example, with classes representing semesters, subjects, timetables and so forth). It is to be a desktop ...
0
votes
0answers
295 views

How to design a PyQt/Pyside2 application to use the MVC pattern with the Qt MV pattern?

The context: I created a PySide2 app to remote control a pyhsical product. The device is interfaced with a driver to get and set it's overall state (state machine with nested and parallel states) and ...
-4
votes
1answer
29 views

extending an MVC site to support a new controller, via adding a v2 area <- good idea? need help with routing

I want to extend our api to a (better) v2 version. I came up with the plan of adding a "v2" area and under that, cloning each controller into it. (basically v1 sometimes returns json, sometimes text, ...
1
vote
2answers
79 views

Class property re-use vs redundancy

TL;DR - When designing classes for MVC use, is there "best practice" for how classes should be structured to eliminate property duplication and/or redundancy? I'm trying to avoid large (one-size-fits-...
0
votes
1answer
60 views

To And From Date Validation in Model

In my Springboot project I need to perform a validation of the type validFromDate<validToDate. I was wondering whether would it be a good or bad practice to place a validation in the model itself (...
1
vote
1answer
81 views

Model - View - Controller: Are input fields views or controllers?

I am having a hard time trying to understand the MVC pattern, in particular the role of input fields in this pattern. 1. Conceptual question. Let's say I have a document as model and a text area ...
1
vote
1answer
39 views

MVP where to set Content-type header?

I'm having some problems with deciding where to set the content-type header in a vanilla mvc framework. Should i add it inside the controllers method: class ApiController extends Controller{ ...

1
2 3 4 5
18