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

learn more… | top users | synonyms

0
votes
0answers
31 views

Best approach to save relationship mapping of country,state,city in orm

I am building a project in play framework java with jpa and I want set country,state,city dropdown fields in a form to be dynamic(from database).So only admin can increase or decrease the value of ...
0
votes
0answers
24 views

MVC: Inserting a view from a SubController to its Parent controller

I have 2 controllers: 1 top level controller,MainController, and a SubController, which MainController has an instance of and controls. The SubController has a Subview which goes inside the MainView ...
7
votes
1answer
126 views

Massive View Controller - IOS - Solutions

I'm sure every new iOS developer has the following problem: The View Controllers get very fast crowded with code for various purposes, easily getting to 500 + lines of code. This is how it looks like ...
2
votes
1answer
76 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
29 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
61 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 ...
-1
votes
1answer
61 views

Approaches for manage AD users inside my HR system [closed]

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 ...
0
votes
2answers
145 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 ...
-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
74 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
117 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 ...
6
votes
1answer
166 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
171 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
42 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 ...
1
vote
0answers
59 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 ...
0
votes
0answers
66 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) ...
1
vote
1answer
118 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 ...
2
votes
1answer
60 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, ...
0
votes
0answers
46 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
0answers
42 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 ...
1
vote
0answers
74 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 ...
0
votes
1answer
113 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 ...
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 ...
5
votes
2answers
100 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 ...
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 ...
13
votes
4answers
598 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
158 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 ...
-4
votes
1answer
58 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 ...
0
votes
0answers
51 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
92 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 ...
7
votes
1answer
375 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
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 ...
1
vote
1answer
122 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
48 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
257 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
83 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
172 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
64 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
410 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
85 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
59 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
16 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
95 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
92 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
124 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
32 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 ...
1
vote
1answer
96 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 ...
2
votes
1answer
164 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 ...