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

learn more… | top users | synonyms

2
votes
1answer
2k views

Difference between Controller and Dispatcher in MVC for web frameworks?

In MVC applied to WSGI or Java EE, is the Servlet a controller, dispatcher, or both? I think I've seen system diagrams where the controller and the dispatcher are different. Could the controller ...
0
votes
2answers
1k views

Using alternative MVC framework

I am new to ASP.NET MVC and EF. I read about open source implementations of MVC pattern like Spring, FubuMVC, Castle etc. I want to know how flexible these alternatives are when compared with ASP.NET ...
3
votes
4answers
2k views

Can you call any php model class in an MVC from the controller?

I'm creating a simple MVC at the moment and am wondering if it's 'correct' to be able to call any model class directly from the controller to get the data to send to the view? I have the following ...
5
votes
2answers
2k views

How can I design a model layer without ORM, and when should I use it?

I'm a PHP developer who started with CodeIgniter. In it, designing models was easy: it seemed like each method defined in models was the equivalent of static methods in a normal, objected-oriented ...
7
votes
1answer
514 views

Defining classes in JavaScript that exist in your back-end

Doesn't it seem relatively duplicative to define your Models in your backend code AND on your front end for a rich internet application? I'm porting a GUI application I had written to have a web ...
99
votes
10answers
58k 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 ...
5
votes
5answers
2k views

Where should date formatting take place in an MVC pattern?

Suppose that you want to show a user list, on a web application having to handle custom date formats (depending on current selected interface language). Several locations for applying the date format ...
2
votes
2answers
135 views

Pattern for user interaction and confirmation

Suppose a FileWriter class that needs validation that it will not erase a file already present, if one is found. It would have two functions: public bool FileExists(string filePath) //... public bool ...
1
vote
1answer
229 views

Pattern for a web application

I'm developing a web application for a university project. My professor wants we to use a multi-tier architecture (Client, Web, Business and Data tiers) with EJB. For the Web and Business I have ...
0
votes
1answer
374 views

MVC JSon Request architecture

I am finding myself building up a whole bunch of JSON calls all through my application, which are basically actions spread across various controllers. I am considering creating a JSON Controller to ...
3
votes
1answer
1k views

Are JavaScript MVC Frameworks only for 'single-page' apps?

I've been looking into several of the JavaScript MVC Frameworks (Backbone.js, Spine, SproutCore,etc.) and it seems to me that all of these are designed to act as 'single-page' applications. All of the ...
10
votes
2answers
11k views

Use-cases for node.js and c#

I do quite a bit of ASP.NET work (C#, MVC), but most of it is typical web development. I do Restful architecture using CRUD repositories. Most of my clients don't have a lot of advanced requirements ...
14
votes
13answers
3k views

Where is the M in MVC?

I'm trying to refactor my application into MVC, but I'm stuck on the M part. In a database-backed app, the model is implemented in the app code, right? But then, what is in the database -- is that ...
0
votes
2answers
835 views

A good substitute for ASMX web service methods, but not a general handler

The best thing I like about ASP.NET MVC, is that you can directly call a server method (called action), from the client. This is so convenient, and so straightforward, that I really like to implement ...
4
votes
2answers
1k views

Controllers in CodeIgniter

I little bit new to the CodeIgniter framework and this is my first project with this framework. During a chat on StackOverflow somebody said that we need to make controllers tiny as possible. ...
0
votes
2answers
773 views

Who can change the View in MVC?

I'm working on a thick client graph displaying and manipulation application. I'm trying to apply the MVC pattern to our 3D visualization component. Here is what I have for the Model, View, and ...
5
votes
2answers
2k views

How is the facade pattern different from abstraction layers?

I just read about the facade pattern and found this example where a client (user of a computer) invokes a startComputer() method which calls on all the complex stuff: Source: wikipedia /* Complex ...
4
votes
2answers
692 views

What is jQuery and JavaScript's role in MVC?

I'm not sure I understand the role of jQuery/JavaScript in MVC. I've found an article about it on A List Apart, but it doesn't clear anything up for me. Does it bridge the communication between the ...
7
votes
3answers
512 views

Why decouple view and controller (web)?

Why can't we put them in the same page, like each action paired up with its view? Not using code island, but controller code at top then view code at bottom? What are the problems with this approach? ...
5
votes
4answers
414 views

Multiuser System With Encrypted Database

I am currently developing a hosted solution in ASP.NET using MVC3 and Entity Framework. This product will then be made available to a number of clients as a hosted solution. As the data stored by ...
4
votes
1answer
242 views

Are Session implicit objects examples of Models in MVC?

I have read that the Model is responsible for maintaining state among HTTP requests, for example in this article: The Model is responsible for maintaining state between HTTP requests. ...
1
vote
3answers
1k views

Organising MVC App with virtual model using external API

I am creating a rails app with following constraints It has no database It uses a web API to store and retrieve the data The connection to the web API is via a custom gem. The Gem has a basic ...
4
votes
1answer
569 views

Model independency in MVC and most efficient way to do method calls

TLDR: Are models supposed to be application-dependant and totally worthless when starting a new application, or are you supposed to design models independently so that they act as stand-alone ...
2
votes
3answers
552 views

RFC: Extending the MVC Design Pattern

I've been using the MVC pattern in my applications for years (with full separation of the controller from its views). Having to implement several hundred views to represent a little over 100 model's ...
7
votes
1answer
2k views

How to divide work among development team members in a website project using MVC pattern

I am working on a webapp project using flask framework and sqlalchemy orm in python. Its the first time I am working on a project like this and I am having trouble in how to divide work properly among ...
3
votes
2answers
4k views

Packages organisation with MVC design pattern [duplicate]

I have been programming quite a lot now and still can't decide which of these packages hierachies was the best: package1 Class1Controller Class1Model Class1View package2 Class2Controller ...
7
votes
2answers
2k views

Decoupling UI code?

In my application I have several event handlers that perform some action in response to user interface events such as a button click or menu selection. The code in these event handlers looks like ...
1
vote
2answers
716 views

Storing page-specific javascript on an AJAX driven site?

I have a general question about the placement of javascript code in a AJAX-driven web application. At a previous job, we tended to throw everything in one monolithic file. When maintaining that file ...
6
votes
1answer
615 views

If multitenancy is a priority, should I store site content in the database?

I have a multi tenant ASP.NET MVC website and all client specific text is stored in resource files. Every time someone wants to change text I have to jump through hoops and fill out forms and let ...
-1
votes
2answers
634 views

why use a form object when you can get needed data from view object's html?

I am working with server side code. I have a request object that handles request data validation and filtering. I have a view object that uses template files to generate html for output. the ...
5
votes
1answer
700 views

How can I manage my ViewControllers in my game?

I'm building a very simple iOS game that doesn't require any fancy OpenGL; I'd like to stick with Core Graphics & Core Animation. I'd like to make this a fullscreen game, and my question is of ...
2
votes
2answers
794 views

Obtaining the best of both worlds: MVC and WebForms

Rather than asking a general question about WebForms vs MVC (such as in ASP.NET v/s ASP.NET MVC), I have a specific quesiton. It appears the main differences between the two approaches are WebForms ...
3
votes
5answers
1k views

Controller vs Model: Where do I put the processing of user input?

I'm new to MVC and I'm not using a framework (and I'm not going to). I'm designing my new web application using MVC. I have the user input received in Controller. Suppose I have form data and an ...
3
votes
2answers
337 views

New PHP project, how to best architect it

I have already done a PHP project, and I did a number of things pretty wrong :) I just had all pages as scripts with php mixed in with html. I also wasn't using a framework like cakephp. And I didn't ...
1
vote
2answers
2k views

Do modular PHP frameworks really improve applications?

One of the goals of modular frameworks like Kohana or Alloy is to make it easy to add and remove components (i.e. "plugins" or "modules"). However, in all the larger projects I have ever worked - the ...
7
votes
3answers
469 views

Architecture of interaction modes (“paint tools”) for a 3D paint program

We are developing a Qt-based application to navigate through and paint on a volume treated as a 3D pixel graphic. The layout of the app consists of three orthogonal slice views on which the user may ...
3
votes
1answer
148 views

Workflow for a plugin assignment

I'm starting a new project in PHP, a plugin for a website that grabs additional data from it through cURL, getContents etc and re-tabulates it in excel. It's a local project, basic script like with a ...
11
votes
1answer
1k views

Patterns for ajax-heavy web applications

Up until now, I've been a great fan of the MVC pattern for developing web applications. For the web, I've developed mostly in PHP (with the Kohana and CodeIgniter frameworks) and Ruby (RoR). As my ...
9
votes
3answers
840 views

What is the object-oriented thought process? [closed]

I've been studying OOP in conjunction with Zend's MVC implementation for the past few months. I'm pretty new to programming, generally, but I feel strongly that I should learn things the 'right' way, ...
52
votes
7answers
45k 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 ...
1
vote
1answer
758 views

Model-View-Controller and client-side concurrency responsibility

In a web application that has a significant ajax component, where is the best place for the client-side concurrency responsibility to lie? We're trying to use MVC on both the server application (LAMP ...
12
votes
4answers
2k views

What are the disadvantages of using/writting a .Net Custom Membership Provider?

Recently, I posted the following question on SO: http://stackoverflow.com/questions/7197337/using-asp-net-membership-provider-with-an-existing-user-database As you may notice, I ended up answering my ...
8
votes
1answer
328 views

How to make models do more than setting and getting data and validation

I am asking this question because after developing a few small custom cms solutions in a framework, I developed the idea that Models can be easily substituted with ORMs which ease up the task of ...
6
votes
3answers
537 views

Drawing the line between models & libraries?

As my webapps increase in size, so does the complexity. In order to keep my classes & files structured and easy-to-access, I am starting to get more and more confused: I have some very clearly ...
5
votes
2answers
1k views

Rails: controllers vs models which should handle file manipulation

This post by Jamis Buck about keeping Rails controllers skinny has always stuck with me. I have an app in which a zip file consisting of an XML file and some images is uploaded and used to create the ...
6
votes
3answers
453 views

What do I call a non-MVC pattern?

I am finishing my project and in my thesis I am explaining why I used an MVC pattern to build my website, and have stated the advantages of designing it this way. However, if I had not used MVC and ...
4
votes
1answer
652 views

How can a web site be set up using the MVC Pattern? (Without MS ASP.NET MVC)

We used a contractor to create the initial version of our site; they used their own MVC-pattern code-generator to create the (ASP.NET / C#) site and customized from there. That was turned over to us ...
7
votes
2answers
560 views

How can I “get in the know”?

My company posted a job listing to get me a helper. A recruiter called me today and all he kept saying was "MVC this Entity Framework that..." - He sounded shocked when I said the project uses ...
8
votes
2answers
3k views

In MVC should a model handle validation?

I am trying to re-architect a web application I developed to use the MVC pattern, but I'm not sure if validation should be handled in the model or not. For example, I'm setting up one of my models ...
2
votes
5answers
364 views

Should a web designer know server-side coding?

We're implementing an CMS based on ASP.NET MVC. Now, any designer should be able to provide themes for this CMS. But to write a theme, they need to be able to modify the generated HTML, thus the ...