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

learn more… | top users | synonyms

-5
votes
0answers
29 views

MVC EntityFramework project

I have installed NopCommerce shopping cart eCommerce open source application. I am trying to learn real world programming architecture that is used in that application. I think it used Entity ...
1
vote
1answer
48 views

MVC, Services and DAO: Fundamental design choices, error handling and return values

Edit: There is no "right" or "wrong" answer here, I was merely trying to get people to share their dos and don'ts. Behind this rather vague topic I would like to address a few problems I've been ...
1
vote
0answers
81 views

JavaScript - Clientside seperation of Model and ViewModel?

I am developing web apps using the Model-View-ViewModel approach with Knockout.js. After reading on the original introduction of MVVM by John Gossman, I realized that my ViewModel always contains ALL ...
1
vote
0answers
46 views

Multiple Entity Business Logic/Changes, C# MVC Repository Pattern

I have a standard C# MVC project which has a domain layer using EF and repository pattern. Say I have a model like: public class MainModel { public int MainModelID {get; set;} //Many other ...
0
votes
1answer
68 views

Questions regarding my MVC application

I'm learning .net MVC while developing a simple word list - Eg. When you learn a new language and create a list of words related to a certain topic. I don't think I'm following the rules or good ...
1
vote
4answers
211 views

MVC and RESTful API service

MVC is pretty straightforward. There is a Model, a Controller and a View. When we create a website, it all come together as 'client sends REST keyword request to server -> the server matches the ...
0
votes
1answer
8 views

Does a UIView object with an embedded UIButton and IBAction defy MVC principles?

Does a UIView object with an embedded UIButton and IBAction violate MVC principles? Example: class MyView: UIView { @IBOutlet weak var myButton: UIButton! @IBAction func myButtonTapped(...
2
votes
3answers
141 views

Is creating “shortcut methods” in the superclass of a controller Bad Practice?

Consider the following simplified example: abstract public class Controller { protected final boolean isUserAdmin() { return getServiceContainer().getUserService().isUserAdmin(); } ...
1
vote
2answers
58 views

In MVC, should I access the view or recieve parameters?

For example, I have an UI with a button "Get Items" and a text field "Order". Then my button will retrieve all items from the order written in the text field. How should my controller know the order? ...
1
vote
1answer
54 views

Coding guidlines for Controller and Dao?

My Controller code: ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); ObjectReader objectReader = objectMapper.reader(...
0
votes
0answers
21 views

Project directory structure (javascript)

Over my years of practice and through most of the reading I've done, the oft recommended directory structure for a web app project has been closely tied to the MVC structure: tests/ src/ styles/ ...
1
vote
0answers
64 views

What would you call this design pattern? MVC or PAC

I have been reading and researching about MVC, HMVC, MVP, MVVM and PAC design patterns when I came accross this article by larry garfield > MVC vs. PAC My Implementation: Think of a modular app ...
3
votes
0answers
56 views

Where should view-specific data/logic be defined in a PHP MVC application?

After many hours of research and thinking I have found an understanding, then coming to question it again, I am struggling to find something concrete which I can grasp and apply to my code in a ...
2
votes
2answers
177 views

where to put which code in MVC model

I recently picked up learning PHP and MySQL and I am trying to build a small usersystem as a coding exercise. While learning to use classes and functions, I also stumbled upon the MVC model and would ...
0
votes
2answers
63 views

Should we sanitise and clean data or only display it in the expected format?

So my problem is, I have users entering their data(names, address) in a mixed form- some with first letter in caps and some without, some inserting more than necessary spaces and so forth. Also, ...
0
votes
0answers
64 views

Should Rails views actually render anything?

I've joined a Rails app with hundreds of pages and no tests, first thing I've done is set us up with model-, controller- and feature-tests and I'm adding them as I work on areas. One thing I'm ...
0
votes
2answers
73 views

How does two-way data binding differ from simple auto-sync?

The AngularJS documentation mentions that it considers one-way data binding to be 'bad' and two-way data bind to be 'good*'. However, on looking over the definitions of two-way data binding used, all ...
-3
votes
1answer
113 views

How to incoporate jQuery UI into ASP.NET MVC 5 project that is on an offline system? [closed]

I am having some issues trying to incorporate jQuery UI into my project. I cannot use Nuget or anything else that goes to the internet, so I have downloaded the development package from the jQuery UI ...
4
votes
1answer
73 views

MVC: Display requsted content via the View

I'm trying to learn how the MVC pattern works so have been playing around a bit. I just wrote this, which was making sense to me, until I wanted to display the array content which has been collect by ...
4
votes
1answer
44 views

How to prevent endles event recursion when using event driven data view?

Consider that you have some graphical interface that represents some data structure. For example a text field: This field is connected to the data structure through events. I tried to make diagram ...
0
votes
1answer
37 views

MVC design in Cocoa games: Is it possible?

I'm working on creating games on OS X, using the Cocoa framework, the probably only and best way to utilize all the capabilities of this operating system. Since Cocoa is MVC, I have to frame my games ...
1
vote
1answer
64 views

Accessing i18n objects from different scopes

I have been building a personal framework of mine which started off as a way to learn the MVC pattern and has progressed now into something that I like more than most frameworks out there (which is ...
3
votes
2answers
54 views

Composition model class with edit feature

I have a model class like below. I need to edit items, but the model has to know when any object has been modified. Also I need to provide very often with the objects inside to the view, which is who'...
0
votes
0answers
52 views

How should i handle deeply nested data with codeigniter/mvc?

I want to build a website with categories, pages, sections and slides. Hierarchically it should look something like this: [category 1] [page 1] [section 1] [slide 1] ...
0
votes
3answers
120 views

My ASP.NET MVC controllers seem like in mess

I am developing program with asp.net MVC and I feel like I'm doing it wrong in these parts: I'm populating all process in controller, because I don't know how to put it in model (how to call it). I ...
0
votes
1answer
79 views

Using “Id” as Primary Key in green field Dapper Contrib MVC 5 site

I am creating a new site and will base it on ASP.NET MVC 5 & Dapper Contrib. I want to go all in with all these technologies - and get all the time saving / convention over configuration / terse ...
4
votes
1answer
100 views

Considerations for decoupling and refactoring business logic to a REST API

We've got a .NET Solution consisting of a MVC Website and a bunch of libraries for business and data logic. In the past the website was the only way to interact with our business logic, but we're ...
3
votes
1answer
119 views

Is there a good way to use the front controller pattern for command line applications?

I am a PHP developer and I used to build web applications with one PHP file per page for a very long time. This resulted in duplicated logic and messy code (even though I didn't know it at the time). ...
3
votes
2answers
47 views

Rails' MVC vs Microsoft MVC - where to put logics?

Some time ago I switched from Microsoft ASP.NET 2.0 (WebForms, never knew Microsoft's MVC) to Ruby on Rails and learned it's MVC approach, after which some things in ASP.NET MVC seem to be weird. In ...
1
vote
0answers
52 views

Project Design - Separating JS and C# tasks - Risks vs Benefits

I'm in RFP phase working with outsourcing vendors on the 100% rewrite of a fully operational prototype asp.net app that I wrote, to make it commercially viable. I have an idea for a project design ...
-1
votes
2answers
161 views

What handles the work of video streaming in ASP.NET MVC?

I want to play video using ASP.NET MVC. In my understanding, the model deals with the video files stored in file system and data in database. The controller retrieves the path of video file from model ...
4
votes
2answers
175 views

PHP MVC/PAC - Logged In/Admin checks placement

I have set-up a MVC/PAC-like structure for a web application (unsure if it fits any of these design patterns fully). In short it is: Routing in index.php, which selects the controller and method ...
1
vote
0answers
37 views

Where does export file code belong in an MVC implementation that is designed mainly for HTML

I have an MVC website set up with a base view (Layout.php) containing HTML header and footer code. Other views (such as CarView.php) will extend this class. One of the methods in this class is CarView-...
1
vote
1answer
78 views

In a .NET Windows Forms app with a custom MVC, should a custom UserControl (view) implement any non-animating logic on its own?

This is strongly linked to these two questions: http://stackoverflow.com/q/15800945/279112 Should Controller know about View & Model? or vice versa? as well as this one: http://codereview....
0
votes
3answers
66 views

Value of dependency injection in MVC with skinny controllers

Dependency injection is often recommended in MVC projects because it's easy to implement with the pattern and adds a host of potential benefits. Indeed, it actually comes bundled with the default MVC ...
4
votes
1answer
249 views

Help in writing more generic code

I'm doing a php MVC project using code igniter. I have two models, a and b. Each class contains four functions (insert, delete, update and view) and their implementations are almost the same with ...
0
votes
0answers
42 views

How to design MVC in JavaFX with respect to performance of the non-gui task

I'm working on a huge application and we got some serious troubles regarding the performance of the software. I don't want to bother you with too many details, so in short: in one JVM runs the GUI (...
1
vote
1answer
141 views

How to deal with states in front end?

This may sound as a naive question but its bugging me since a long time. I have the following scenario: I have written a new shiny Todo service with my favorite front-end and back-end framework. To ...
0
votes
0answers
30 views

Angular2: Do services exclusively handle getting/updating models?

I'm testing the waters of Angular 2 with an app that manages car dealer inventory. Suppose I have a simple model: export class Car { id: number; make: string; model: string; color: string; } ...
1
vote
1answer
173 views

Getting data from a database with the MVC model

I am creating an application which will have a very large database to draw it's information from (a student registration system to be exact). The database is created with Microsoft SQL Server if that ...
1
vote
2answers
169 views

MVC - Database search logic in View or Model

Special Note: I asked a very similar question on Stack Overflow, but I have since decided the problem should be solved from a design standpoint rather than an implementation standpoint. I have ...
-1
votes
1answer
124 views

Code structure of third party framework [closed]

Is an API always returning 200 OK, an issue?
1
vote
4answers
86 views

Advice: Switching to MVC from Webforms Web designer vs UI designer [closed]

Over the last two years, I've taken over a web application development group. My focus for the first two years was building teams, get technology updated and in-place, and fixing my customers pain ...
0
votes
1answer
63 views

Should models be returning data directly to the client, or to the controller instead?

Disclaimer: This is my first time: using node, creating a REST API, and trying out MVC server side. (so, just statistically speaking, I'm probably doing something wrong ¯\_(ツ)_/¯) I'm working on ...
-1
votes
2answers
124 views

MVC as a subset of client-server architecture?

Can we say that MVC is subsystem (or subset, sub-architecture) of client-server architecture?
0
votes
1answer
60 views

What would be the best technique for website localization in MVC?

Currently I'm working on a big website that will be published on almost 40 domains with different languages. My question is what would be the best way of doing localization/internationalization. I'm ...
3
votes
2answers
221 views

Using MVC style, where is the best place to put SQL functionality?

I am wondering about best practices here. MVC (Model - View - Controller) patterns involve separating components of your program that model the data, manipulate those models, and display those ...
1
vote
3answers
82 views

Should I keep “redirect only” methods in my Controller?

Controller: function indexAction() { if ($condition) $this->renumPosition($id); //LINE #1 } //Redirect only - function's sole purpose is to call another function function ...
-1
votes
1answer
28 views

Class that prepares strings from HTTP requests at PHP controller level

I have a library /Web/ such as follows /Web/ Builder/ Builder.php Exceptions/ ExceptionHandler.php JSONSerializer/ CategoryJSONSerializer.php ...
1
vote
1answer
138 views

MVC Architecture: How to generate a view-model that is displayed on every page

I have been building a greenfield application. It is three layer (data-access, domain-models, presentation) with the presentation layer being VMVC. This is the cleanest application I've ever built by ...