Questions tagged [mvc]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Consume Identity enabled WebApi in an MVC Project

I have an MVC project with no authentication. The project uses webapi as a backend to retreive and send information through the controllers. Now we need to add authentication to the webapi project as ...
1
vote
2answers
105 views

Model updating itself in MVC?

My group in school is tasked with creating an application of our own choosing which follows good object oriented design principles. The group has chosen to make a tower defense game with help of ...
-4
votes
1answer
31 views

MVC architecture in RESTFUL API [closed]

What is model in MVC architecture, is it only request object or it can be any object carrying data? Then what will be the model in RESTFUL API.
0
votes
2answers
40 views

Where to sync Database and Search-Database in MVC pattern

I have a website-sideproject (Application Server: Django, Database: sqlite) with "search" functionality and I've recently stumbled over this problem. When you have a full-text-search-...
0
votes
1answer
23 views

How best to structure this MVC or Razor Pages web application given a required tcp/ip server data source that acts like a web api?

I am rewriting an old asp.net 4.0 web forms website that exposes an application's data and logic to the web. I am moving this to a .net core mvc or razor page project. The website has minimal ...
1
vote
2answers
57 views

How to properly implement Rest Controllers to handle overlapping entities?

I have: A User entity. A Poll entity. Relationship: User creates polls. Use-case: When an arbitrarily user is clicked his/her profile is loaded and shown. The profile includes a list of polls ...
-1
votes
1answer
25 views

Client side validation with Jquery - MVC C# app

I am working on a very LEGACY MVC App using C# which is built from 2009. They dont have any client side validation at all. In other words, they dont use Validation mechanism provided by MVC framework ...
3
votes
2answers
338 views

Why do backend web frameworks use "MVC" when they have no persistent UI to update?

Model View Controller (MVC) is focussed on UI based applications. In MVC the model notifies the UI (view) when its values change and the view then decides what and if to update. I can understand this ...
1
vote
1answer
241 views

The right place for "app logic" in MVVM context

I hope this is the right place to ask. I'm an experienced developer, and have used MVC for much time. This question is in the context of iOS/macOS development for the most part, (SwiftUI). Using MVC ...
0
votes
1answer
27 views

How best to structure my Service/Repository layers when persisting a Many to One object?

I'm working on a project where I need to do CRUD operations on Book and Library objects. Naturally the relationship between Book and Library is Many to One, like so: @Entity @Getter @Setter @...
1
vote
1answer
236 views

How to do MVC in C++

I have a QT application with a window of OSG written in C++. I want to implement the app using MVC design. The application allows you to add markers to OSG model and it is using QT to edit the markers....
0
votes
1answer
90 views

What would the database schema look like for a Entity Component System architecture of web app?

I found previous SE questions like this. I'm familiar with the typical RDBMS backed MVC web app framework. To illustrate what I am thinking of, let's use the examples of Bunny and Carrot from this [...
2
votes
2answers
105 views

MVC: Should my domain model look like this?

Consider the following GUI screen (Java Swing) with a list of persons where the user can select a person and delete it. According to MVC, the view observes (observer pattern) the model and updates ...
0
votes
1answer
39 views

In an MVC desktop application, is there a canonical solution to share an immutable value class between multiple components?

Question In the context of an MVC, desktop architecture, is there a canonical solution or a design pattern / best practice to give access to an immutable value class to multiple components at ...
0
votes
1answer
55 views

MVC architecture - communication between nested components

I'm working on a rich client desktop application. I'm trying to use MVC to decouple the model, view and controller responsabilities. Problem is I can't seem to find a clean solution for handling ...
0
votes
0answers
44 views

Pipeline pattern for MVC based GUI application?

I've got an application that uses MVC to run individual, isolated scripts to support our office. There is a root application will open new windows (limit 1 per tool) for each tool opened and each ...
2
votes
3answers
108 views

RESTful endpoints for returning same model based on different fields?

What is the recommended convention to be followed for identifying different GET endpoints that fetch the same model/entity using different fields/parameters? For example, there is a Student entity for ...
1
vote
2answers
196 views

Should a single method in a service class perform multiple operations for its controller?

Let's say I have a controller called MessageReceiverController which is a controller of an API that other services can call and include messages in the requests. For each of the messages the ...
3
votes
2answers
240 views

Clean Architecture, how does the use case interactor generate different outputs?

I'm trying to understand how do controller and presenters work in clean architecture projects and could use some help. Specifically about generating multiple outputs from the use case. In the Clean ...
2
votes
1answer
135 views

DRY principle vs decoupling (business from GUI)

Say I have a business model called Vehicle. Vehicle has many fields but to keep it simple say it looks like: public class Vehicle { String ownerName; String brand; FuelType fuelType; }...
0
votes
1answer
74 views

Monolithic view model MVC

Currently working on a legacy app. One section deals with generating "reports", each which share some common subsections, that are based on strongly-typed razor partial views. The largest ...
1
vote
3answers
149 views

Is creating an entity in a database considered to be business logic?

According to my (perhaps incorrect) understanding business logic includes saving/updating entities in the database, as well as connecting with any 3rd party API's or using services and should ...
1
vote
1answer
132 views

In which layer should I load views on a Clean(ish) architecture?

I am trying to organize my architecture following the clean architecture while using some common practices/frameworks. I'm writing in PHP, but have no problem with other languages. The flow of my app ...
1
vote
2answers
175 views

Difference Between MVC and MVC + 3 Layered Architecture?

I haven't been able to find a definitive answer online, so I'm hoping that someone with experience can help answer this. Many MVC tutorials I find online end up using the MVC architectural pattern as ...
-1
votes
1answer
60 views

Is State Considered Part of Model In Desktop MVC?

Most of the answers I see that discuss what the model layer is comprised of, only address stateless MVC, particularly ASP.NET's implementation of it. When working with desktop MVC frameworks such as ...
4
votes
1answer
109 views

Do Domain Objects Have To Be Persisted?

Does a domain object have to be persisted, or does this violate some convention about domain objects? For example, let's say I'm using an object called AuthenticationState to represent authentication ...
1
vote
2answers
73 views

How to provide error details back to REST request?

In an ASP.NET MVC 4 REST API application, we have SQL errors which are occuring during the request. However, since the requests are big, we are streaming the data back to the client, which means we ...
1
vote
1answer
81 views

How does one-way data binding and MVC achieve loose coupling?

In my limited understanding, one-way data binding could happen like the following: On the back-end, I have a Node backend server. In that, I have a layer that communicates with the database (Model). I ...
3
votes
1answer
138 views

ASP.NET MVC Caching of ViewModels

My question is regarding caching and ViewModels in ASP.NET (Core) MVC. I have a service which injects a Repository<T> which is used to fetch domain models from the database. The service layer ...
-3
votes
1answer
290 views

Comparison of CQRS and MVC

Command Query Responsibility Segregation and Model–view–controller patterns look pretty similar to me. Are they comparable? Do they act at the same layer of abstraction? How do they differ? Can they ...
1
vote
1answer
75 views

In an MVC-patterned app, how should one build the interface between model and user interface layers to work nicely with threading?

I am wondering about this. This is a sort of follow-up to my last question here: In the MVC pattern, what has the responsibility for creating the view? because now I've run into the question of how to ...
2
votes
1answer
210 views

In the MVC pattern, what has the responsibility for creating the view?

This is something that has been bugging me for a bit in a program I am trying to build. It is a desktop GUI application, and I settled on the use of the famous "MVC" (Model-View-Controller) ...
1
vote
0answers
77 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, ...
0
votes
1answer
62 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 ...
6
votes
4answers
1k 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
59 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
127 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
184 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 ...
-2
votes
1answer
56 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 ...
0
votes
2answers
158 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
62 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
56 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 ...
1
vote
0answers
80 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 ...
2
votes
0answers
401 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
2answers
82 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
37 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
92 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
79 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
77 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 ...
0
votes
1answer
3k 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 ...

1
2 3 4 5
19