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

learn more… | top users | synonyms

2
votes
1answer
131 views

Models Views and Controllers jobs

First, I know there are lot of answers about MVC but I need some more-specific ansewer based on my probably wrong understanding of MVC. I've already read this very good answer (Explain Model View ...
1
vote
0answers
51 views

Best practice or design patterns for retrieval of data for reporting and dashboards in a domain-rich application [duplicate]

First, I want to say this seems to be a neglected question/area, so if this question needs improvement, help me make this a great question that can benefit others! In my experience, there are two ...
17
votes
10answers
4k views

Best practice or design patterns for retrieval of data for reporting and dashboards in a domain-rich application

First, I want to say this seems to be a neglected question/area, so if this question needs improvement, help me make this a great question that can benefit others! I'm looking for advice and help from ...
-1
votes
2answers
150 views

How to fit requirements into MVC

Let's say we have a website requirement to allow User functionality. Simple! We create the UserModel, UserController and UserView. Works perfectly. However, let's assume that User has a many-to-one ...
5
votes
5answers
2k views

Programming PHP without MVC, classes or framework: rewrite or continue on new features?

I have been programming for several years now, and back then (learning PHP) I've didn't learn to program using classes, MVC-logic or using any frameworks. I found my self solving my problems very well ...
2
votes
4answers
1k views

To MVC or not MVC, that is the question

Originally, I started off doing jQuery plugins, then moved onto Backbone.js applications, then been experimenting with MicroJS MVC modules, but these days I'm even wondering if there is any need for ...
0
votes
1answer
143 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 ...
2
votes
1answer
95 views

Which layer should order the columns shown to the user when using MVC?

Say you want to render a table with five columns, but you want the order of the columns to be different depending on some specific parameter. This would be very easy to accomplish if the model sets ...
0
votes
1answer
270 views

How would I structure my code into an MVC format?

I want to have the home page (root of the website), check if a cookie exists for a user being logged in, and then based off of that determining whether or not to load the sign up page (landing page) ...
0
votes
1answer
91 views

Terminalogy “Controller” in MVC and “ViewController” in IOS

While studying IOS, i generally come across viewcontroller. That gives me, confusion, if this "ViewController" has to do something with controller ( in MVC ) ? But how come both "view" and ...
0
votes
1answer
69 views

Using MVC strictly with DAAB?

I am the only one at my company that is familiar with MVC and they are getting more pressure to modernize and switch to MVC for future projects, so I was tasked to create a template to use as a base ...
5
votes
2answers
5k views

Global constant values throughout MVC site

My MVC (.NET) has some constant values through out the site, such as the phone number, physical address, email address etc. I'd like to store this value once, so future updates are easier for when ...
3
votes
1answer
137 views

When is it okay to reassign the model for a view in MVC?

Is it ever really acceptable to reassign the model for a view in MVC? (Or MV* where applicable.) In other words, for a single view instance, is it ever ok to reassign the view's model? That is, as ...
0
votes
1answer
2k views

Mobile development project architecture model/pattern

I would like to hear some improvement suggestions for mobile development (Android/iOS) project architectures. I would like to go for a "safe" design, modular and that can be easily maintained in time. ...
0
votes
2answers
1k views

Model-View-Controller — Where does a factory class go?

I'm working (slowly) on a small Flask project. One of my models is a class called Post, which is a lightweight namedtuple. Post objects are created by a PostFactory, because creating a Post involves ...
0
votes
1answer
745 views

Slower Ajax Response

Does putting the view logic inside the controller increase page load speed? Because I have a controller action calling a view which I am loading through ajax and I am getting a very slow response. Why ...
6
votes
1answer
231 views

Testing: deterministic or non-deterministic?

Is it better to have either a Deterministic test suite, that results in the same tests succeeding Non-deterministic test suite, which potentially possibly covers more cases ? Example: You write a ...
2
votes
2answers
502 views

Package diagram for an MVC patterned project?

We are required to make a package diagram for our senior project. Since our project uses MVC patter design, we created an MVC class diagram, now, our problem is in creating the package diagrams from ...
2
votes
1answer
166 views

MVP pattern and references

I am doing a Windows C# application. I asked this question and I was told that the viewer/presenter should never know anything about the model. Does this mean that I should not add a reference of my ...
5
votes
5answers
1k views

Where should user permission checks take place in and MVC and by who?

Should user permission checks take place in the model or the controller? And who should handle the permission checks, the User object or some UserManagement helper? Where should it happen? Checking ...
1
vote
4answers
676 views

MVC to create desktop and mobile webapps? [closed]

I'm planning the creation of a webapp with a dedicated mobile web interface and a dedicated desktop/tablet interface. I am considering ASP.NET MVC, but it is clear to me that MVC is for separation of ...
2
votes
2answers
200 views

HMVC and Database Connections

Whilst I have good experience with OOP, I'm fairly new to the concept of (H)MVC. I understand the basic concept of modular design that comes with HMVC, it's the great attraction of it. But one thing ...
2
votes
2answers
86 views

We have a custom program that generates all the stored procs and classes for the Data Tier. Where will I put the generated classes?

This is more of an architectural question regarding MVC and Data Access: We have a custom program that generates all the stored procs and classes for the Data Tier from the MS SQL database. It's ...
1
vote
2answers
242 views

Is there a design pattern that describes the separation of a Form from a Model

I am working on a web application implemented in C#, that follows MVC conventions. This application contains a page that allows me to create or update a Wingding. The view passes a complete Wingding ...
0
votes
1answer
183 views

How to update User interface form through database update

I have a client server application. Assume I work as a Support executive, resolving customer tickets. We(our support team) have got two tickets to work on. Ticket 1: Client "Liver" raised a ticket ...
0
votes
1answer
33 views

how do you style content when querying a data structure nested n-levels deep?

This question has come up while writing a simple text adventure game where your character has an inventory, which can include containers that also have things in them. I want a clean way to style the ...
0
votes
2answers
291 views

What could be the Model Layer when consuming Web-Services and no Database in Django?

I'm using Django as an application framework and it only needs to consume web services (no need to have traditional Django Models and the related ORM). In this case, since Django is a variant on the ...
2
votes
0answers
259 views

Is this any form of service pattern, some other pattern, SOA or just an anti-pattern?

I'm going to set out a scenario/pattern I've encountered and then I have a few questions pertaining to it. During an MVC request in a web framework (PHP, Laravel in my case), if I have an abstract ...
0
votes
2answers
138 views

MVC sending information from view to controller

I am using the MVC pattern. Lets say I want to create a new object and add it to my database. Where is it better to create the new object: View: Boo boo = new Boo("awesomness"); ...
2
votes
3answers
2k views

REST API at backend and MVC Javascript framework at client side

I am building an online social network. I have finished writing RESTful API service using Django. This will return only JSON response (No HTML will be generated from server side) so that this JSON ...
0
votes
3answers
3k views

MVC Design Pattern to Combine Multiple Models for use

In my design, I have multiple models and each model has a controller. I need to use all the models to process some operation. Most examples I see are pretty simple with 1 view, 1 controller, and 1 ...
0
votes
1answer
2k views

Making Class Diagram for MVC Pattern Project

I have a question about making a class diagram for an MVC based college senior project. If we have 2 actors of users in my system, lets say Undergrad and Graduate students are the children of ...
1
vote
3answers
668 views

MVC is a GUI Architecture or a Architecture to GUI and Domain?

Fowler refers to the MVC, as a GUI architecture: There have been many different ways to organize the code for a rich client system. Here I discuss a selection of those that I feel have been the ...
2
votes
5answers
6k views

Business Logic Layer in MVC Application

In my ASP MVC application I decided to add another Business Layer and made the model only to have properties. All other functionality like save to db, get from db is done on this new Business layer. ...
0
votes
3answers
480 views

What are the steps to grouping related classes into packages

What are the steps needed to be taken to group related classes into packages in Java? In my case, I have about a number of .java files that I'd like to group into 3 packages according to the MVC ...
0
votes
1answer
277 views

Implementing separation of concerns via MVC

I'm creating a question to see if my understanding of MVC separation is correct, I haven't been able to find a clear answer anywhere online. So is this the right way to implement it (in Java): I ...
4
votes
3answers
233 views

Tell a user whether they have already viewed an item in a list. How?

It is pretty common for a web application to display a list of items and for each item in the list to indicate to the current user whether they have already viewed the associated item. An approach ...
1
vote
3answers
185 views

Law of Demeter in MVC regarding Controller-View communication

The scenario: Having a Controller that controls a view composed of complex subviews. Each one of those subviews is a separated class in a separate file. For example, one of those subviews is called ...
3
votes
1answer
867 views

Is it bad practice to call a controller action from a view that was rendered by another controller?

Let's say I have an OrderController which handles orders. The user adds products to it through the view, and then the final price gets calculated through an AJAX call to a controller action. The ...
13
votes
4answers
691 views

Switch vs Polymorphism when dealing with model and view

I can't figure out a better solution to my problem. I have a view controller that presents a list of elements. Those elements are models that can be an instance of B, C, D, etc and inherit from A. So ...
4
votes
2answers
314 views

Permissions and MVC

I’m in the progress of developing a web application. This web application is mostly a CRUD interface, although some users are only allowed to perform some actions and see only some parts of views. ...
4
votes
4answers
599 views

Business rule to display data in all uppercase - how to handle?

Part of a system I am working on manages some securities information (stocks, bonds, etc...) and business rules specify certain fields be displayed only in all CAPS (stock symbols and CUSIPs for ...
5
votes
2answers
2k views

Best Practices PHP mvc routing

I have a custom MVC framework that is in a constant state of evolution. There's a long standing debate with a co-worker how the routing should work. Considering the following directory structure: ...
7
votes
2answers
7k views

.NET MVC project architecture / layering

When planning the architecture for a mid-large scale MVC web application how do you implement the layers to be as decoupled as possible and easy to test? (basically follow best practices) Let's say ...
4
votes
2answers
807 views

Managing threads in Java with a good pattern

This morning I began writing a minimal chat using Java socket and threads but it took some minutes for me to experience a lot of problems in the MVC management. Currently I have 3 classes: Main, ...
1
vote
1answer
4k views

Java desktop application using MVC + Hibernate

I'm developing a Java desktop application. I'm planning to use MVC architecture described at Oracle site: Java SE Application Design With MVC. I need to store data in database so I decide to use ...
3
votes
4answers
4k views

Use a service layer with MVC

If a controller gets to fat and model instantation starts to add up a service layer could be used. If I just wrap the logic inside a service class I will get a bunch of Services with one/two ...
1
vote
2answers
174 views

MVC Models instantiation

Where should the Models be instatiated in a MVC arhitecture? I understand the preferred way would be outside controllers, in a bootstrap file and injected using a Dependecy Injection Container. But ...
1
vote
1answer
177 views

how to model a connection to a resource, with rudimentary event processing

For my simple MUD client I'm using Apache Telnet (no, not ssh). A mud client is a strange beast: Generally, a MUD client is a very basic telnet client that lacks VT100 terminal emulation and the ...
4
votes
2answers
932 views

How does MVC work with the principle “Tell, Don't ask”?

Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. — Alec Sharp So, when a view wants to display some information that is suppose to be ...