Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mvc]

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

0
votes
0answers
13 views

Messaging engine architecture with front-end and ORM layer (spring)

I'm looking to push my first QuickFixJ messaging engine into production, and I would like to know the best way to do so. Bear with me. The gist of the responsibilities is as follows: Through ...
0
votes
0answers
17 views

Provide user access on credit card transaction

I'm sorry if it's not a correct type of question to ask on this form, I just don't even know the name of the concept I lack understanding in. Basically I have a database where users have access to a ...
-3
votes
1answer
31 views

MVC Where to put my validation

I just started using MVC this week and was wondering where does input validation go? I have 1 model: Data.cs public partial class Data { public Games getGames(int id) { ...
-2
votes
1answer
14 views

Migration Of Demo Version Projects to Live Version in .Net MVC Applications

I have an application which is currently used by clients. So based on the feedback from the client, normally we are fixing bugs in a live application.Parallel I am adding new modules to demo projects....
-4
votes
0answers
47 views

C# SignalR and risk [closed]

Is using SignalR opening holes in security? And, also if it is heavy and load on server if lets say there are 1000 users at a time? Can anyone advise on what is good and bad approaches when using ...
-2
votes
1answer
60 views

PHP MVC - which approach is the right one

Next semester we'll learn the mvc pattern in web development but since it looks pretty interesting to me i decided to learn it now but...there is a problem. Surfing trough the pages i found two ...
1
vote
0answers
75 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 ...
0
votes
0answers
40 views

Running multiple MVC projects: One site

I am developing a "platform", I have an MVC site that will hold all the main data, as well as our generic API, uses Microsoft authentication to create an account, then our employee MVC will add the ...
2
votes
3answers
96 views

Reconciling MVC with a strategy pattern

I am working on a Rails application which employs a classic MVC as its fundamental structure. In that structure the controller is supposed to be responsible for "which view to render when". Now after ...
0
votes
1answer
112 views

In MVC + SOA Architecture, What is the Rationale for Placing Business Logic in Models?

When writing web applications I place business logic in controllers. This has worked well for my small App Dev team- our applications run reliably, perform well, and the code is easy to maintain. ...
0
votes
1answer
51 views

Modeling entities for company invoice management software

I am making a software to store all my company invoices (and then infer some statistics about it). The idea is: My company issues invoices to it's clients. My company receive invoices from it's ...
1
vote
1answer
150 views

Is this a valid site architecture?

We have a legacy site that was written a while back using MVC. It's a valid MVC for the most part except for the Data Access Layer. The site has Models, Views, and Controllers. However, instead of ...
1
vote
2answers
53 views

Thin Controller: Make a Controller Service wrap other Services?

Say you have a HomepageController that' suppose to show all the blogs, users, gallery, and some members-only info (for logged-in users) Normally, it looks like this: <?php class ...
0
votes
0answers
63 views

For a responsive app, do frequent conditionals checking device size indicate a code smell or antipattern?

I have joined a team working on a large and mature responsive website (using a javascript MVC framework), and one thing I frequently see in the codebase is branching code in controllers or components ...
-1
votes
1answer
152 views

What software pattern is one where I simply assemble things, such as create an array of certain type of data?

TL;DR: what do I call a section of code that is used to assemble a Graph object? I have a fairly large section of code that is duplicated in a few areas. I wish to extract it into its own class. ...
3
votes
1answer
152 views

Propagating Data to multiple ViewModels - C#

I'm a bit new to MVVM, but here's my dilemma: I have a model (or models, but let's keep it simple) I want to show that model data on multiple different views. Ok, so ViewModel for each view gets ...
0
votes
1answer
47 views

What's the best approach to write chronology entries on certain actions in ASP.NET Core MVC?

I'm working on a software product that entails users opening up a case and taking actions to process the case, changing the status, creating tasks, etc. I'd like to provide a history of the actions ...
2
votes
2answers
328 views

Difference between MVC and ECS

Following reading Thomas Owens response (many thanks to him) on Is it reasonable to build applications (not games) using a component-entity-system architecture? and his explanation on what is ECS ...
0
votes
2answers
73 views

Is it a good idea to let database surrogate key values spill out into other aspects of code (HTML, Controllers, Model, Repository layer)?

Is it acceptable to use id in HTML forms and subsequent code processing (controller, view, model, repository layers)? For example I need to show something like this on a web page: Select Motor ...
0
votes
0answers
24 views

JSON in relational DB column for 'custom' data - how to present it on web page

I am creating a generic telemetry system, which records some data about client app usages. Technology used: ASP .NET MVC with EF (code-first) hosted on Azure. There is a requirement to be able to ...
2
votes
2answers
193 views

What is the correct usage of the IEnumerable interface in C# to deal with collections?

When I am working in ASP.Net MVC or WebApi, I often find myself creating Views or return data structures that include 'List<>'s of objects. Meaning that I have a list of data objects that I want to ...
2
votes
0answers
117 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 ...
1
vote
1answer
40 views

What is the best way to implement model property authorization in an ASP MVC?

We have an MVC application that has very granular and configurable authorization. We currently have been using the authorize attribute against our controllers and controller functions. The next ...
0
votes
1answer
34 views

If I need connection to get data, then display the data at controller A, should I “Connect->To controller A”, or “To controller A->Connect”?

For example, suppose I have a shopping app, which has a user info page to show user info: class UserInfoController{ toPurchaseRecord(){ } } and a purchase record page to show purchase record,...
1
vote
0answers
234 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 ...
0
votes
1answer
35 views

ViewConfig inheritence hierarchy for views

I need some help with the hierarchy of view configs, which populate my views (templates). Maybe view config is not the correct term here, it's just the one I'm using, maybe view state makes more sense?...
3
votes
1answer
108 views

Future/Promise objects in Controllers - Best practice - MVC

I was going through some articles related to Futures and Callables today and was thinking about the best practices when working in an MVC based environment. I was wondering, should one be creating ...
2
votes
1answer
59 views

Abstraction for Account transactions and balance

We have 10 applications which updates account balance table, without logging credit/debit line transactions (not sure why). They all have the pretty much same SQL Statement. In order to get out of ...
-1
votes
1answer
52 views

C# Separate Online Store into Different Solutions and Nugets

I am creating an Online Shopping Cart store. It is built through Net MVC Core. There is a Front End View website: html, css, razor. Then we have backend code design for Customers: including shopping ...
1
vote
1answer
304 views

Architecture / Design Pattern for Login Signup

I have a multi-seller ecommerce platform, derived out of Opencart 2.3. We changed quite a bit of the core code of the Opencart to add our own customizations, including features such as Seller ...
1
vote
1answer
56 views

Using a JWT for a web service after logging in (login twice?)

Good day everybody, My capstone project partners are stumped with a logic question that has to do with JWT, MVC & web services. We have already built a web app with a signup/signin feature using ...
-3
votes
1answer
125 views

What things to refactor first [duplicate]

I do understand this is a wild question and totally open-ended but just wanted to know that I am barking up the right tree. I've inherited a large code base of many solutions and services, and whilst ...
2
votes
6answers
391 views

Models: two very different concepts

There are a lot of questions and answers about what a/the model is. Particularly when discussing where business logic belongs and the MVC pattern. There seem to be two concepts that need to be severed....
1
vote
2answers
71 views

Should model/view in MVC be concrete or generic?

In the MVC pattern, should model and view be very concrete and tailored to the represented component? Or should they be as generic as possible so that they can easily be reused? Specific case My ...
1
vote
0answers
132 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 ...
1
vote
1answer
105 views

MVC: How to use data model list in recursive views

I am trying to learn web app MVC in PHP.Most of the articles discussed about 1-to-1 MVC pattern given bellow Controller: gets user request & update model, Model: receives orders form Controller &...
0
votes
1answer
553 views

PHP MVC controllers using ajax

I'm learning to use the MVC pattern to design my PHP's software. I always use ajax to send requests to my controllers so often I've a code structure like this: <?php if(isset($_POST['action']) &...
0
votes
1answer
30 views

A separate UIViewController for UITextField - iOS

In my iOS project I have a set of custom textfields, e.g. for password entry. As an example, such textfields can contain additional views and logic - for example, show or hide a password with a press ...
0
votes
0answers
42 views

how to structure symfony's code in case of lack of models

I have the following scenario: I'm developing a CRM in symfony which takes advantage of microservices to gather and manage information. Basically what it does is presenting information coming from the ...
1
vote
4answers
263 views

How to organize code based on functionality

I use MVC + service classes in my project. My projects structure looks like this: -MySolution.Web -MySolution.Models -MySolution.Services -MySolution.Common MySolution.Web is an asp.net web ...
3
votes
2answers
76 views

Where do I encode value conversion methods in an MVC web app to display values in different unit systems in the View?

I have a use case where I do internal data computations using English system, due to various precomputed graph coefficients and other data already using the English system. But for output I need to ...
2
votes
0answers
76 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), ...
1
vote
2answers
28 views

Should I move my pricing service and creation of entity into the `SaveLineItem` service?

This is an MVC design/refactoring question. I am using a Controller and inside I do these tasks: I get Price of an object from a database, for which I use a repository pattern Create a LineItem ...
0
votes
2answers
56 views

Is RenderAction compatible with MVC architecture?

So I just came across an extension method built into ASP.NET MVC: ChildActionExtensions.RenderAction(...). This invokes an action method using the given parameters and renders the result inline in ...
1
vote
0answers
44 views

PHP MVC - Single action for multiple similar views or one action for each?

For example, if I have 3 database tables that have similar columns/attributes: cats, dogs, bunnies Each table has a view that consists of an html table listing all records in the table, and a form ...
0
votes
0answers
35 views

Where to keep the code for new instance of an object in iOS project?

Example: There is a KingDetailViewController class with the following code. // MARK: - New Instance extension KingDetailViewController { class func newInstance() -> ...
1
vote
3answers
178 views

Is it bad practice to build a large web component as a Html Helper?

So, from my understanding, Html Helpers are supposed to be for single elements or small snippets of html. However, I'm not really sure why I think this, or how I came to abide by the practice. I ...
-3
votes
2answers
1k views

Is it better choice to use both AngularJS and ASP.Net MVC for developing ecommerce website?

I know about MVC, But I don't have such experience with AngularJS. But both has controller and View. To develope like e-commerce site, is it good choice to choose AngularJS to do filtering with ...
-1
votes
1answer
151 views

Should a graphical user interface implement Propertychangelistener or it's objects?

I was learning about design patterns and i came across a line where a domain object has to update it's view using observer design pattern. In the book , Applying UML and design pattern, It says Let ...
1
vote
1answer
105 views

Are signals/events the only way to modify one view from another?

I need to set a mode in one view from a different view. Trying to stay organized with MVC. Looking at answer at Invoke model logic in one UserControl from view-model in another UserControl without ...