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

learn more… | top users | synonyms

3
votes
2answers
175 views

Which do you code first, MVC? [closed]

I have been coding for a good bit, and I found a project I want to work on -- a python web app using django + mongodb. I know what I want my web app to do. When you are in this circumstance (just ...
1
vote
1answer
150 views

Why no MVC methodology for desktop applications? [closed]

I'm currently learning how to develop web apps with C#, ASP, .NET and MVC. I am enjoying the MVC paradigm a lot, but then thought about using this to develop desktop software with. I googled around, ...
0
votes
1answer
105 views

Design MVC site such that UI developer can work without access to data tier? [closed]

I'm working on an ASP.NET MVC site (using Team Foundation Service for source control) that I've divided into a few separate projects under one solution: Project.WebAPI (Main entrypoint, contains ...
0
votes
2answers
203 views

Is it wrong to have HTML strings within PHP objects, or is it only wrong in controllers?

I've always thought that in typical MVC design it is bad practice to build & concatenate HTML strings in any PHP file or class that isn't strictly a template. I'm working on a large project with ...
0
votes
1answer
144 views

MVC in a desktop application - can the View ever hold a reference to the Model?

(I'm specifying this is a desktop application so people wouldn't refer specifically to web implementations of MVC). The title says it all pretty much. In an MVC structure - can the View ever hold a ...
0
votes
0answers
67 views

How should I populate a list of database-sourced models?

I have a model which sources its data from a MySQL database using a load() public method. If I have a collection of models, I have to loop through each model and call its load() method individually; ...
0
votes
3answers
112 views

Can MVC implementations differ in design-details and still be considered MVC implementations?

Is the Model-View-Controller pattern very strictly defined, to it's design details? Or is it a term, like many others, with lots of different interpretations and versions (that all fit the ...
4
votes
3answers
438 views

Model-View-Controller: Does the user interact with the View or with the Controller? [closed]

I have recently learned about the MVC design pattern. I'm learning from the Head First Design Pattern book. According to this book (if I understand correctly): The Model is most of the application ...
0
votes
1answer
172 views

Is it fine to skip MVC?

I am building a pair of components that communicates in a one-way fashion: [ JButton ] --> data...process...process...out --> [ JTextField ] The JButton allows the user to select a file and ...
0
votes
1answer
30 views

Pull Frequency Parameters in MVC architecture

Assume a simple SPA (Single-page application), maybe a dashboard and these basic conditions: The Model contains methods for accessing and displaying data; The View contains methods to load ...
1
vote
1answer
198 views

MVC & 3 tier architecture in game - What is the business layer

I am making a game and have been following examples which use the MVC architecture pattern. I am now trying to get my head around how this would fit in with a 3-tier architecture. From what I have ...
-1
votes
1answer
115 views

Building a webservice with mvc [closed]

I'am planning my website over here based on MVC. And I am thinking about a webservice (who knows, maybe one day I'll create an android app or something). The site and the webservice will behave ...
1
vote
0answers
99 views

Run a function when a function in a list is executed?

Goal: I'm currently doing an MVC project and I have this method to update the ViewBag (based on previous actions of the user). I would like to call this function whenever a certain list of MVC Actions ...
3
votes
5answers
3k views

Server side C# MVC with AngularJS

I like using .NET MVC and have used it quite a bit in the past. I have also built SPA's using AngularJS with no page loads other than the initial one. I think I want to use a blend of the two in ...
0
votes
1answer
53 views

What is the best way to keep both html document structure and php control structure strongly visible in complex view file

I create a lot of views in my work as part of the common MVC pattern applied in web frameworks like Code Igniter and Cake. I also adhere to the following maxim as best I can: fat models and library ...
0
votes
1answer
177 views

MVC: How to Implement Linked Views?

I'm developing a java application to visualize time series. I need (at least) three linked views, meaning that interaction with one of them updates the others. The views are: A list represents the ...
1
vote
1answer
452 views

Is there a best practice for populating a dropdown in ASP.Net MVC? [closed]

I'm coming into a project where the overlying method is to open the page, then use jquery AJAX calls to populate all of the dropdowns dynamically in the page. To me, this seems like an extra burden ...
0
votes
2answers
72 views

Why additional code and complexity when data model and interaction are simple is considered a disadvantage in MVC model

According to the slides given by my lecturer, one of the disadvantages of MVC model is additional code and complexity when data model and interaction are simple Why is this so, I would assume ...
1
vote
1answer
146 views

Web design pattern

I am building a small website, in PHP and I am using MVC design pattern for the UI. In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone. All ...
2
votes
2answers
675 views

Domain Model vs View Model

I'm in the early stages of my programming career and I've been working with MVC for just about a year now. I've spent much time learning about the pattern and the concepts behind it, but as the ...
1
vote
3answers
203 views

MVC: What is the difference between a model and a service?

Why in some frameworks the logic layer is called "Model" whereas in some it is called "Service". Are they different from each other or just different by naming conventions? UPDATE 1 The reason I'm ...
3
votes
2answers
319 views

Help With Dependency Injection

I am still very confused as to why and when to use Dependency Injection. If anyone could explain maybe using the below example that would be great, any other explanations would be appreciated. Lets ...
-2
votes
1answer
131 views

Best practices in Application's flow diagram [closed]

I make web applications, mostly MVC, object oriented and database enabled. I always have trouble going back to project after a few months of release and work again. I don't even remember what I made ...
1
vote
2answers
231 views

Good Programming Practice for similar child classes

I am developing an iOS application, in which I have to draw some patterns on a view based on option selected by user. Let me explain you more clearly. User will be shown number of images as options ...
4
votes
1answer
209 views

Designing storage service data structure for decoupled models sharing same data

Surely most of you remember the Norton Commander application where similar (sometimes the same) data is displayed in separate decoupled views. I'm building a web application that follows the same ...
2
votes
2answers
116 views

Handling login errors with User Class

We have a User class which handles all things related to users within a Content Management System. As you'd expect, the class contains a function login(). This function accepts three arguments: ...
1
vote
1answer
102 views

Need help modelling a User/Project/Task relationship

So I'm creating a very simple project/task management application in Laravel 4 and I'm not sure how these relationships would work. I have a Project, Task and User model. A User can own a Project or ...
2
votes
3answers
156 views

How to properly distinguish between MVC and three-tier?

Many webapp frameworks, e.g. Spring,call themselves MVC frameworks, but how is the distinction done between MVC and three-tier? It seems that some frameworks call themselves MVC frameworks but they ...
0
votes
1answer
97 views

MVC Widget optimization when accessing CSS and Resources

So we're trying to re-imagine our web solution in an MVC fashion. Going from an old webforms based solution to working with ASP.NET MVC with a bootstrap main menu and adding functionality in the forms ...
0
votes
1answer
176 views

Practical Use of Depency Injection (IoC) Container

I am creating a MVC-ish framework in PHP. I am trying to implement a DI Container to allow the creation of controller objects (among others). My MVC framework is pretty typical. Each module (or ...
2
votes
1answer
100 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
50 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 ...
15
votes
10answers
2k 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
141 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 ...
3
votes
5answers
1k 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
643 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
136 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
93 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
222 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
78 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
54 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 ...
3
votes
2answers
2k 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
131 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
1k 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
685 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
485 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
170 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
402 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
159 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 ...
4
votes
4answers
712 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 ...