Model–View–Controller (MVC) is a design pattern for computer user interfaces that divides an application into three areas of responsibility. It is often applied to websites.

learn more… | top users | synonyms

10
votes
1answer
2k views

Intranet PHP application

I'm more of an IT guy (no CS course) with a strong and passionate relationship with Unix and I love KISS. I'm writing an application to help my coworkers with their daily tasks. Every now and then I ...
-1
votes
1answer
198 views

Using async & await

I've been experimenting with some old code that needs refactoring in places and was testing if there was any improvement to iis threads etc by uploading file asynchronously (Server Side). I'm using ...
4
votes
0answers
120 views

Small PHP-MVC system (for personal learning / use)

I've made an "simple" / "small" MVC-like PHP system. I've used some code of an project I used before and ask questions about it back then to. The thing is, it works (the admin part to begin with), ...
3
votes
0answers
33 views

Redirecting a user

When the user clicks the first button ('Back to List' button), I redirect the user to the Employee List page. Can you please review this and suggest if there is any better way of achieving the same? ...
3
votes
0answers
221 views

Laravel controller for a commenting system

Can someone review my Controller? I should follow these guidelines: Code should be written with MVC pattern and to use OOP. The code now works fine, but I need to improve it. Also, should I use ...
3
votes
0answers
93 views

Heterogenous tree in the application domain: How do I represent them?

The Domain I have three types of items in my domain: ItemA, ItemB, ItemC. (I can't use their real names.) ItemA has one attribute: thing_id. ItemB has 6 attributes: thing_id, name, description, ...
3
votes
0answers
146 views

Recording loans of access cards to people in a company

I'm fairly new to Python and currently building a small application to record loans of access cards to people in a company. I'm using wxPython for the GUI and SQLAlchemy for the CRUD. I'm loosely ...
2
votes
0answers
103 views

PHP MVC Service Layer Role

I wrote a series of questions in a previous post and a user recommended that I separate the questions. I have made the switch from procedural programming to object-oriented programming. I have ...
2
votes
0answers
156 views

Procedural to OOP MVC: Understanding Controllers, Models, and Service Layer

I designed a framework to make the switch from procedural to OOP design. This question will contain multiple parts I will bold each question to make reading/dissecting easier. I attempted to look into ...
2
votes
0answers
59 views

Model view controller

I will be implementing MVC model in my program but before that, I have done a simple program based on my understanding of the MVC model. I have three pages: The user will enter a value in page one ...
2
votes
0answers
71 views

XML to JTree app needs Model/View/Controller refactoring

I'm developing a JavaSE-1.7 Swing application that displays XML files as a JTree. This will be the base for further work, e.g. filtering nodes. My questions, as a ...
2
votes
0answers
40 views

Maze player model view and controller

This is the player view model and controller for human player using a keyboard (easily extendable for over the network / split screen mode). The AI controller is posted in another post I've made ...
2
votes
0answers
42 views

Sports statistics controller

Is there too much logic in this controller (should I migrate them to the model)? How else can it be refactored? ...
2
votes
0answers
125 views

Simple Java MIDI player followup

This is my second iteration of a simple Java MIDI player. I've made several amendments and would like to see if the code is now correctly implemented and readable. This follows on from the first ...
2
votes
0answers
151 views

DAO and service layer design in Java MVC web application

I'm building a prototype MVC web application as a learning exercise so I'm avoiding existing frameworks. I'm interested in feedback on the following approach The view consists of JSPs which use EL to ...
2
votes
0answers
44 views

Which pattern could help to refactor this controller code?

I know I should use services and patterns to refactor this controller action, but I can't imagine one that could fit/be appropriate for this problem. It seems a strategy or template, but a strategy ...
2
votes
0answers
123 views

Correct usage of an MVC pattern in web applictaion

I have a method in my controller (GetAllPatients/EnrollmentQueue) which does return the correct data (an array of ...
2
votes
0answers
71 views

Modular dynamic based routing with wildcards

I've created this router for my framework and wanted to get some feedback on if it's the most efficient way to search the routes. The main router ...
2
votes
0answers
472 views

Tiny MVC - Handling validation / sanitization in a model

I'm fairly new to MVC concepts and PHP input validation. I'm open to all input, but I'm largely wanting to know if the following: Follows the MVC pattern correctly - if not, how can I change it to ...
1
vote
0answers
88 views

Login authentication model

I have made my model global so that I can work only a model with several controllers. Is it good or bad practice? And according to this, is my login process secure? Login check function in ...
1
vote
0answers
29 views

MVC Swing Application

I want to make sure this is a good implementation of MVC. I started earlier with this code found here and it was horrible compared to what it is now. If it is a good implementation of MVC what, are ...
1
vote
0answers
107 views

Java MVC Main Method and Controller

I'm coding a school project that involves MVC and threading. This is my Main class. From there I launch the actual client. ...
1
vote
0answers
69 views

Create and access database connection

I'm working on an MVC project and I'm writing the code for get access to the database connection. I have two files: The first (PdodbLib.class.php) extends PDO: ...
1
vote
0answers
47 views

Newsfeed app for allowing custom Reddit feeds

I'm currently working on a newsfeed app (see it live here or its files on GitHub) that lets a user create a custom Reddit feed. The user adds the subreddits they'd like to view, and then can view them ...
1
vote
0answers
88 views

Folder model controller view

I'm using a slim router and have made a folder model controller view. Below is one of my model files. I made one database with one model. I have some problem in my project: there are several ...
1
vote
0answers
145 views

Mini eCommerce Application and Message/Warning/Error Handling

I decided to build a basic eCommerce application in c++ as a learning experience. In the past, I've gone with a fat controller, skinny model approach, and while it has worked, my results always end up ...
1
vote
0answers
221 views

Correct MVC in CodeIgniter

In my CodeIgniter I have a Login controller that load this view: ...
1
vote
0answers
172 views

Form-processing controller action

I have a fairly ugly controller method I would like to refactor / extract. I can only test this in an integration-type test which kind of signals a code smell. The method processes the form and needs ...
1
vote
0answers
88 views

Data Access Objects and Entity Relationships

What is the proper way to structure DTO's for my tables? Three of my tables are Documents which contains Pages and Fontstyles. I am creating an EditDocument view in which I will edit these (and more) ...
1
vote
0answers
721 views

How to structure a (true) MVC application?

I am working on a PHP project (the code should also be readable by non PHP people though) which I am trying to setup using a true MVC structure. Or at least as closed as I can. What I am currently ...
0
votes
0answers
26 views

MVC and asynchronous callbacks

I am currently refactoring my GWT client and try to apply the MVC pattern to all concerned classes. My problem is that I am not sure about two things here: Where do I control which view gets ...
0
votes
0answers
124 views

Azure Active Directory controller

I have a class called AzureActiveDirectoryController. This class has some methods: one to create users, one to get the app name, one to register schema extensions ...
0
votes
0answers
88 views

Validation in Node.js

I'm building a NodeJS application, but I'm not sure what will be the best way to structure my code. I have the following model: ...