0
votes
1answer
83 views

Design MVC site such that UI developer can work without access to data tier? [closed]

I'm working on an ASP.NET MVC site (using Team Foundation Service for source control) that I've divided into a few separate projects under one solution: Project.WebAPI (Main entrypoint, contains ...
0
votes
2answers
179 views

Is it wrong to have HTML strings within PHP objects, or is it only wrong in controllers?

I've always thought that in typical MVC design it is bad practice to build & concatenate HTML strings in any PHP file or class that isn't strictly a template. I'm working on a large project with ...
0
votes
1answer
98 views

Is this better called model, controller or something else? [closed]

I need a good name for one interface in a GUI application. The application has normal logic in standard object-oriented language, user-interface in a special language (something like XUL/XAML/...) ...
4
votes
3answers
293 views

Model-View-Controller: Does the user interact with the View or with the Controller? [closed]

I have recently learned about the MVC design pattern. I'm learning from the Head First Design Pattern book. According to this book (if I understand correctly): The Model is most of the application ...
1
vote
1answer
133 views

Web design pattern

I am building a small website, in PHP and I am using MVC design pattern for the UI. In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone. All ...
0
votes
1answer
180 views

Migrating old Asp.net 1.1 project to mvc 3 or 4

we have to migrate a very old project that are having more than 500 web forms and 400 tables and it is hugely depends on stored procedures, the current specification is: Asp.Net : .NET version 1.1 ...
0
votes
1answer
130 views

Practical Use of Depency Injection (IoC) Container

I am creating a MVC-ish framework in PHP. I am trying to implement a DI Container to allow the creation of controller objects (among others). My MVC framework is pretty typical. Each module (or ...
0
votes
2answers
470 views

Model-View-Controller — Where does a factory class go?

I'm working (slowly) on a small Flask project. One of my models is a class called Post, which is a lightweight namedtuple. Post objects are created by a PostFactory, because creating a Post involves ...
2
votes
1answer
157 views

MVP pattern and references

I am doing a Windows C# application. I asked this question and I was told that the viewer/presenter should never know anything about the model. Does this mean that I should not add a reference of my ...
1
vote
2answers
228 views

Is there a design pattern that describes the separation of a Form from a Model

I am working on a web application implemented in C#, that follows MVC conventions. This application contains a page that allows me to create or update a Wingding. The view passes a complete Wingding ...
1
vote
3answers
309 views

MVC is a GUI Architecture or a Architecture to GUI and Domain?

Fowler refers to the MVC, as a GUI architecture: There have been many different ways to organize the code for a rich client system. Here I discuss a selection of those that I feel have been the ...
7
votes
2answers
3k views

.NET MVC project architecture / layering

When planning the architecture for a mid-large scale MVC web application how do you implement the layers to be as decoupled as possible and easy to test? (basically follow best practices) Let's say ...
1
vote
1answer
112 views

how to model a connection to a resource, with rudimentary event processing

For my simple MUD client I'm using Apache Telnet (no, not ssh). A mud client is a strange beast: Generally, a MUD client is a very basic telnet client that lacks VT100 terminal emulation and the ...
4
votes
2answers
695 views

How does MVC work with the principle “Tell, Don't ask”?

Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. — Alec Sharp So, when a view wants to display some information that is suppose to be ...
2
votes
2answers
251 views

Is state pattern a good solution for implementing UI changes for Landscape and Portrait modes?

For our iOS app, a lot of complicated UI logic depends on the interface orientation of the ViewController. This conditional logic is present in a lot of places. Can it be segregated into different ...
23
votes
8answers
3k views

MVC Architecture — How many Controllers do I need?

I have been coding for a while, but mostly scripts and simple applications. I've moved into a new role where it is all about developing Web Apps and using a proper MVC architecture, so I am ...
32
votes
5answers
3k views

What are the downfalls of MVC? [closed]

I've been using MVC/MV* since I started actually organizing my code years ago. I've been using it so long that I can't even think of any other way to structure my code and every job I've had after ...
1
vote
4answers
354 views

Is it fair to call a database or a document a “Model”, as in Model/View/Controller?

Part of my job is working on line-of-business applications built around client-side databases, such as Access or FoxPro. Other times these local LOBA's have direct document access, such as an exact ...
1
vote
3answers
541 views

Model-View-Controller: who caches the data?

I am building a GUI to interface an embedded device to a PC host. The GUI provides control over the device parameters and displays some feedback from it. The GUI also has to emulate some of the device ...
2
votes
2answers
210 views

In MVC software, who should load the models?

I'm working in a REST JavaScript client, and I'm trying to follow the MVC pattern, but a very basic question came to my mind: who should make the http request and load the data into the model? My ...
1
vote
1answer
517 views

Trying to understand 3 layer programming [closed]

I am confused to understand the structure of a 3 layer programm. Where is good place for exceptions, entity and etc.? If I use MVC, in my UI model, how to transfer entity class to model class and ...
1
vote
1answer
130 views

Design pattern for complex view creation in sheet music

I've got a bunch of Note-Models with properties like pitchand duration. In music notation, these notes must now be placed into a certain bar on a certain line on a certain page, and so on. Many more ...
1
vote
1answer
241 views

Creating a System Sequence Diagram from an [extended] use case

As I have been taught - one controller = one use case. But I have: OutsiderController SupplierController (which extends OutsiderController) SubContractorController (which also extentds ...
2
votes
1answer
250 views

Do I need JUnit tests for the controller layer on a MVC when I have a database layer

I have a MVC which has this structure: ui controller db model Basically the controller doesn't really do much more than connection ui with db layer. Do I need to provide JUnit tests for the ...
0
votes
1answer
172 views

Where should I put my method

I am writing a Java program using the MVC design pattern. I have classes Item and Supplier. In the database they are connected through a item_supplier table. I'm writing a method which will give me ...
3
votes
1answer
112 views

MVC URL formatting/design

In refactoring a lot of MVC code, I have run into an issue with my URL design. For example, let's say we have a Venue object public class Venue { public long ID { get; set; } public ...
0
votes
1answer
741 views

How to design an application that read files using MVC pattern?

I am going to write an application that reads data from a csv file, and display that data to the user. I intend to apply an MVC design pattern to create this application. A user will interact with ...
4
votes
6answers
345 views

Is MVC ever considered/applied system-wide?

I was having a discussion with a colleague and he bought up the topic of MVC and the use of ViewModels in ASP.NET MVC. The discussion was that, in an n-layer architecture, the UI, Business Layer and ...
6
votes
2answers
502 views

Why is using named routes for generating outbound URLs a violation of Separation of Concerns?

What is separation of concerns? In computer science, separation of concerns (SoC) is the process of breaking a computer program into distinct features that overlap in functionality as little ...
2
votes
2answers
598 views

How to use MVC in practice

I'm very confused. I can't even begin to understand how MVC would be implemented outside of web development. This might seem like too general a question, but how would one apply MVC. I have the ...
5
votes
2answers
1k views

Can REST API be used as business layer?

I am using PHP Codeigniter MVC design pattern and I had this project with some sort of specific business processes In my application I will be dealing with 2 existing REST APIs: Google Trello ...
2
votes
2answers
270 views

Is it reasonable to build applications (not games) using a component-entity-system architecture?

I know that when building applications (native or web) such as those in the Apple AppStore or Google Play app store that it's very common to use a Model-View-Controller architecture. However, is it ...
9
votes
4answers
868 views

In MVC, can/should basic data retrieval from the Model be done in the View?

Given the concept of 'skinny controllers, fat models' and the general acceptance that Views can directly call on Models when requiring data for output, should one consider handling the 'get and ...
3
votes
2answers
758 views

Service layer design

I am developing an MVC website in PHP, and for the first time, I would like to implement a service layer. I have some design considerations I would like to get some advice on. The backend will by no ...
17
votes
2answers
6k views

MVCS - Model View Controller Store

I recently decided to start learning iOS Development, and to this end I’ve been reading iOS Programming: The Big Nerd Ranch Guide. In the book the authors describe a design pattern MVCS - ...
2
votes
1answer
224 views

In JSF where do objects like PhaseListeners fit in the MVC pattern?

When it comes to JSF, I've had trouble distinguishing where certain objects I create fit into the overall MVC pattern. The View is simple enough since that's handled by the .xhtml template but when ...
9
votes
7answers
412 views

Is the use of security conditionals in a view a violation of MVC?

Often what's displayed to a user (e.g. on a web page) will be based partly on security checks. I usually consider user-level / ACL security to be part of the business logic of a system. If a view ...
13
votes
4answers
7k views

How to avoid big and clumsy UITableViewController on iOS?

I have a problem when implementing the MVC-pattern on iOS. I have searched the Internet but seems not to find any nice solution to this problem. Many UITableViewController implementations seems to ...
1
vote
3answers
5k views

In MVC , DAO should be called from Controller or Model

I have seen various arguments against the DAO being called from the Controller class directly and also the DAO from the Model class.Infact I personally feel that if we are following the MVC pattern , ...
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 ...
0
votes
1answer
321 views

In PHP, what are the different design patterns to implement OO controllers as opposed to procedural controllers?

For example, it's very straightforward to have an index.php controller be a procedural script like so: <?php //include classes and functions //get some data from the database //and/or process a ...
5
votes
7answers
7k views

Is there any design pattern except MVC for web?

I want to know are there any design patterns for web besides MVC? I know there are design patterns as: Registry, Observer, Factory, ActiveRecord ,... and MVC a set of other design patterns and folder ...
2
votes
1answer
571 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
2answers
564 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 ...
9
votes
4answers
5k 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 ...
1
vote
1answer
434 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 ...
5
votes
3answers
561 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 ...
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 ...
29
votes
11answers
3k views

Is the 'C' in MVC really necessary?

I understand the role of the model and view in the Model-View-Controller pattern, but I have a hard time understanding why a controller is necessary. Let's assume we're creating a chess program using ...
12
votes
7answers
2k 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 ...