Questions tagged [mvc]

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

74 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
0 answers
124 views

Intuitive dependency management with code includes?

I am building a PHP CMS system that parses template files and replaces tags with content. Sometimes this content is a HTML, CSS or JS snippet, but it can also be a code include. Most code includes ...
PIDZB's user avatar
  • 233
5 votes
0 answers
903 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, ...
NLuburić's user avatar
  • 191
5 votes
3 answers
1k views

Handling common code among presenters

I'm facing some issues related to code duplication when following MVP architectural pattern in an Android project that I'm working with. My project structure is separated by packages: data, domain, ...
learner's user avatar
  • 167
5 votes
0 answers
3k views

DDD directory structure for MVC app

As a means of learning and gaining some experience with domain-driven design, I'm restructuring/refactoring an old application written in PHP which utilizes the Laravel 5.1 framework. Below is a mock-...
alaric's user avatar
  • 159
4 votes
0 answers
2k views

Any "Gotchas" to using Entity Framework for Identity & Dapper for all other DB access in a .NET MVC application?

I'm firing up an MVC project in which I'd really like to use Dapper as my ORM, as I like to be as close to the database as possible for performance and SQL tweaking reasons, yet still have the power ...
Ed Roper's user avatar
3 votes
0 answers
716 views

MVC vs Layered vs Client-Server

On this book (Software Architecture, 10th Edition by Ian Sommerville, ISBN: 9781292096131), the following architectural patterns are presented (Chapter 6, 6.3, p175): MVC Layered Client-server ...
pmdci's user avatar
  • 169
3 votes
0 answers
93 views

Creating bindable input handler in C++ spanning two separate modules

I have a wxWidgets application. This is the first, main module. The second module is an openGL engine. It's a model-view-(controller) structure, where application is the view (and the controller), ...
Karlovsky120's user avatar
3 votes
0 answers
418 views

Multiple Entity Business Logic/Changes, C# MVC Repository Pattern

I have a standard C# MVC project which has a domain layer using EF and repository pattern. Say I have a model like: public class MainModel { public int MainModelID {get; set;} //Many other ...
Matthew's user avatar
  • 131
3 votes
0 answers
168 views

MVC Sites and Entity Framework (using DbContext)

I've been looking at a couple of the MVC tutorials on the ASP.NET website and and have noticed numerous of them make use of Entity Framework (especially the Identity provider stuff). Maybe my ...
Ruaan Kruger's user avatar
3 votes
0 answers
2k views

How to pass control between sub-controller to parent controller in Java MVC Design Pattern?

I'm pretty new in Java, but I've done plenty of research and I know what MVC is. However, to implement MVC in Java was a difficult task. I followed this tutorial, which helped me to realise that the ...
user3804927's user avatar
3 votes
0 answers
166 views

Should I inject a data dependency into an Angular Directive?

I am currently implementing an AngularJS directive. It is fundamentally a reusable widget comprised of a select box and a table which populates based on the item in the select box. My point of ...
mccainz's user avatar
  • 439
3 votes
0 answers
434 views

MVC: view/sidebar.php can load model?

I have a Route that activates a Controller which returns to me a page through a View. Let's call it master page. route -> controller -> view [master page] The master page is divided into header, ...
David Rodrigues's user avatar
2 votes
0 answers
67 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 ...
Tim's user avatar
  • 5,435
2 votes
0 answers
613 views

N-Tier/Layered Architecture with MVC

Do N-Tier/Layered architecture really helpful with MVC? I have some projects here that use N-Tier architecture with MVC. The available layers are Entity Layer Data Layer Business Layer Presentation ...
Hary's user avatar
  • 129
2 votes
0 answers
184 views

Why separate routes and controllers in MVC backend applications?

I've dabbled in a few MVC frameworks (like Rails and its ilk) and I've noticed that the file that defines restful routes often go separate from controllers which hold the actions executed through ...
AllwinP's user avatar
  • 21
2 votes
2 answers
592 views

How can I structure my angular app so that I don't end up with one huge controller and view?

I have an angular app that concentrates most of its functionality around a primary entity that has several satellite entities. The UI for this is effectively one screen, with a few tabs, one for each ...
Chris McCall's user avatar
2 votes
0 answers
476 views

MVC 5 - Best practice for handling dates inside and outside the USA

I have an MVC 5 application that will be used world wide. A number of the pages in the app will require users to enter dates. I'll be using the jQuery datetimepicker plug-in to allow the user to ...
Randy Minder's user avatar
1 vote
0 answers
77 views

ASP.NET MVC use ViewModels with Services

I'm trying to make a simple Blog-application, but I'm a bit stuck on the architecture of the application. I'd like to create a details-page with the content of the blog-post and a form for adding ...
Sam's user avatar
  • 65
1 vote
1 answer
377 views

MVC-like architecture: Model-Controller communication of results/status

I'm struggling on designing a solid architecture for my project. In particular, I don't know how to handle the communication between the models and the controllers. My goals are: Following the ...
yes sure's user avatar
1 vote
0 answers
194 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, ...
Lorenzo Felletti's user avatar
1 vote
0 answers
73 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 ...
Eddie Hatfield's user avatar
1 vote
0 answers
106 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 ...
Emma's user avatar
  • 645
1 vote
0 answers
205 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 ...
Anonymous Creator's user avatar
1 vote
0 answers
22 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 ...
dtynan's user avatar
  • 19
1 vote
0 answers
627 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 ...
thinwybk's user avatar
  • 111
1 vote
0 answers
297 views

Refactor MVC to more scalable architecture?

Months ago I began a new web project which, in the beggining, seemed like a small application with virtually few users. I began the project by using the awesome Hackathon Starter WebApp Boilerplate by ...
HumbertoWoody's user avatar
1 vote
0 answers
857 views

Handling complex dynamic queries in Laravel 5

I am developing a project using Laravel. My workflow is: route directs to controller Controller calls eloquent models Eloquent models perform queries (tipically CRUD and find) Controller returns ...
lightning_missile's user avatar
1 vote
0 answers
1k views

MVC - How should components inside controller communicate?

I'm developing a level editor in Java. I'm designing its code in MVC. From what I've learned: controllers can have a direct reference (fields) to views and models. Views can have direct reference to ...
Gad Wissberg's user avatar
1 vote
0 answers
585 views

Moving Role CRUD operations from the Controller to the Application Service

I am creating an administration facility for an asp.net MVC application. I am currently trying to create a form that will allow admin users to create roles. I see plenty of code, which looks like ...
w0051977's user avatar
  • 7,061
1 vote
0 answers
241 views

GUI that builds an object - how to design the GUI?

I'm currently writing the GUI for my application. As I understand in a MVC-like application are the following components for each feature: Business data: a complex object hierarchy containing all the ...
piegames's user avatar
  • 261
1 vote
0 answers
425 views

Getting a route from MethodInfo in ASP.NET Core

Is it possible that given a MethodInfo object, i can somehow figure out what the MVC registered route would be for that method? I've tried something along the lines of checking if the MethodInfo has ...
maraaaaaaaa's user avatar
1 vote
0 answers
78 views

How to follow MVC in a standard iOS App theoritically?

I want to understand one thing in plain english that how do I actually use an standard MVC design pattern in iOS App. I know about Modal View and Controller and theoretically I know what they do(...
Ritesh.mlk's user avatar
1 vote
0 answers
167 views

MVC remote validation approach

I have a model, the model has 2 strings; foo and bar. foo is what it is, it will be one of x amount of possible values (it's not an enum, though). bar is entered by the user, so I want to validate ...
JᴀʏMᴇᴇ's user avatar
1 vote
0 answers
357 views

Media Player with MVC pattern

Good morning. I'm developing a media player software with MVC pattern. My question is about the reproduction of media elements. I think we need 3 software classes in order to do the design. These ...
Rubén Ballester's user avatar
1 vote
0 answers
4k views

Is this Codeigniter HMVC folder structure good practice?

The web App has four distinct user areas. The frontend for people off the street The user area for logged in users A teacher zone An Admin c-panel I am using CodeIgniter with the HMVC extension. ...
Jethro Hazelhurst's user avatar
1 vote
0 answers
640 views

How to design the state tree using redux?

In the last days I have searched for a documentation on how and when is it best to use redux and how to design the state tree. My research ended in the conclusion that there is no one correct answer. ...
Stav Alfi's user avatar
  • 297
1 vote
0 answers
59 views

Data Access And Entity Classes inside MVC

Sorry for this question seems naive. I am new to MVC model (I know I am a bit late to join the club), and I have a question regarding MVC with PHP. I think the implementation language doesn't really ...
Lamar's user avatar
  • 111
1 vote
0 answers
92 views

Project Design - Separating JS and C# tasks - Risks vs Benefits

I'm in RFP phase working with outsourcing vendors on the 100% rewrite of a fully operational prototype asp.net app that I wrote, to make it commercially viable. I have an idea for a project design ...
wayfarer's user avatar
  • 195
1 vote
0 answers
52 views

Server responding with UI logic, String representations of data as string over flags

I think there isn't a large enough degree of separation between Business Logic, Data and Presentation in some of our products. I'm trying to explain this to collegues but I'm finding it difficult as I ...
Graeme's user avatar
  • 111
1 vote
0 answers
358 views

How do I handle authentication in an ASP.NET webapp with offline-capable client code?

I hesitated before writing this question, as it sounds like I'm after an opinion without trying anything yet. That's not the case, I just don't want to go down the wrong route with architecture - it ...
JᴀʏMᴇᴇ's user avatar
1 vote
0 answers
704 views

MVC question for a console application with multiple controllers?

My question concerns an administrator's console application. The requirements around it are that administrators should be able to log in (other types of user cannot), and they should then be able to ...
Chris's user avatar
  • 161
1 vote
0 answers
681 views

Top Menu bar driving a sidebar sub menu

I have an application written is C# ASP.NET MVC 4 with Razor views. I am a bit stuck on my menu structure. As per the image above, one can see that there is a Top Menu and a Side Menu. The standard ...
Shane van Wyk's user avatar
1 vote
0 answers
207 views

Access public property of object on view

When we are working with some MVC FW on PHP, generally we have a view loading function like load(string viewName, optional array viewVariables). My doubt here is: if we are working with some object, ...
David Rodrigues's user avatar
1 vote
0 answers
166 views

How to implement 'use case control' object in (iOS) MVC?

In an MVC architecture pattern (for e.g., in iOS) there is a controller per view. In UML there is a concept of having Control object per use case to encapsulate an use case, which may span more than ...
Saran's user avatar
  • 397
1 vote
1 answer
191 views

Separating entities in the business logic layer

I am going to start a project, which in the BLL would have something like: Jumper Map Record I need to keep track of all those, so I will make probably classes which hold them, e.g.: JumperList ...
Nikola's user avatar
  • 367
1 vote
1 answer
439 views

Creating a System Sequence Diagram from an [extended] use case

As I have been taught - one controller = one use case. But I have: OutsiderController SupplierController (which extends OutsiderController) SubContractorController (which also extentds ...
Nikola's user avatar
  • 367
0 votes
0 answers
30 views

Where to add WebApi in a service repo design pattern project?

I am hoping someone has had to do this before and can help. I have a multi tier MVC application that I need to add WebApi, in preparation for moving to .Net Core + react and a new set of controls for ...
QubeSimon's user avatar
0 votes
0 answers
22 views

An IoT client and MVC-based server. Data model with different fields per type?

The problem Let's assume such scenario: List of IoT devices (one model?) Each list item has (among other fields) a type field Depending on the value in the type field, device may report different ...
trejder's user avatar
  • 2,386
0 votes
0 answers
411 views

Spring Boot: Best approach for aggregating DTOs over multiple services

I have the following situation in my spring boot application: I use unidirectional relationship modelling for my database entities, in order to prevent difficulties with a bidirectional approach. (...
msts1906's user avatar
0 votes
3 answers
202 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 @...
hfg124g76g1's user avatar