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

learn more… | top users | synonyms

0
votes
0answers
5 views

iOS Best practice for handling model objects

There are different levels I'm asking this question at. Case 1: Let's think about the typical drill-down design. Say a table view controller has an array of custom objects, and tapping a cell will ...
2
votes
2answers
44 views

Refactor presentation logic from model

I've seen this pattern used in a considerable amount of MVC applications. Let's assume we have a User model with the methods: hasSessionExpired displaySessionExpired The first method ...
32
votes
4answers
3k views

Why is it the caller's responsibility to ensure thread safety in GUI programming?

I have seen, in many places, that it is canonical wisdom1 that it is the responsibility of the caller to ensure you are on the UI thread when updating UI components (specifically, in Java Swing, that ...
0
votes
0answers
43 views

What's the accepted way of communication between two model objects in MVC?

I have a model object that fetches data through an URL connection, and another model object that stores and parses it. Eventually when the data is ready, a key-value observing notification is ...
3
votes
1answer
52 views

MVC Advanced Permission System Patterns [closed]

I'm familiar with role and activity based permissions, but I'm curious about patterns that go beyond the basics. In particular, I want permissions to be granted based on the user's relationship with ...
0
votes
1answer
69 views

MVVM model vs viewmodel

I am trying to wrap my head around MVVM and "models should not have behaviour". If my getter depends on an environment variable, should it be in the model or viewmodel? Does it make a difference if ...
6
votes
1answer
140 views

UI Design patterns for non-screen based project

I'm working on a small project coded in Python that uses a single button for input and a RGB LED as feedback, which responds to button presses and asynchronous events from the network. As the ...
4
votes
1answer
87 views

How to abstract from a display?

I'm building an embedded text editor consisting of a keyboard, an LCD display and a PIC32 microcontroller, to be programmed in C. The application should look, for example, like the GNU nano editor. ...
6
votes
3answers
155 views

Where in an MVC web application should writing files locally go?

In my web application that uses an MVC framework which has different modules for models, views and controllers I talk to several databases and APIs. Those are implemented as individual models. A lot ...
16
votes
6answers
3k views

Where should I put an API request in MVC?

I'm building a web application using a MVC pattern. Following this kind of architecture we can see that all the methods used to interact with database are implemented in the model. But what happen if ...
0
votes
1answer
22 views

VO to Entity Conversion

In our application we have multiple layers. UI -> This can be JSP/ JSON result of the API Controllers -> as in MVC Services -> perform single business operation per service DAOs -> Data Access ...
0
votes
1answer
52 views

PHP MVC concept large controller

I have custom MVC framework in PHP and my controller file has about 5000 lines. The question is, is it a big concept flaw? It is structured code with kiss method and quite maintainable. Are there ...
1
vote
1answer
48 views

Where to put the domain in MVCS

From what I've read and understand MVCS (Model-View-Controller-Store) is a design pattern that lets you do the following: View - Application view, what the user will see. Controllers - Manages the ...
-1
votes
2answers
113 views

MVC is a kind of Design Pattern? [duplicate]

While I was trying to concrete the concept of design pattern, I came up with a question: As I asked in the title, Is MVC(Model-View-Controller) architecture kind of Design Pattern?
0
votes
0answers
109 views

Any “Gotchas” to using Entity Framework for Identity & Dapper for all other DB access in a .NET MVC application?

I'm firing up an MVC project in which I'd really like to use Dapper as my ORM, as I like to be as close to the database as possible for performance and SQL tweaking reasons, yet still have the power ...
0
votes
0answers
60 views

Server-Side MVCs vs Client Side MVCs

Recently I was asked to do a project as a technical assessment. The assignment is to create a website using Twitters API. The assessment recommended using Django. When I quickly looked up Django I ...
0
votes
0answers
40 views

Event-handling in WinForms MVC-Implementation

I am trying to implement sort of an MVC-Pattern (Passive View) for a winforms-application to clean up the code. The basics are quite clear and I did implement some views of the application in ...
1
vote
2answers
56 views

How many views and controllers do I need?

I did one AngularJs app which was rather complex, with multiple nested tabs, which had multiple nested views & controllers, needed ng-router, and was quite tricky for me to implement, as browser ...
2
votes
1answer
61 views

Getting items from a ListView - without breaking MVC paradigm?

I've got an arraylist of SpecialParts. A SpecialPart is an object that holds a bunch of information about itself: name, ID, date created, etc. I've got a ListView that presents the user with all the ...
0
votes
1answer
78 views

JEE MVC, controller calls the interface instead of the interface implementation

I'm following this tutorial: http://wiki4.caucho.com/Building_a_simple_listing_in_JSP It creates a basic web application in Eclipse using the MVC pattern with Resin as the web container. Here's the ...
228
votes
13answers
35k views

Should you write your back-end as an API?

I had a heated discussion today about our MVC application. We have a website written in MVC (ASP.NET), and it usually follows the pattern of do something in the view -> hit the controller -> ...
0
votes
0answers
101 views

MVC architecture with JavaFX

I am working on a rather small Java application for a university project. We are forced to use a pretty strange interpretation of the MVC pattern which says that we should only have one generic ...
1
vote
0answers
95 views

How do I handle authentication in an ASP.NET webapp with offline-capable client code?

I hesitated before writing this question, as it sounds like I'm after an opinion without trying anything yet. That's not the case, I just don't want to go down the wrong route with architecture - it ...
1
vote
0answers
103 views

MVC question for a console application with multiple controllers?

My question concerns an administrator's console application. The requirements around it are that administrators should be able to log in (other types of user cannot), and they should then be able to ...
1
vote
1answer
40 views

Share service instances amongst all controllers?

We've taken over coding on a .NET MVC project, and as I'm relatively inexperienced with many of the MVC design approaches, I'm working on getting a good understanding of the design choices. One ...
2
votes
0answers
47 views

Updating an entity via a service layer

What's the best way to update an entity using a service layer? Performing a single, atomic action I can understand like BlogService.Publish(blogID) but what about editing multiple values which map to ...
2
votes
1answer
178 views

Advice on architecture (WCF / MVC)

First of all, the basics. N-tier application: presentation, business layer, database. It is an old .NET 2.0 (WSE + WinForms) application, a bit more tightly coupled than I'd like, and the requirement ...
1
vote
2answers
161 views

PHP MVC how to access current user?

What is the best way to tell if a user is already logged in when accessing the page? I have seen many people talk about a Recognition service that will validate a user trying to login, but what about ...
1
vote
0answers
120 views

Top Menu bar driving a sidebar sub menu

I have an application written is C# ASP.NET MVC 4 with Razor views. I am a bit stuck on my menu structure. As per the image above, one can see that there is a Top Menu and a Side Menu. The ...
0
votes
2answers
115 views

When developing an MVC framework, how should I be using Knockout.js?

I'm currently using the Laravel PHP MVC Framework to develop a web application; and it's going along quite nicely. I'm very comfortable with the expectations of the framework and how my application ...
1
vote
1answer
112 views

role based access control model in object oriented

I want to prepare a swing application. I am designing a role based access control model in mvc design. When a view wants to request something from a controller, how can this request be realized in ...
0
votes
0answers
51 views

Will this singleton style class work with accessing a session on multiple MVC controllers?

Question background: I have an e-commerce site I'm developing that requires multiple controller methods to access a single session variable. The idea: My idea was to create a singleton style class ...
0
votes
1answer
80 views

How to represent a Model with a 1:N relation?

I have a task to associate 1:N documents to a record in my hardware table. This file could be a warranty, or whatever. In SQLServer I set up a FileStream group and made a table for only the file and ...
1
vote
1answer
109 views

How bad is it that my index.php in a Zend Framework MVC application mixes definitions and side effects?

I'm introducing some more coding quality standards and checks via a new project - in particular, the PHP-FIG recommendations. This project using Zend Framework 2, and I have a fairly simple entry ...
1
vote
1answer
134 views

MVC, pagination, and massive search criteria

I am currently working on a project that has a fairly large search form - the form is 30 or fields or more. Now I can of course map this out for routing by having my application pull the parameters ...
6
votes
2answers
270 views

Is it necessary anymore to extract logic from API controllers?

I've been working in MVC web frameworks since its they started getting popular with RoR and ASP.NET MVC. I have always been careful to never put "business logic" on my controllers since that couples ...
2
votes
1answer
149 views

In MVC, who is in charge of handling observers?

(I'm writing a large MATLAB GUI that makes significant use of MVC, so my example is written in MATLAB. However, I believe this question is language-agnostic. Please correct me if I'm wrong.) I have a ...
1
vote
2answers
254 views

Is MVC controller an use case controller?

In GRASP (http://en.wikipedia.org/wiki/GRASP_(object-oriented_design) ), a controller (use case controller) is defined as: A use case controller should be used to deal with all system events of ...
0
votes
1answer
34 views

How can I approach application programming from a database background? [closed]

I have a lot of database experience, but virtually no application programming experience. At work, we have an EDMX? model generated from entities in the database, and we transform T4 templates to ...
1
vote
5answers
253 views

MVC - Checking data in the model or the controller?

I'm currently creating a web application with Ruby on Rails and I'm facing an conceptual problem about the MVC pattern. If I need to check, for example, if the name of a data that I want to add in ...
7
votes
1answer
577 views

Where we should not use MVC? [duplicate]

I have a software engineering course project that we should design a web application, so I've decided to read about software architecture patterns. I've read a lot about what is MVC and its ...
3
votes
1answer
161 views

Partial Model Updates From View

I hope this is on-topic here since I'm a bit new to the whiteboard... I'm currently developing an application using ASP.NET MVC 5 (and WebAPI 2). One of my domain entities is huge, and is stored in ...
1
vote
1answer
291 views

What OpenID Connect flow is right for me?

Here's the deal. I have a .NET MVC5 web application that I'm moving up to the OpenID Connect standard. I also would like to be able to access controller methods from a mobile app (much like an API) ...
1
vote
2answers
63 views

How to maintain atomicity with a service like pattern

Imagine a route in an MVC web project which handles editing a user of your product. You can do things like change their name, their email, their group, their roles and so forth. This data is put in a ...
0
votes
0answers
241 views

Using xsd2Code and custom c# classes

I am using the xsd2code class generator to generate classes based on a schema file provided by a system vendor. This vendor also provides a REST API to access data via Web Services, and I've had a ...
1
vote
0answers
57 views

Where should business logic involving SQL go? [duplicate]

I have this question that's been bugging me all day. I have a function like this: public void voidUsersByUserId(List<Integer> userIds) { Query query = ...
1
vote
1answer
218 views

Clarification on MVC Architecture Overview

I'm doing an MVC 4 architecture diagram for a report and since I'm relatively new to MVC,i was wondering could some one clarify with me is REST (HTTPPOST etc) between view and controller, or ...
1
vote
1answer
209 views

Architecture for web and mobile clients

The application that I work on needs to have a web interface (ASP.NET MVC) and mobile interfaces (Android/IPhone native). The features for mobile applications and web application might not overlap ...
0
votes
1answer
364 views

MVC: Creare sub folders under View

I am working on a small ERP Application and using MVC5 for it. I have several Modules in the application and each module contain several web pages (Views, you can say). i.e: for School application I ...
2
votes
2answers
115 views

Is it OK for an MVC view to request data from other sources than just the model?

I'm working in ASP.NET MVC, but this question is pretty much applicable to any MVC framework (and maybe even others). In a typical MVC application a request arrives at the controller, which then ...