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

learn more… | top users | synonyms

2
votes
1answer
2k views

Modular enterprise architecture using MVC and Orchard CMS

I'm making a large scale MVC application using Orchard. And I'm going to be separating my logic into modules. I'm also trying to heavily decouple the application for maximum extensibility and ...
3
votes
1answer
779 views

How should I architect my Model and Data Access layer objects in my website?

I've been tasked with designing Data layer for a website at work, and I am very interested in architecture of code for the best flexibility, maintainability and readability. I am generally acutely ...
3
votes
2answers
341 views

Questions about identifying the components in MVC

I'm currently developing an client-server application in node.js, Express, mustache and MySQL. However, I believe this question should be mostly language and framework agnostic. This is the first ...
3
votes
1answer
939 views

Model View Presenter over Model View Controller [duplicate]

Possible Duplicate: Building websites, which is the better approach MVP or MVC? I am trying to learn the difference between the MVC and MVP models. So far, I do not see much difference in ...
1
vote
3answers
798 views

What are the advantages of using a template language?

I work on a CakePHP app and the views consist of raw html with embedded php echo statements, which over time has gotten rather messy. Before I go in and rewrite the code, I'm wondering if it makes ...
-2
votes
2answers
763 views

ASP.NET MVC Controller separation best practices [closed]

I am very new in ASP.NET MVC and Web stuff. I want to know how I should separate my page logic into different controllers. Like for example should I use Home\BuyProduct or Product\Buy. When there is a ...
1
vote
2answers
242 views

Let a model instance choose appropriate view class using category. Is it good design?

Assume I have abstract base model class called MoneySource. And two realizations BankCard and CellularAccount. In MoneysSourceListViewController I want to display a list of them, but with ListItemView ...
2
votes
5answers
713 views

Would PMP or CEH(Certified Ethical Hacker) course be more useful to a junior ASP.Net web developer?

Only recently i moved into doing Asp.net web development work, with quite a fair bit on Asp.net MVC. I'm thinking of taking up some courses to further build up my profile. I'm having a touch decision ...
5
votes
2answers
346 views

MVC two models required?

I've been doing software for a long time, but almost all of it has been back-end centric. I recently decided to learn Swing and tried to apply MVC principles. I realize that in Swing the View is ...
12
votes
4answers
3k views

Should I include HTML markup in my JSON response?

In an e-commerce site, when adding an item to a cart, I'd like to show a popup window with the options you can choose. Imagine you're ordering an iPod Shuffle and now you have to choose the color and ...
2
votes
2answers
569 views

MVC, when to separate controllers?

I'm starting with MVC and have a newbie question. What would be the logic criteria to define what a controller should encompass? For example, say a website has a 'help' section. In there, there are ...
10
votes
4answers
5k views

Handling Errors In PHP When Using MVC

I've been using Codeigniter a lot recently, but one thing that gets on my nerves is handling errors and displaying them to the user. I've never been good at handling errors without it getting messy. ...
1
vote
1answer
604 views

Performing user authentication in a CodeIgniter controller constructor?

In "The Clean Code Talks -- Unit Testing" (http://youtu.be/wEhu57pih5w), Miško Hevery mentions that "as little work as possible should be done in constructors [to make classes more easily testable]'. ...
0
votes
1answer
862 views

Actions and Controllers managing strategy in MVC apps

Can anyone name any usefull strategy/architectural pattern for allocating actions between different controllers when using MVC pattern for developing web application? I am now developing web app ...
1
vote
3answers
813 views

How important is it to implement a caching system in an MVC style framework?

I am writing my own PHP framework (...waits for the groans to subside) for the purpose of learning (best practices, design principals etc.) as I'm entirely self-taught and consequently there are gaps ...
3
votes
3answers
626 views

Is it best practice to have a file only of “includes/requires”?

I have 5-10 files on one server that all catch XMLRPC-PHP requests. There's about 20 lines of require_once in each one that are all the same. It'd make life simpler for me to create a separate file ...
7
votes
4answers
173 views

Controllers and re-factoring for maintainability / sensibility

I have read many posts similar to this on the site: however I still am questioning what is best in my situation (also the answers are contradicting from question to question). I have a website ...
2
votes
7answers
1k views

Architectural patterns for interaction beyond MVC? [closed]

We all know the venerable Model-View-Controller pattern used to design interaction [mostly] with human users. It is the de-facto standard in OOP environment. What are some other architectural ...
0
votes
4answers
2k views

Coding in 'core php' and separating logic from presentation

What are the various ways of acheiving this ? Can someone please guide me? I have to code a website for a friend (designer). The friend wants me to use core php and not any framework like codeigniter ...
2
votes
2answers
12k views

How to do MVC the right way

I've been doing MVC for a few months now using the CodeIgniter framework in PHP but I still don't know if I'm really doing things right. What I currently do is: Model - this is where I put database ...
4
votes
1answer
271 views

What is the best practice to develop a visual component in Flex Hero?

What is the best practice to develop a visual component in Flex Hero? I do it like this: I consider a component has 2 "parts", the declarative part (the visual sub-components) which I define in the ...
5
votes
3answers
580 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
1answer
258 views

Using default parameters for 404 error (PHP with mvc design)?

I have a custom made Framework (written in PHP). It all works very good, but i have some doubts about a certain thing. Right now when a user call this url for example: http://host.com/user/edit/12 ...
3
votes
2answers
413 views

Question about modeling with MVC (the pattern, not the MS stuff / non web)

I'm working on an application in which I'm looking to employ the MVC pattern, but I've come up against a design decision point I could use some help with. My application is going to deal with the ...
2
votes
5answers
279 views

Organizing my products database

I’m developing a web-based store in MVC (very closely based on the SportsStore example in Pro ASP.Net MVC 3 Framework http://www.powells.com/biblio/61-9781430234043-0). I’m using a SQL database and ...
2
votes
1answer
646 views

Making Modular, Reusable and Loosely Coupled MVC Components

I am building MVC3 application and need some general guidelines on how to manage complex client side interaction between my components. Here is my definition of one component in general way: ...
4
votes
3answers
1k views

is it a bad practice to call a View from another View in MVC?

I have some plain Views, they don't have any logic behind them (there is no action or controller behind them), their only propouse is to alert the user about something like "We have sent you an email ...
1
vote
2answers
450 views

Javascript MVC in principle

Suppose I want to implement MVC in JavaScript. I am not asking about MVC frameworks. I am asking how to build it in principle. Let's consider a search page of an e-commerce site, which works s ...
3
votes
3answers
1k views

Transaction Design Pattern for MVC and location of responsibility?

I'm designing a pretty standard Spring MVC application, and I'm trying to figure out where the responsibility for transaction management should lie. I've been reading Java Transaction Design ...
5
votes
4answers
1k views

how to structure MVC models and ORM models

I have some trouble getting a good folder structure in my project and i would like to know what other ways i could use to structure my files. I'm currently working in an MVC sturctured folder. www/ ...
12
votes
4answers
3k views

Are Django forms violating MVC?

I just started working with Django coming from years of Spring MVC and the forms implementation strikes as being slightly crazy. If you're not familiar, Django forms starts with a form model class ...
9
votes
4answers
6k views

On MVC can several views have the same controller or one view must have one unique controller?

I'm having some questions while designing a architecture for a project around MVC. (It's a C++/Marmalade SDK project, I'm not using any particular MVC framework, I'm making one.) On several articles ...
4
votes
2answers
647 views

Who should register input listeners: the controller or the view? (MVC)

I'm using an (C++) SDK (Marmalade) and building a project around the MVC pattern. On my app, user input listeners may be registered on certain UI elements/widgets/etc providing a proper callback ...
4
votes
1answer
214 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
570 views

Event driven design and separation of core/UI logic

I am new to event driven development, and I feel lost when I try to implement events that should pass the core/UI boundary. In my program I have the following (example in c#): UI.RuleForm ...
2
votes
1answer
114 views

How to verify the client's view is consistent with the remote model?

i'm designing a client-server system via web broswser and i have this problem: I send the data to the client via JSON, then the javascript view shows the stuff. Then the user takes actions and ...
2
votes
2answers
626 views

MVC: View-Controller Interaction

I have a Java application that I am implementing following the MVC pattern. I want to have a window (view) that contains a form which allows the user to add several text fields. There will also be a ...
1
vote
1answer
452 views

MVC, Java Design Pratices, and Flaws of java.util.Observable and java.util.Observer

I am planning learning Model-View-Controller (MVC) development using Java. While reading I came across a post which mentions java.util.Observer and java.util.Observable for MVC development. As I ...
1
vote
2answers
327 views

Trying to grasp the idea of DI/Unity and possibly apply it to our simple application

Our app basically is a few forms that are filled out by people.. Then these forms are validated and reviewed and reports are created.. So I was thinking about DI and messing with a simple example of ...
2
votes
3answers
514 views

Where does my database schema live in MVC?

I'm starting to check in the SQL files for creating/maintaining our database. Previously SQL files were kept totally separate from our codebase's version control. I'd like to pragmatically store my ...
0
votes
1answer
274 views

Learning MVC - Why does home and about share the same controller?

Let me start this out by saying I've been a asp.net web forms developer for a while now and that I understand mvc is a new way of doing things. As I'm learning mvc and going through tutorials and ...
0
votes
1answer
220 views

How Should a model and controller be distributed between subviews of the View?

In many User Interface libraries, we have concept of views and subviews. so according to MVC pattern every view should update the model as soon as it changes. For that view should have a reference ...
3
votes
1answer
139 views

How do I handle a Controller that's not controlling a specific Model?

I've got a nice MVC set up going but my website requires some views that don't map directly to a model. Specifically I've got some generic Reports users need to run, and now I'm creating a utility for ...
1
vote
2answers
237 views

What are some useful things you can do with Mvc Modelbinders?

It occurs to me that the ModelBinder mechanism in ASP MVC public interface IModelBinder { object BindModel(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext ...
15
votes
6answers
1k views

Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?

So a situation I run into reasonably often is one where my models start to either: Grow into monsters with tons and tons of methods OR Allow you to pass pieces of SQL to them, so that they are ...
2
votes
2answers
325 views

Where should SQL/DB Queries be encapsulated in a software system?

I frequently write small applications (either web based or otherwise) that require heavy database usage. i've attempted various ways of handling where to put the actual sql queries (sort of ad-hoc ORM ...
3
votes
2answers
432 views

Use controller in view in MVC

I have a problem convincing my team mates why we shouldn't use (directly reference) the controller in the view when developing components in the spirit of MVC. I have invoked decoupling and natural ...
2
votes
5answers
352 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 ...
2
votes
3answers
2k views

What is the actual purpose of MVC?

I've seen a lot of stuff that describes how it's done, but not a lot that tells WHY it's done. Is it just a way to keep the code readable, or is there a better reason?
0
votes
1answer
119 views

Places to store basic data

I am using PHP. I'm building a fully modular CMS, which is destined for the public. Some people might view this as a framework, but I intend to write a set of extensions for it, extensions that will ...