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

learn more… | top users | synonyms

1
vote
0answers
54 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
70 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
14 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 ...
-3
votes
0answers
25 views

SPA: outsourcing client-side development [closed]

Given a SPA-based web site (with a client developed using any JS MVC framework and the server providing a REST API), does anyone have any experience in outsourcing the development of the client side ...
-3
votes
0answers
37 views

How to design JavaFX client with JEE server. what is possible design? [on hold]

I am using JavaFX as thin client as a view technology. Design is like... On Client Side:=> (View) JavaFX with client side validations On Server Side:=> (Controller and Model) Server side ...
1
vote
1answer
87 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
25 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
30 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
127 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
86 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
65 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
133 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
84 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
92 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
47 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
98 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
16 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
131 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
136 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
147 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
98 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
33 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
81 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
28 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
63 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
113 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
112 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
26 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
194 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
43 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
35 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
84 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
90 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
138 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
76 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
136 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
55 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 ...
1
vote
0answers
216 views

MVC content management framework with an admin panel

I've lately been developing my own MVC content management system using PHP and, at least in my mind, am a little stuck with the system design. I believe this would apply to building a content ...
1
vote
2answers
197 views

Entirely separate business logic layer from MVC

We are currently refactoring our controller methods in ASP.NET MVC application. At the beginning we've separated data access layer (our goal was to remove LINQ from controllers entirely). Now we are ...
2
votes
1answer
78 views

Translating views in MVC

What is the best practice, when it comes to views' translation in MVC design pattern, in multilingual website: Always have only one view file and translate its particular strings with a framework ...
3
votes
2answers
97 views

Should a view call a function?

Should a view call a helper function? Say I pass in data from the DB to the view. The data is a unix timestamp. Should I make a call in my view to convert it to a human readable TS or should I ...
0
votes
2answers
152 views

Is it ok to start with templates in MVC development?

I'm new to web development and I've started working on a project in my company that uses DJANGO. I feel it flexible to start my development straight first from the templates. I think it will be easier ...
1
vote
3answers
126 views

What to consider when choosing a framework for a development team? [closed]

As I'm finishing a web development course with a few friends with whom I have worked in many projects we're aiming to begin a professional team of developers. Functions are well defined between ...
1
vote
1answer
146 views

Web Application: Combining View Layer Between PHP and Javascript-AJAX

I'm developing web application using PHP with CodeIgniter MVC framework with a huge real time client-side functionality needs. This is my first time to build large scale of client-side app. So I ...
1
vote
2answers
219 views

MVC Best practices (view acquiring data directly from model) and Yii Framework

I'm using Yii for a few years and only right now I realized, that their demo application (empowered by CRUD auto-generation tool -- Gii) seems to be breaking key MVC architecture pattern. I'd like to ...
0
votes
0answers
68 views

Dynamically add/remove components to/from panel

I'm in a little planning phase of my java/swing project. Here is a picture: It is a main panel containing several sub panels depending on the selected date in the top center. I want to browse those ...
0
votes
0answers
52 views

Building simulation architectures : Which one to choose?

I am writing a simulation which unites discrete event and continuous system simulation. For example, you can use State Charts, System Dynamics and Queues side by side. Theese will then reduced to ...