Tagged Questions

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

learn more… | top users | synonyms

8
votes
3answers
174 views

Proper Model-View-_____ design

I've been reading up about Model View Controller, Model View Presenter, Model View ViewModel, and so on, and generally, the underlying concept seems pretty simple to understand: keep the pretty ...
0
votes
1answer
88 views

Object in Business layer same as DTO with logic?

Let's say I have a Spring MVC project, in which I'm using DTO to get data from a database and to pass data to the UI. Let's suppose that I have a UserDTO and in my business layer I have to do ...
-3
votes
0answers
32 views

How to load ASPX webform as a partial view into a MVC Viewpage [on hold]

I'm desinging a MVC webapplication in which SSRS reports will be used for report generation. As we know, MVC doesn't support SSRS now, i had to approach ASPX webforms for solving it. First i tried to ...
-4
votes
1answer
49 views

How do i upload small changes on a view of an asp.net mvc4 project [on hold]

How do i structure an asp.net mvc 4 website in such a way that i can make small changes to views and upload those small changes only. i am a php developer trying to switch to asp.net mvc4. please ...
0
votes
0answers
35 views

Should I inject a data dependency into an Angular Directive?

I am currently implementing an AngularJS directive. It is fundamentally a reusable widget comprised of a select box and a table which populates based on the item in the select box. My point of ...
2
votes
2answers
62 views

Where to load data for things like a sidebar in MVC frameworks?

This seems extremely basic, but I've read a lot of related questions and haven't found a proper answer. Using Ruby on Rails or other similar MVC framework, how am I supposed to load data that is ...
6
votes
1answer
167 views

In ASP.NET MVC, should the view models have an ID?

When developing an ASP.NET MVC application that allows the model to be updated, you need some way to know how to take the updated view model and match it back to the model that is now updated. There ...
1
vote
1answer
63 views

Where to perform datatype.ParseString (MVC)

Using the MVC pattern, asume a simple situation where you want to send a number (for example the number of pages in a book) with a controller to a setter. Now, the set method looks like this public ...
1
vote
1answer
81 views

Server side or client side mvc: which approach imposes less load on the server?

Which is the best approach when developing a dynamic web app with multiple views and dynamic content. regarding server load and responce times: use a server side mvc (such as Sailsjs or ASP.NET MVC) ...
0
votes
0answers
34 views

Controllers passing Request objects to backend logic that forward Request data: Good or Bad?

Currently working on a server-side front-end Scala Play app that does a lot of grabbing of HTML snippets and JSON from many other web apps before piecing everything together and sending it in a ...
0
votes
3answers
188 views

How do I design my application to use REST for itself?

I'm not sure how to ask this. I know this is simplistic, but I understand (I think): REST is an architecture, not required, simply a way to build REST is a style and a community standard for ...
1
vote
1answer
61 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 ...
1
vote
1answer
141 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
56 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 ...
3
votes
1answer
349 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
71 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
47 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
12 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
85 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
91 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 ...
2
votes
1answer
116 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
54 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
149 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
129 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 ...
0
votes
1answer
148 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
91 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 ...
3
votes
1answer
1k 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
43 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
99 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
133 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
23 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
134 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
158 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
168 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
109 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
59 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
94 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
33 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
88 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
138 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
115 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 ...
1
vote
1answer
40 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
458 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
47 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
56 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
122 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
205 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 ...