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

learn more… | top users | synonyms

1
vote
1answer
38 views

Converting from AppHarbor to Azure

I'm thinking of switching my cloud provider from AppHarbor to Azure. Main reason, I love the ability of being able to scale up the number of workers as traffic/cpu usage gets really high. My question ...
0
votes
1answer
130 views

How a real MVC is different from todays MVC used in the web? [on hold]

ive heard that MVC used now in days could be called webMVC because they dont implement it like the actual MVC is, so it makes me wonder if there is a guide where i can find the real MVC architecture ...
-4
votes
0answers
29 views

Learning a few things in .Net [on hold]

So I've been doing .net for about 5 years now. I am pretty comfortable with C# and .net in general and I do understand what's going on behind the scenes in many of the cases. If I'm not sure what's ...
-1
votes
0answers
34 views

Clearly defining an Implementation detail

In what way could I, when designing my API, framework or whatever decide what is and what is not an implementation detail? What questions do I ask in order to correctly answer: "Is that something my ...
1
vote
1answer
82 views

Static controllers

I have built myself a PHP MVC framework to meet my needs. As pretty much all of the core classes are static, I just stumbled upon the idea of having static controllers. I know that for some reason ...
0
votes
2answers
52 views

Making an MVC app extensible for multiple business markets

Suppose you are to create a single, global e-commerce application to support multiple markets in different regions of the world using ASP.NET MVC. Although most of the business logic for the ...
-1
votes
0answers
21 views

MVC Application Extension reusing the service / dao layers

I am about to start my own project spun off a greater Opensource project. I am trying to get my head around best practice, both in terms of application portability and stability. To explain: ...
-4
votes
0answers
41 views

How to remove session id from asp.net mvc url when cookieless is set to true? [closed]

To achieve session per browser tab, cookieless is set to true. But this is creating url in the format "{site url}/{session id guid}/{controller}/{action}". But, I need url of the format "{site ...
3
votes
1answer
326 views

MVC: Where is the right place to set error messages?

I have a ASP.NET MVC application where in all my Models have an Errors Property used to store non-validation errors which I than display in my Views. Where is the right place to populate the error ...
0
votes
0answers
63 views

The finer points of HMVC

I'm new to HMVC and whilst tutorials are great about dealing with the overall details of keeping modules separate and only letting controllers communicate, they aren't so great at explaining the ...
0
votes
0answers
40 views

Should there only be one controller per page within a JavaScript-based MVC architecture?

Let's say that I create a page in my marketplace web application where buyers can see a catalog of all products offered by some or all sellers or sellers can see just their own products in a preview ...
0
votes
0answers
8 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, ...
1
vote
0answers
76 views

How to efficiently handle related data in MVC?

Talking about MVC with servlets and JSP's, in a context about products and manufacturers , when querying the application for a list of products: the servlet loads a list of products from the ...
2
votes
1answer
86 views

Should this interpretation happen in the Controller or the Model?

Imagine an application where the user is allowed to create his/her own musical scales. The user selects notes from a list, arranges them to a group and presses a button to create the scale. In an MVC ...
0
votes
1answer
21 views

How to run a function and load Viewbag on every page load?

Here is my issue. On my _Layout, I have a help button that shows up on every page in my MVC application. Is there a way to assign the Viewbag with my simple model without having to put in every ...
2
votes
1answer
113 views

How to tell the View to create a cookie?

I have a LoginService class with loginUser($email, $password, $remember = false) method in the application layer of my model layer. Now, if $remember is true it needs to create a persistent user ...
0
votes
0answers
28 views

How to determine what should get it's own respective controller?

I'm using the MVC pattern in my web application built with PHP. I'm always struggling to determine whether I need a new dedicated controller for a set of actions or if I should place them inside an ...
0
votes
1answer
38 views

How to avoid model duplication in JavaEE web applications with a JSON front end

Recently we developed a web app that uses the following tech stack: hibernate as orm spring extjs (MVC javascript front end) For 1 business object, let it be a Personnel, we have: 1) a Personnel ...
1
vote
1answer
137 views

In MVC design, do I use a base class over an interface?

In web MVC most designs I've seen, (just choosing model layer as an example) the domain problem class, say students, always inherits the superclass "Model." The name is irrelevant, but why do they ...
0
votes
0answers
96 views

Login from external application in MVC

We have an ASP.Net MVC application that use Identity provider to authenticate users. A new customer now wants to access owr application pressing a button inside their winform app. I started to modify ...
-1
votes
0answers
76 views

Helping with creating own PHP MVC - how to write good router

1 year ago I created wannabe-MVC in PHP (some parts procedural, some in classes), now I'm intending to expand it a further to be more like real MVC. Folder/files structure: html/ html/images/ ...
0
votes
1answer
135 views

How do I keep my classes in MVC from becoming bloated?

I'm not sure how I should have worded the question. If I have a Student and Classes database, and I have queries that involve both. Where do I put my queries? In one case, someone wants student ...
1
vote
1answer
85 views

Is routing a site with RESTful not the best when you have very long URLs?

I've read a lot about RESTful, but I have always had a hard time figuring out how I'd use it with a very long query string. This is an in-house project, and it won't always have a simple /someAction ...
0
votes
0answers
269 views

Using ng-init to initialize data in Angular controller

Recently I came across the following in one of our projects. In one of our mvc views they are passing model data to an Angular controller through ngInit directive In xxx.cshtml <div ...
0
votes
2answers
42 views

Issues regarding new instances of controllers on view pages [closed]

Is there any issue with creating a new controller within the ascx view pages. I don't want to create a model, are there any issues with doing it this way. Normally, the controllers control variables ...
0
votes
1answer
75 views

The ViewController design in iOS vs MVC in tradiational web apps design

As I came from the background of webapps and move to iOS programming, I am wondering why we can't just apply the MVC design approach to native apps, i.e. in iOS, the view and controller are tightly ...
1
vote
0answers
107 views

Why should ViewModel route actions to Controller when using the MVCVM pattern?

When reading examples across the Internet (including the MSDN reference) I have found that code examples are all doing the following type of thing: public class FooViewModel : BaseViewModel { ...
0
votes
1answer
20 views

MVC helper functions business logic

I am creating some helper functions (mvc.net) for creating common controls that I need in almost every project such as alert boxes, dialogs etc. If these do not contain any business logic and it's ...
4
votes
2answers
132 views

Strategy to use two different measurement systems in software

I have an application that needs to accept and output values in both US Custom Units and Metric system. Right now the conversion and input and output is a mess. You can only enter in US system, but ...
0
votes
1answer
141 views

In MVC, why can't a model create a view?

I have a web application written in Perl with a controller, some "views" and some "Models". Each "Model" is corresponding to one "View". The controller (one file) creates an Model object ...
3
votes
1answer
154 views

Project structure: where to put business logic

First of all, I'm not asking where does business logic belong. This has been asked before and most answers I've read agree in that it belongs in the model: Where to put business logic in MVC design? ...
0
votes
1answer
102 views

Can't understand on how to implement MVP/MVC for my software requirements [closed]

Recently I decided to start developing a client/service based system using WCF and a Duplex Channel (callbacks from Service to client). The clients will behave as "slaves", that is, they will only ...
0
votes
2answers
41 views

Separating roles authorization and database

Something really bothers me about the way authorization tends to be done with roles in ASP.NET MVC. The way it is normally done is that you have a Users table and a Roles table. A User can have many ...
3
votes
0answers
86 views

Are promises suitable for Model Controller communication?

I have an Express app built with the Yeoman Angular fullstack generator to build an API to send JSON to Angular. I'm trying to work out the best way to pass back information from my model to my ...
0
votes
1answer
30 views

How to update last accessed with Forms Authentication cookie

I've got an MVC 4 site where I'm using Forms Authentication. I'm setting a cookie when a user logs in. The majority of my site does NOT require a user to be logged in though. What I'd like to do, ...
1
vote
1answer
70 views

Should my internal MVC/MVVM application use Web Services for Persistence?

Just talking about internal applications or intranet web apps... At some companies I've seen their business-logic piece (Model in MVC/VM in MVVM) on one (or both) sides of a Web Service. And on the ...
1
vote
2answers
121 views

Implementing a simple controller in embedded C

Is there a known method or pattern to implement a simple controller for an MVC design in pure C or the switch case approach is the standard? Background : I have an embedded application and I'm ...
1
vote
1answer
113 views

Clarification about MVC Design pattern

I've been reading up on MVC and I had a doubt. The example where the Model, View and Controller are all individual classes whose objects are created and used to deploy the application in another ...
0
votes
1answer
28 views

What is the Controller in Django MVC?

Learning Django MVC and the way I thought of it is: Models are the database tables represented in Django as Python classes. Views are the HTML returned from function in views.py. Controllers are the ...
1
vote
1answer
263 views

Best practices for implementing MVVM and MVC in delphi Pascal

I'm a Delphi pascal programmer, I use the latest Embarcadero delphi XE, and I would like to take advantage of design patterns such as Model view controller and model view view-model. However, there ...
0
votes
0answers
45 views

MVC class modeling

I have following requirement and I am trying to design class diagram. This is the first time I am creating class diagram so I would like to get some advice from experts.. :) This is a simple login ...
1
vote
0answers
38 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, ...
0
votes
0answers
27 views

Proper program design for submitting a form

I have been stuck wondering what the best solution to the problem below: I am developing a form like GUI with quite a few places for input. Currently, I am storing each UI element in an ArrayList ...
9
votes
6answers
2k views

Can someone help me understand MVC? [duplicate]

I've read a few articles on the MVC pattern and tried to understand what it exactly is. But till now, what I get is a plain diagram showing 3 modules of Model, View and Controller. Some say that it ...
0
votes
1answer
101 views

Where and how to reference composite MVP components?

I am learning about the MVP (Model-View-Presenter) Passive View flavour of MVC. I intend to expose events from view interfaces rather than using the observer pattern to remove explicit coupling with ...
0
votes
2answers
116 views

Should I Make my ASP.NET MVC N-tier?

I'm currently building a very small website, around 20 to 30 views, 10 controllers. I know MVC is only a design pattern and should only be the top presentation layer. I'm currently at a stage in ...
2
votes
1answer
142 views

Choosing between the view and the controller for my code

I'm aware there are a lot of topics about MVC design but it's hard to find good explanations: what I should do, what are the consequences of the different possibilities... So I'm working on an ASP ...
0
votes
1answer
84 views

Developing pages in MVC website that will be specifically used as an iframe by another website

I have a website where I'm going to be partnering with another website. They want to view one specific page of mine, in their [WordPress] website. They aren't developers, so I looked into how to do ...
4
votes
3answers
145 views

MVC and the business rule

I need to know where in the MVC should I apply the business rule. Imagine the situation: I have a school and I need to generate a calendar of classes for teachers. Each teacher has a school subject ...
0
votes
0answers
57 views

what is the technical term for this presentation model?

I have an application I've inherited that I'd call "proto-MVC", and I love the concept of MVC but am new to it. In my ideal dream of a lightweight application, all of the document's content is stored ...