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

learn more… | top users | synonyms

0
votes
1answer
46 views

CSV file processing in MVC

I am using a MVC framework and I have developed a module where .csv file is being imported into the database, I am little unsure about certain things which I'll try to explain below: Step 1: .csv ...
-3
votes
0answers
38 views

Chrome Extension - Design patterns [on hold]

I will start with the development of Chrome Extension that is somewhat complex. I would like to organize the code in MVC pattern style. The View is probably not that important but I would like to ...
-1
votes
0answers
63 views

Why one should follow MVC to the word? [duplicate]

After analyzing MVC parrent for PHP i come to conclusion its nothing more than template language essentially, and greatly overemphasized as something genius and cool is just a hype. Lets look at it: ...
-2
votes
1answer
102 views

MVC with several MVC-patterns and gameloop

I made a small program using several MVC-patterns. So far I havnt got to much stuff to put in the model so I havnt got any model yet. My idea is to make one MVC pattern for each panel. And looping ...
1
vote
1answer
52 views

Good design patterns within JavaFX — MVC?

I have used a lot of JavaFX and am familiar with the technical aspects. Now, as I foray into a very large application with hundreds of views, I want to make sure I start strong with a solid design. ...
0
votes
2answers
100 views

Repository Pattern with Multiple ORM

We are developing the application with MVC and Repository Pattern. Currently we are using EF as an ORM. But Later we need to change the ORM to nHibernate. Any Idea on the architecture. Currently I ...
0
votes
1answer
18 views

MVC List Children - Which Controller

We are currently devloping a ASP MVC Webapplication. In this Webapplication, we have a User that can have 1 or many contracts. We currently have 2 controller: UserController ContractController Now ...
1
vote
0answers
54 views

How to trigger other events in MVC, once the desired event completes?

What is a technique in MVC that can be used to trigger updates? Namely, When user clicks a button save a product I have this: function saveProduct($product) { $this->repository->...
1
vote
1answer
67 views

How to use object oriented principles to design a system that trims, selects, and formats values based on business rules, and unit measuring system?

TL;DR: I have bad, no .. horrible, horrendous code that kind of works but is a mess and is not easily maintainable. I want to redesign it and repackage it to where objects are well defined and ...
3
votes
2answers
195 views

Where to put “orchestration” code

I have a web application implementing the MVC pattern where I have controller classes whose methods each map to an HTTP request. I also have a service layer with a bunch of service classes, with each ...
0
votes
0answers
77 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. ...
1
vote
1answer
66 views

When to create an in-memory object to manage repository records?

Suppose I have a conceptual Ledger that is populated with Line Items. Assume that Line Items themselves are stored in some type of persistent storage. The ledger is shown to the user who can add/...
2
votes
2answers
156 views

Am I breaking SRP when I inject Factory pattern with Repository layer?

In the context of MVC sometimes I find myself creating a Factory and injecting the factory with Repository. While it is certainly possible to use Repository as layer inside the Factory, I wonder if ...
1
vote
3answers
113 views

Where to put a certain kind of functions in MVC structure

I'm just starting out using programming using the MVC design pattern, and I would like to know if I understood it correctly and where I should put certain things. So I understood that I should put ...
-1
votes
1answer
58 views

In a MVC application, what is the correct way to organize the entry points for the business logic?

Generally speaking in a MVC framework we have the Controllers that do things like making sense of a request, preparing the parameters and starting an action in the business logic through some kind of "...
0
votes
0answers
21 views

ASP MVC Chosing between Areas and Subdomains

I have a large ASP MVC website that until recently has had only 1 developer (If that matters). We have since taken on a second developer to work on MI / Reports for the system. Reports and MI for ...
1
vote
1answer
162 views

Should I only load in the code I need if there's no performance impact for loading all of it

I have a software application. Currently at the start of each Controller it loads in only the Models it needs for that Controller. I recently tested and found that including all the models appears to ...
0
votes
0answers
133 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-...
1
vote
1answer
74 views

Spring MVC - Handling validation errors using AJAX

I'm new to Spring MVC, hence the question may appear trivial. I have a login form which is submitted via ajax and in return I receive a ModelAndView (displaying existing list of contacts of the user) ...
3
votes
2answers
152 views

How to decouple UI from logic on Pyqt/Qt apps properly?

I've read quite a lot about this subject in the past and watched some interesting talks like this one from Uncle Bob's. Still I always find pretty difficult to architect properly my desktop ...
0
votes
1answer
97 views

How can I move from Web Forms to ASP .NET MVC 5?

I've been using Web Forms for way too long now and I want to switch to ASP .NET MVC 5 because I think that it's the "next step" for a ASP .NET developer. I also find it to generate pages a lot faster ...
-1
votes
2answers
132 views

Should Microservice still use web framework such as Spring

My understanding of Microservice architect is that much of the work is shifted to the front end client side in a single page application (SPA). The SPA will then interact with the back end ...
0
votes
0answers
90 views

How to design the state tree using redux?

In the last days I have searched for a documenation on how and when is it best to use redux and how to design the state tree. My research ended in the conclution that there is no one currect answer. ...
0
votes
1answer
102 views

How do I refactor massive view controller

I have a view controller which has 5 different subviews, these subviews are changed according to some conditions, then there are functions which apply background color and add some minor aesthetics to ...
1
vote
0answers
31 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 ...
2
votes
2answers
123 views

ASP.NET MVC: where to put data-entry logic which hits the database

We do simple data entry validation with attributes on the viewmodel. Think format of an email address, mandatory clientname, format of a date, the housenumber being numeric etc. Now there are also ...
1
vote
1answer
83 views

API oriented web app for both public and private consumptions in Ruby

In traditional Rail app, we need to deal with controller/model/action and has a view that generate HTML output. Now There are many JS framework like backbone/react that allow us to code client side ...
0
votes
1answer
47 views

Should I create a new generic model for two existing similar models?

We have two very similar modules in our MVC project - one for reports and one for exports. Just to explain our nomenclature - exports is only used to generate flat files, and reports is only used to ...
4
votes
1answer
264 views

How to architecture a realtime-heavy websockets-based web application?

In the process of developing a realtime Single Page Application, I have progressively adopted websockets to empower my users with up to date data. During this phase, I was sad to notice that I was ...
1
vote
7answers
413 views

REST MVC Confusion For An Enterprise Appplication Architecture [closed]

I already have experience working with MVC based web apps and started reading recently about REST. But went into confusion when re-thinking about how existing web app not using any kind of framework/...
1
vote
2answers
62 views

Defining reusable components while having a specific application in mind

Over the past several months I have learned a lot in software design and practices across several languages and frameworks. To me, the most attractive and useful designs patterns are those that follow ...
1
vote
1answer
66 views

MVC, Services and DAO: Fundamental design choices, error handling and return values

Edit: There is no "right" or "wrong" answer here, I was merely trying to get people to share their dos and don'ts. Behind this rather vague topic I would like to address a few problems I've been ...
2
votes
1answer
221 views

JavaScript - Client-side separation of Model and ViewModel?

I am developing web apps using the Model-View-ViewModel approach with Knockout.js. After reading on the original introduction of MVVM by John Gossman, I realized that my ViewModel always contains ALL ...
1
vote
0answers
78 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 ...
0
votes
1answer
83 views

Questions regarding my MVC application

I'm learning .net MVC while developing a simple word list - Eg. When you learn a new language and create a list of words related to a certain topic. I don't think I'm following the rules or good ...
1
vote
4answers
454 views

MVC and RESTful API service

MVC is pretty straightforward. There is a Model, a Controller and a View. When we create a website, it all come together as 'client sends REST keyword request to server -> the server matches the ...
0
votes
1answer
31 views

Does a UIView object with an embedded UIButton and IBAction defy MVC principles?

Does a UIView object with an embedded UIButton and IBAction violate MVC principles? Example: class MyView: UIView { @IBOutlet weak var myButton: UIButton! @IBAction func myButtonTapped(...
2
votes
3answers
153 views

Is creating “shortcut methods” in the superclass of a controller Bad Practice?

Consider the following simplified example: abstract public class Controller { protected final boolean isUserAdmin() { return getServiceContainer().getUserService().isUserAdmin(); } ...
1
vote
2answers
61 views

In MVC, should I access the view or recieve parameters?

For example, I have an UI with a button "Get Items" and a text field "Order". Then my button will retrieve all items from the order written in the text field. How should my controller know the order? ...
1
vote
1answer
69 views

Coding guidlines for Controller and Dao?

My Controller code: ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); ObjectReader objectReader = objectMapper.reader(...
0
votes
0answers
42 views

Project directory structure (javascript)

Over my years of practice and through most of the reading I've done, the oft recommended directory structure for a web app project has been closely tied to the MVC structure: tests/ src/ styles/ ...
1
vote
0answers
109 views

What would you call this design pattern? MVC or PAC

I have been reading and researching about MVC, HMVC, MVP, MVVM and PAC design patterns when I came accross this article by larry garfield > MVC vs. PAC My Implementation: Think of a modular app ...
3
votes
3answers
153 views

Where should view-specific data/logic be defined in a PHP MVC application?

After many hours of research and thinking I have found an understanding, then coming to question it again, I am struggling to find something concrete which I can grasp and apply to my code in a ...
2
votes
2answers
213 views

where to put which code in MVC model

I recently picked up learning PHP and MySQL and I am trying to build a small usersystem as a coding exercise. While learning to use classes and functions, I also stumbled upon the MVC model and would ...
0
votes
2answers
70 views

Should we sanitise and clean data or only display it in the expected format?

So my problem is, I have users entering their data(names, address) in a mixed form- some with first letter in caps and some without, some inserting more than necessary spaces and so forth. Also, ...
0
votes
0answers
72 views

Should Rails views actually render anything?

I've joined a Rails app with hundreds of pages and no tests, first thing I've done is set us up with model-, controller- and feature-tests and I'm adding them as I work on areas. One thing I'm ...
0
votes
2answers
371 views

How does two-way data binding differ from simple auto-sync?

The AngularJS documentation mentions that it considers one-way data binding to be 'bad' and two-way data bind to be 'good*'. However, on looking over the definitions of two-way data binding used, all ...
-2
votes
1answer
370 views

How to incoporate jQuery UI into ASP.NET MVC 5 project that is on an offline system? [closed]

I am having some issues trying to incorporate jQuery UI into my project. I cannot use Nuget or anything else that goes to the internet, so I have downloaded the development package from the jQuery UI ...
4
votes
1answer
136 views

MVC: Display requested content via the View

I'm trying to learn how the MVC pattern works so have been playing around a bit. I just wrote this, which was making sense to me, until I wanted to display the array content which has been collect by ...
4
votes
1answer
52 views

How to prevent endles event recursion when using event driven data view?

Consider that you have some graphical interface that represents some data structure. For example a text field: This field is connected to the data structure through events. I tried to make diagram of ...