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

learn more… | top users | synonyms

1
vote
0answers
20 views

Ideas on Model of simple Traffic Simulation

I want to write a simple traffic simulation with one road intersection. First I thought of a cellular automata in the model but it should not be limited by an underlying discrete grid system so the ...
-1
votes
0answers
24 views

Unsure on how to start converting my application to MVC

I have a large application in PHP that I have been developing for the last few months and I am unsure on how to convert it into MVC. As I try to build it the questions arise more and more. I chose to ...
0
votes
1answer
55 views

Strongly typed views, ViewModel and MVC

I'm learning MVC and the book I'm using favors strongly-typed views. Some of these concepts are new to me and I'm trying to better understand the design philosophy. Strongly typed views typically ...
0
votes
1answer
159 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
3answers
220 views

MVC pattern synchronisation

I am facing a problem in synchronizing my model and view threads I have a view which is table. In it, user can select a few rows. I update the view as soon as the user clicks on any row since I don't ...
7
votes
5answers
960 views

MVC Can the model know ANYTHING about the view?

I'm working on a game, and without getting into any details I am using MVC "patterns", "rules" or whatever you want to call it to make the game. The view includes everything needed to draw things on ...
7
votes
1answer
347 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
votes
1answer
59 views

Approaches for manage AD users inside my HR system [on hold]

I want to start a new HR web application based on asp.net mvc-5 & Entity Framework. as it is almost the case Users inside the HR system will exists inside the AD, and when a new user join our ...
-1
votes
0answers
29 views

Where to place loops that are output data MVC [closed]

In ideal world view should only display html and echo php variables. Sometimes you would be required to do extra changes to the data while in the loop i.e reformat date or fetch extra information ...
0
votes
1answer
131 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 ...
-5
votes
0answers
71 views

how to scan a document using client side scanner in asp.net Web application [closed]

I'm using Asp.net web application (C# language). Want to Scan a document from clicking a button in web application (i.e. Browser). I already tried Twain tools But I need any other way to scan a image ...
0
votes
2answers
141 views

Develop GUI and logic in a team the right way? [closed]

I am planning to start a small project with a friend. I will be developing the GUI using JavaFX in the MVC pattern and he will be responsible for the model/logic. My question is: how can we achieve a ...
5
votes
4answers
660 views

Design Patterns for Coordinating Change Event Listeners

I've been working with the Observer pattern in JavaScript using various popular libraries for a number of years (YUI & jQuery). It's often that I need to observe a set of property value changes ...
-4
votes
0answers
14 views

Razor syntax all has the “red squiggly” in all projects? [migrated]

About a week ago all my MVC projects have the razor syntax underlined with red squiggly lines, but they all compile and run fine? I have tried uninstalling MVC, and uninstalling and re-installing ...
0
votes
2answers
73 views

REST backend restricted access only for humans

I will design a REST backend that will work with my database. I want users to access this data by viewing my webpage (I will work with an MVC JS framework) without logging in. At the same time, I ...
2
votes
1answer
112 views

PHP MVC as backend for iOS app

So, essentially, the question is, to develop a PHP back-end to an iOS application, would you implement an MVC architecture on the PHP side? Or no, since the client side (iOS) already has an MVC ...
1
vote
2answers
703 views

Search and Replace in MVC

What would be a good MVC/OOP/GRASP/SOLID structure for a search/replace functionality. Methods: search/searchNext/replace/replaceAll. I'm interested only in the PHP arhitecture and how a professional ...
6
votes
1answer
163 views

In MVC should a model contain subview models?

Some background: A colleague and myself have different interpretations of MVC which means, given the same problem, we are coming up with radically different solutions. He comes from a Java background ...
-1
votes
0answers
37 views

how to convert system.linq.IQueryable<int?> to int?[] [migrated]

foreach (var app in allList) { int?[] ids = Context.tblTransactionDetails .Where(x => x.IsActive == true) .Select(x => x.AdvertID); }
0
votes
3answers
167 views

Building a calculator using MVC

I've been programming in Java for about 6 months, and I thought a good and challenging test of my skills would be to build a GUI calculator. I have very recently heard about this MVC idea, and I ...
1
vote
1answer
41 views

Is a good practice to call a Controller function from another Controller?

I'm having a case where I'm handling the logic of a search in one controller and I'm generating some data based on searches and returning as statistics. Is a good practice calling a controller ...
0
votes
0answers
22 views

How can I structure my angular app so that I don't end up with one huge controller and view?

I have an angular app that concentrates most of its functionality around a primary entity that has several satellite entities. The UI for this is effectively one screen, with a few tabs, one for each ...
0
votes
1answer
266 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
0answers
56 views

Implementing Facebook Flux's Dispatcher [closed]

I am getting into Facebook's Flux architecture, which is a client-side MVC variant based on React.js. It features a dispatcher, a single object that mandates unidirectional data-flow, as opposed to ...
1
vote
1answer
117 views

How to avoid switches? [duplicate]

I use Laravel as a PHP framework, although the question is not exactly about laravel, more about structuring controller methods. I have a route to orders page. Depending on the user role I need to ...
0
votes
0answers
60 views

Usage of MVVM in iOS

I'm an iOS developer and I'm guilty of having Massive View Controllers in my projects so I've been searching for a better way to structure my projects and came across the MVVM (Model-View-ViewModel) ...
5
votes
2answers
98 views

In an MVC, should models use libraries, or should libraries use models?

When I build a RESTful API, I use an MVC pattern. And in order to make controllers skinny and code reusable outside of the API (e.g. in Cron tasks), I put much of my code into services (commonly known ...
4
votes
3answers
107 views

Should access logic go in controllers?

I want to know if all the logic related to permissions and access control belongs to controllers (Application logic) or models (Business logic). Currently I have a controller that does something like ...
2
votes
1answer
57 views

Proper MVC design and helper classes

I've been reading into Model-View-Controller and was wondering where something like a XyzClient class would fit into this design. Splitting up MVC is easy when all you have are some views to display, ...
13
votes
4answers
594 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
0answers
42 views

MVC Sites and Entity Framework (using DbContext)

I've been looking at a couple of the MVC tutorials on the ASP.NET website and and have noticed numerous of them make use of Entity Framework (especially the Identity provider stuff). Maybe my ...
0
votes
1answer
137 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 ...
0
votes
0answers
41 views

Rewrite Engine vs Boostrap type index file

I currently use apache mod rewrite on a site to redirect various queries / visitors such as this: if you come to example.com/authors/, you are redirected to authors.php if you come to ...
4
votes
1answer
119 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 ...
3
votes
3answers
805 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 ...
0
votes
1answer
110 views

How do different technologies connect to form a web stack? [closed]

I am a little confused, is it possible to implement a front end using common languages like html, css and javascript and then do server side processing using a language of your choice, say python or ...
1
vote
0answers
73 views

How to pass control between sub-controller to parent controller in Java MVC Design Pattern?

I'm pretty new in Java, but I've done plenty of research and I know what MVC is. However, to implement MVC in Java was a difficult task. I followed this tutorial, which helped me to realise that the ...
13
votes
8answers
3k views

Does MVC apply only to web

It is almost and instantaneous whenever I talk to developers about Model View Controller (MVC) they say you make a request to a url the server builds a entity (MODEL) and provides you with visual ...
3
votes
1answer
161 views

Web Forms and MVC in the same web project

I'm working in a large legacy project which was build with ASP.NET Web Forms and the idea to add in the MVC libraries to the same project has been tossed around. I know that this is possible (there ...
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 ...
44
votes
6answers
35k views

Why should I use an MVC pattern?

It seems everyone doing web applications nowadays wants to use MVC for everything. I find it hard to convince myself to use this pattern, however. I understand the general idea is to separate the ...
0
votes
1answer
148 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 ...
86
votes
10answers
40k views

What is MVC, really? [closed]

As a serious programmer, how do you answer the question What is MVC? In my mind, MVC is sort of a nebulous topic — and because of that, if your audience is a learner, then you're free to ...
-4
votes
1answer
57 views

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

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 ...
1
vote
2answers
253 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 ...
0
votes
0answers
50 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 ...
4
votes
4answers
2k views

Building websites, which is the better approach MVP or MVC?

I'm looking for feedback on MVP and MVC patterns used as a framework to build a website. I've used both with a certain degrees of success and failure. Furthermore I've worked in places which have ...
10
votes
4answers
2k views

In MVC, can/should basic data retrieval from the Model be done in the View?

Given the concept of 'skinny controllers, fat models' and the general acceptance that Views can directly call on Models when requiring data for output, should one consider handling the 'get and ...
2
votes
2answers
87 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 ...
1
vote
1answer
68 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 ...