MVC (Model-View-Controller) is a software architecture pattern that enforces separation of concerns.
1
vote
2answers
353 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
619 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
823 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/
...
10
votes
4answers
2k 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 ...
8
votes
4answers
1k 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
266 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
152 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.
...
8
votes
6answers
1k views
In an MVC architecture, how closely coupled are the Model and View to the Controller?
I've got an app which uses MVC, but I'm struggling a little as to how the controller should be architected. For example, the View is only viewing some subset of the model's data at once. However, I'm ...
1
vote
3answers
354 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
92 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
373 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
326 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
270 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 ...
4
votes
1answer
799 views
Opensource showcase for MVC in Java Swing
I've allready created small desktop CRUD applications using Java/Swing. In hindsight I'm not quite sure if the overall design of these applications is good. I've also done some reading on MVC and ...
2
votes
3answers
358 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
217 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
135 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
115 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
197 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 ...
14
votes
6answers
747 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
215 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
372 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
308 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 ...
1
vote
3answers
814 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
116 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 ...
2
votes
1answer
443 views
Creating a shared library that might be used with desktop applications and web projects
I have been involved in a number of MVC.NET and c# desktop projects in our company over the last year or so while also managing to kept my nose poked into other projects (in a read-only learning ...
1
vote
7answers
419 views
How to Remember What You Develop?
Fairly new to object programming. Are there any tools that people use to help them 'remember' the architecture of of what is being developed (i.e. what objects do what, list of methods, attributes, ...
12
votes
7answers
1k views
Does MVC apply only to web
It is almost and instantaneous whenever I talk to developers about Model View Controller (MVC) they say you make a request to a url the server builds a entity (MODEL) and provides you with visual ...
3
votes
2answers
393 views
Organizing MVC entities communication
I have the following situation. Imagine you have a MainWindow object who is layouting two different widgets, ListWidget and DisplayWidget. ListWidget is populated with data from the disk. ...
7
votes
4answers
670 views
Advantages of using business logic in model
In an MVC framework i have often heard that use business logic in a model. But i think using the business logic in controller would run faster as view is directly connected to controller. I want to ...
1
vote
4answers
303 views
Need recommendation for transferring ASP.NET MVC skills to PHP
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. ...
3
votes
2answers
904 views
Models per database table?
I am using codeigniter, and have found myself in a similar situation where I have repeated Model methods.
I am creating a Model per Controller. But I would creating a Model per database table be ...
12
votes
7answers
5k 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 ...
7
votes
1answer
395 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 ...
1
vote
2answers
1k views
Is this a proper implementation of an iOS MVC pattern?
After browsing the apple docs, I came across this sample of their MVC pattern:
Using NSNotificationCenter and without using KVO, would this diagram below represent a correct implementation of the ...
4
votes
3answers
269 views
Shouldn't MVC be MCV? [closed]
The model is defined first, then the controllers are fired based on the user request, and they will generate the views (the output).
So it should be M->C->V, right?
2
votes
1answer
334 views
Package conventions for MVC app [closed]
Which (if either) of the below is the more conventional/acceptable way to structure packages in a J2EE app? I'm trying to follow an MVC pattern as much as possible.
foo.bar.users
...
0
votes
2answers
378 views
Is there any proprietary PHP MVC framework?
I was doing a small list of PHP MVC framework (like Zend, CakePHP, Yii etc...) and I noticed that all of them are open source.
Then I tried to find some proprietary framework, but my research was ...
2
votes
2answers
921 views
In MVC, what is the difference between controller and router?
Do they mean the same thing (attaching URLs to actions, or actions to URLs) or is there any difference I'm missing?
Example: http://github.com/dannyvankooten/PHP-Router vs. http://konstrukt.dk
3
votes
1answer
385 views
Rewriting a Procedural PHP App - Should we use a framework?
We have an app that's currently only got about 120 users. The userbase will probably grow by 50% over the next 12 months - but we're going to have to separate storage etc. because we're looking at ...
0
votes
1answer
76 views
Is there a typical way of having a view that is a dependent on another?
I am working on a program with two views, html and ajax (which will be html transmitted via json).
The HTML view is the standard, and by default the ajax should look the same. However, the ajax view ...
10
votes
5answers
2k views
In an MVC system, where should the database persistence code sit?
I've seen multiple configurations for persisting information to the database. Generally, three types of designs seem common in my corner of the world:
Controller manages the persistence
Model ...
7
votes
2answers
839 views
Should the controller pass data to a view in the MVC pattern?
I work with ASP.NET MVC (and other web-based MVC implementations) quite often, but this is something I've never been sure of: Should controller and view communicate?
Of course the controller should ...
3
votes
2answers
176 views
In an MVC project, does the Information Architect define the models?
The definition of an Information Architect's responsibilities seems to fit neatly with the definition of 'model' in the MVC pattern. But I've never heard the two concepts discussed together.
In a ...
1
vote
7answers
350 views
Should PHP view files be called something other than '.php'?
By default, any file that PHP touches is usually suffixed with .php. It's universally understood by Apache / Nginx as the default for PHP files and most setups expect PHP files to end in this ...
11
votes
5answers
862 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?
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 ...
4
votes
2answers
541 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.
...
2
votes
1answer
495 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 ...
4
votes
4answers
287 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 ...


