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

learn more… | top users | synonyms

12
votes
4answers
1k views

Is Unit Testing the primary objective of MVC Pattern?

Recently in an interview, one of the questions was 'Why do we use MVC?’ I just answered that it is much closer to how, many of the real world systems are! Explained the benefits it has when it comes ...
5
votes
3answers
6k views

MVVM or MVC? Want to use the same set of classes for WPF and ASP.NET

I am a newbie in terms of Design Patterns. I just started learning MVC when I am hearing a new buzz, MVVM. I want to learn the insights of both of these by redesigning an old inventory and invoicing ...
9
votes
2answers
6k views

How to completely decouple Model from View/Controller in Java Swing

Is there a collection of commonly-agreed-upon design guidelines for separating the Model classes from the View/Controller classes in a Java Swing app? I'm not so concerned that the View/Controller ...
2
votes
4answers
3k views

What to explain when asked “How did you implement MVC”?

I have a project on my resume in which we had used MVC Architecture and Java, JSP and MySQL. Hence during the interviews if the position requires experience about MVC Architecture, I have to face the ...
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 ...
15
votes
7answers
2k views

Is the MVC pattern used in industry a lot? What's all the hype? [closed]

I'm a student but I am hopefully moving into the software industry soon. There seems to be a lot of hype about the MVC software pattern. I noticed that PHP frameworks are often MVC, what about ...
0
votes
3answers
489 views

Need recommendation for transferring ASP.NET MVC skills to PHP [closed]

I am looking to translate my skills in .NET to PHP - specifically in regards to ASP.NET MVC. At work I am currently using .NET MVC 2.0 on a variety of projects and thoroughly enjoy the platform. ...
4
votes
4answers
2k views

Building websites, which is the better approach MVP or MVC?

I'm looking for feedback on MVP and MVC patterns used as a framework to build a website. I've used both with a certain degrees of success and failure. Furthermore I've worked in places which have ...
2
votes
2answers
700 views

Naming controllers and their methods

I currently use one controller per action. One of the problems—sort of—I encountered is when naming the methods of these controllers, which only have one. Should I use a generic method name like get() ...
1
vote
3answers
1k views

Models should match table structure, Viewmodels match how the data need to be displayed?

I have a database table with many columns, that I want to display over several pages, similar to a turbo tax style information collection form. With only 1 or 2 items per page. Is it right to ...
5
votes
5answers
891 views

Multi MVC processing vs Single MVC process

I've worked fairly extensively with the MVC framework cakephp, however I'm finding that I would rather have my pages driven by the multiple MVC than by just one MVC. My reason is primarily to maintain ...
3
votes
5answers
455 views

Is SOA suitable for developers or only for business/IT management people?

Let's suppose you're the lead of a team of developers that needs to build a big information system such as an ERP or Human Resources software, or whatever system that is composed by multiple business ...
6
votes
1answer
380 views

MVC framework seems to suggest creating possibly hundreds of .aspx or .cshtml pages. How do I avoid this?

So, I was playing around with MVC3. Correct me if I'm wrong but based on all examples I've seen, it is suggested that you pretty much have a page for every model and Action from the Controller. So ...
11
votes
5answers
921 views

When to use MVC

I'm building a site with PHP and a MySQL backend. But, I am currently not using any type of framework. Should I be using Model View Controller?
5
votes
4answers
610 views

When developing a MVC web application should views or models be created first?

I have to build a new application from scratch, so I want to implement it using MVC3 and try to follow general best practices as closely as possible. However, I'm developing it as a one man army. ...
3
votes
2answers
444 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 ...
5
votes
4answers
319 views

What's the correct approach for passing data from several models into a service?

I have an AccountModel and a page where the user can upload a file. What I would like to have happen is when the user uploads the file. The PageController does something like the following. this is ...
13
votes
7answers
8k views

Do experienced Ruby on Rails developers use scaffolding?

In the Ruby on Rails tutorial, I read something that suggested that experienced developers do not use scaffolding since they tend to like to just write the code to connect the MVC on their own. In a ...
14
votes
8answers
3k views

How do you organize your MVC framework while supporting modules/plugins? [closed]

There are a two main codebase structures that I have seen when it comes to MVC frameworks. The problem is that they both seem to have an organisational bug that goes with them. Standard MVC ...
4
votes
1answer
279 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 ...
9
votes
3answers
992 views

MVC : Fully populated models or Partially Filled Models?

This one has haunted me for so long. When doing MVC programming what do you think is the better programming practice? Should one use fully populated models or the partially filled ones, especially ...
3
votes
2answers
4k views

In MVC where do you put action methods for views in the shared directory?

I have a website built using a MVC.NET framework with C# that uses some shared views and partial views. In order to display the views properly there is a bit of code that must reside in the ...
6
votes
8answers
352 views

What benefit do I get from good methodology?

One of my friends has worked for nearly 10 years, asked me why he needs to learn new things such as unit-testing, MVC, Multi-tier architecture (he creates 3-tier application but designs like 2-tier), ...
8
votes
4answers
11k views

One controller per page or many pages in one controller?

I just wanted some advice regarding the MVC way of doing things. I am using codeigniter and I was wondering if it's better to have one controller per page for a website or to have one controller for ...
4
votes
3answers
562 views

How to show someone of the power of model-view-controller design pattern?

I've been working with a friend on a project that we've taken over, and I've realized that we have a big problem implementing the model-view-controller design pattern due to the way that the project ...
17
votes
2answers
5k views

Alternative patterns for web development? (non-MVC)

Recently I've been reading some blog posts regarding MVC and how it doesn't fit the web. I've learned about alternative patterns like the RMR Architecture. I'm curious what other patterns people are ...
2
votes
1answer
145 views

How to output library test/benchmark data in a web framework?

I am writing an MVC framework. I have a folder full of library classes, each are self contained, and could be ripped out of the framework and used by themselves. The only problem is that a few of ...
0
votes
1answer
310 views

Evolution of my MVC design with new UI complexity

I have a desktop instrumentation application in MVC. Currently I had 2 versions of the application, thus 2 views and 2 controllers, each having common code in a base class. The views react directly to ...
5
votes
1answer
3k views

If you have a piece of logic that needs to be shared between two controllers where do you keep it?

I have a set of single purpose functions that I need in two separate controllers. Right now I just have duplicate code and I want to get rid of it. This code is part of the controller and doesn't ...
18
votes
5answers
2k views

MVC, WCF, EF, LINQ - Is it just me? [closed]

...or are things getting more complicated? It seems to me that you need to know a lot of stuff to 'properly' develop an MS web app these days. In the bad old days when we didn't know any better we ...
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 ...
1
vote
4answers
3k views

When designing an application around Model-View-Controller (MVC), what is in your toolbox?

There are a lot of great explanations for what the Model-View-Controller design pattern is, but I am having trouble finding good resources showing how to use it in practice. So, when you are starting ...
6
votes
2answers
1k views

Observing MVC, can/should the Model be instantiated in the ViewController? Or where?

I'm writing an experimental iPhone app to learn about the MVC paradigm. I instantiate my Model class in the ViewController class. Is this stupid? I'm asking because storing the id of the Model class, ...
13
votes
4answers
4k views

Explain Model View Controller

My experience with developing dynamic websites is limited mostly to Java servlets. I've used Tomcat to develop various Java servlets, and I wouldn't hesitate to say that I'm reasonably proficient ...
3
votes
3answers
517 views

MVC and individual elements of the model under a common base class

Admittedly my experience of using the MVC pattern is limited. It might be argued that I don't really separate the V from the C, though I keep the M separate from the VC to the extent I can manage. ...
2
votes
4answers
197 views

Models, controllers, and code reuse

I have a blog where users can post comments. When creating a comment, various things happen: creating the comment object, associations, persisting sending notification emails to post's author ...
2
votes
1answer
653 views

I'm creating my own scalable, rapid prototyping web server. How should I design it?

I'm going to create my own web server that focuses on scalability, rapid prototyping and the use of JavaScript as the server's scripting language, much like node.js. It will use a ...
0
votes
5answers
2k views

What file extension do you use for your template/view files in PHP? [closed]

I'm building a Model-View-Controller framework, and it has come time to decide how I will be creating and using view templates and layouts. Some frameworks use special extensions for these files. ...
7
votes
5answers
2k views

MVC Pattern, ViewModels, Location of conversion

I've been working with ASP.Net MVC for around a year now and have created my applications in the following way. X.Web - MVC Application Contains Controller and Views X.Lib - Contains ...
3
votes
2answers
2k views

Unobtrusive JavaScript (regarding asp.net mvc3) not clear

Unobtrusive JavaScript avoids injecting inline JavaScript into HTML. This makes your HTML smaller and less cluttered, and makes it easier to swap out or customize JavaScript libraries ...
4
votes
1answer
494 views

Examples of different architecture methodologies

Is there a resource or site which illustrates building the same application (desktop or web) using several different contrasting architectures? Such as MVP versus MVVM versus MVC, etc. It would be ...
1
vote
5answers
1k views

Is MVC now the only way to write PHP?

Hey... its XMAS Eve and something is bugging me... yes, I have work on my mind even when I am on holiday. The vast amount of frameworks available for PHP now use MVC. Even ASP.net has its own MVC ...
21
votes
6answers
3k views

How much business logic should be allowed to exist in the controller layer?

Sometimes we have some business logic represented in the controller code of our applications. This is usually logic that differentiates what methods to call from the model and/or what arguments to ...
4
votes
1answer
308 views

MVC for our application?

There are some issues about how to manage our program designs and programming styles. I was assigned to find a solution to write reusable code - though, the programming team does not follow the rules. ...
3
votes
2answers
4k views

Python MVC framework for desktop applications

I'm used to program with Python and GTK using pygtk library. I feel like my programs are not well separated according to MVC model. I think following a framework it would help me to design better ...
11
votes
4answers
5k views

Why would you use MVC over Web Forms?

Recently an architect described our company as offering a Rolls-Royce solution (MVC) when all he needed was a Toyota (Web Forms). I'm curious to find out what you think about web forms vs MVC as an ...
4
votes
1answer
475 views

MSFT released “ASP.NET Developer Guidance” PDF… What's missing in your opinion?

Microsoft created this ASP.NET documentation map that aggregates a ton of great links into a single PDF. ...
4
votes
2answers
647 views

Problem sets or challenges and solutions for beginners to practice MVC, OOP, MVT etc. type problems [closed]

Coding bat, project euler, python challenge for example are all amazing brain teasers that usually provide you with some learning material, ways to compact your code, and enhance your problem solving ...
7
votes
4answers
2k views

Is MVC just the SEO of PHP programming?

There's around a zillion "PHP frameworks". And most of them bill themselves as following the MVC pattern. While it's welcome to overcome osCommerce coding style (processing logic heavily intermixed ...