0
votes
1answer
59 views

Where and how to reference composite MVP components?

I am learning about the MVP (Model-View-Presenter) Passive View flavour of MVC. I intend to expose events from view interfaces rather than using the observer pattern to remove explicit coupling with ...
2
votes
1answer
131 views

Choosing between the view and the controller for my code

I'm aware there are a lot of topics about MVC design but it's hard to find good explanations: what I should do, what are the consequences of the different possibilities... So I'm working on an ASP ...
1
vote
0answers
130 views

MVC content management framework with an admin panel

I've lately been developing my own MVC content management system using PHP and, at least in my mind, am a little stuck with the system design. I believe this would apply to building a content ...
0
votes
1answer
105 views

Does my use of the strategy pattern violate the fundamental MVC pattern in iOS?

I'm about to use the 'strategy' pattern in my iOS app, but feel like my approach violates the somehow fundamental MVC pattern. My app is displaying visual "stories", and a Story consists (i.e. has ...
-1
votes
2answers
171 views

Help with MVC design pattern? [closed]

I am trying to build a java program for user login but I am not sure if my MVC design is accurate. I have the following classes: LoginControl - servlet LoginBean - data holder java class with ...
0
votes
2answers
232 views

How to design console application with good seperation of UI from Logic

Is it considered an overkill for console application to be design like MVC , MVP or N tier architecture? If not which is more common and if you can link me to simple example of it. I want to ...
0
votes
1answer
79 views

MVC: Where should I store interchangeable algorithms used by the Model (whose names also need to be accessible to the View)?

Please consider a program, where the user chooses an algorithm from a list, and the Strategy pattern is utilized to set this algorithm as the model's operation. For example, an image procession ...
6
votes
1answer
174 views

Javascript MVC application design (canvas)

I'm having difficulty grasping how to structure/architect a canvas application using an MVC like approach in Javascript. UI will be fairly fluid and animated, the games fairly simplistic but with ...
0
votes
1answer
106 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
206 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 ...
4
votes
3answers
458 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
0answers
99 views

Run a function when a function in a list is executed?

Goal: I'm currently doing an MVC project and I have this method to update the ViewBag (based on previous actions of the user). I would like to call this function whenever a certain list of MVC Actions ...
1
vote
1answer
147 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

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
713 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
160 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
231 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
406 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
4k 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
135 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
742 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
276 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 ...
25
votes
8answers
5k 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 ...
34
votes
5answers
4k 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
364 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
596 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
258 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
548 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
139 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
251 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
280 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
179 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
126 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
838 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
382 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
587 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
729 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
298 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
1k 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
857 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 ...
19
votes
2answers
8k 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
241 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
457 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 ...
15
votes
4answers
10k 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
6k 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
337 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 ...
7
votes
7answers
8k 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
642 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: ...