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

0
votes
0answers
27 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 ...
0
votes
1answer
65 views

Implementation of inheritable pImpl idiom and MVC pattern

I am trying to write an object "template" that use pImpl and MVC pattern to encapsulate everything not specific to the object. The following is how I tried to attempt it. I am sure that the code ...
3
votes
2answers
56 views

Should this Method be in TableViewCell or ViewController?

I have a custom tableview cell for displaying different foods, with a star next to each name. If the food has been favorited (i.e., it exists in the database), the star is filled in, otherwise it is ...
4
votes
1answer
28 views

Model class for networking that uses notifications

I just finished a model class that represents an Instagram Networking client for my iOS app. I am specifically looking for a review of my use of static constants. These are strings that represent ...
3
votes
0answers
41 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, ...
11
votes
1answer
235 views
+50

My final sign up controller

I've asked a couple of questions here before regarding my controller, but I think I've finally gotten to understand controllers completely, but I'll never be sure unless I get my code reviewed. I've ...
6
votes
1answer
72 views

MVC Model validation callback

I have made a simple MVC framework of my own for my personal website to learn a thing or two about how this whole thing even works. I think I've got the idea, but there's one thing I'm not sure about. ...
3
votes
2answers
39 views

Further refactored Model class that represents a calculator

Here is my Model class's new header file: ...
4
votes
3answers
66 views

Model class representing a calculator

I have a simple Model class that represents a calculator. Here is it's header file: ...
1
vote
0answers
44 views

Extending the MVC Routecollection

I'm currently developping an MVC framework on which I will be writing my websites. This is done through the usage of a starter kit. In standard MVC, your routes are registered like the following: ...
3
votes
1answer
55 views

Swing MVC and Command Pattern

I am writing an application with Java 8 using NetBeans, and want some reassurance that I am going the correct way with this. I am finding it tough because of the use of Swing. I have gone for one ...
6
votes
2answers
1k views

My boss re-wrote my PHP/Yii controller code. Which is better?

I was recently asked to write a Question-and-Answer feature for my company's product pages using Yii 1. It was my first Yii project, and it was a little rough around the edges (Code A). However, when ...
6
votes
1answer
88 views

Java MVC Implementation

I am trying to write an MVC based application from scratch using Java 8 and Swing... I am having some difficulties with this. I want to know if I am going the correct way about this... My controller ...
2
votes
1answer
67 views

MVC Form Handling

I just would like to know if I am heading in the right direction with this. I am trying to learn and understand the concept of MVC, and I am doing that while making my own webpage, so I can learn a ...
1
vote
1answer
83 views

Breaking memory game code into MVC form

I am currently coding a memory game whereby upon the game starts with 14 cards displayed faced down. The player will start by clicking on 2 cards. The cards will be revealed. If both of the card ...
1
vote
3answers
73 views

Dependency injection/dependency injection containers in MVC web app

I just learned about dependency injection/dependency injection containers, so this is my test using DI/DIC in my MVC app. Controller ...
3
votes
1answer
62 views

Implementation of MVC pattern with paintComponent method

Could someone review my code, with respect to OOP, clean code and MVC pattern? Main app: ...
10
votes
2answers
109 views

Sending SMS through twilio from play framework

I am trying to send SMS using Twilio with Scala 2.10 in Playframework 2.2, but this code is looking odd to me, maybe due to lots of conditions. I'm sure it needs some important reviews. ...
2
votes
1answer
63 views

After refactoring using template class, PHP file takes forever to load, timeout after 30 seconds at times

I've been learning how to code for the past 3 years about. I have made some really good progress I think, and right now I'm trying myself on creating an MVC framework. I found this awesome idea on ...
6
votes
1answer
105 views

Proper way of using the MVC concept - update

Original question: Is this the proper way of using the MVC-Concept? I updated my files as instructed, and now I require a review. Please point out the most minute things out to me for me to have ...
5
votes
2answers
236 views

Is this the proper way of using the MVC concept?

I've just completed coding my template engine. I'm willing to have a review on how to increase the quality, efficiency, elegance and performance of the code, perhaps by shortening the code, etc. I'm ...
4
votes
1answer
49 views

Making this site navigation less verbose

I have this one controller that serves up all the webpages and any dynamic content. Is this the most efficient way of doing this? Can it be improved? ...
8
votes
1answer
99 views

Separating Logic from GUI

I am new to Java's Swing and built a test client that connects to a server. I was wondering if my use of a Controller class as a link between the classes ...
3
votes
0answers
122 views

Strategy Game in Javascript with Three.JS

I've been playing around with porting a simple strategy game over to Javascript, the idea being to run it in a browser for testing. I've done some simple Javascript code in the past, but this is my ...
4
votes
1answer
82 views

Created 2 new classes to represent my backend service and persisted data in iOS app

I just created 2 model class for my iOS app: HALUserDefaults represents the persisted data in my app. It has the ability to both retrieve persisted data and store ...
3
votes
2answers
48 views

Using `exec()` in an autoloader

After reviewing autoloader functions on the site, I didn't see anything like this, and I was wonder what may be wrong with this? ...
4
votes
1answer
62 views

Cleaned up a small MVC refactor in iOS app

I have a view controller on my app, where the user is shown a table view. The table view displays their address book contacts and allows the user to select any friends that they would like to invite ...
3
votes
1answer
62 views

Very small start to MVC refactor in iOS app

I started to refactor my app to MVC today. I wasted a lot of time because of simple mistakes. One was I kept trying to access the getter method inside of my custom getter method, which just causes ...
0
votes
1answer
81 views

Refusing to use a common template engine

As the title says, I refuse to use a common template engine. I have my reasons, so instead of doing this: ...
5
votes
2answers
104 views

Would this be considered MVC?

For many days, I've been re-designing my application, applying some custom pattern and making our code looks like a framework. I have something like this for separate the business logic, from views: ...
5
votes
1answer
90 views

Controller for handling user registration

I spent a lot of time doing Go Horse Extreme programming, but now I want to be a better person. How can I make this method smaller, better, more OOP? ...
2
votes
1answer
66 views

Cleaning User Input

I am not sure if I am approaching this task the correct way. I have a view model with multiple string properties. I pass the model through an interface to a service class that contains a void to ...
4
votes
0answers
89 views

Improving models for a Django quiz

I'm working on a little django quiz taking app. Currently I'm making it's models. So far I've got Quiz, Question, ...
5
votes
2answers
172 views

DRY + principle of least knowledge + MVC in JavaScript

Is there any way of improving this code? (Here's a JSFiddle with an example and comments) Example: A Hotel greeter can greet guests and accepts tips, but it's impossible to see the total of tips a ...
5
votes
1answer
111 views

Basic and simple view, add, edit and delete functionality

I want to know what needs to improve with my application. Maybe there is a better way instead of what I am using currently. index.html: ...
3
votes
2answers
139 views

PHP Router for MVC

I recently started developing my first serious project in PHP, a MVC completely build by myself, which is quite a challenge, when being new to OOP. So the main struggle of the whole project has, and ...
3
votes
0answers
41 views

Proof of concept and learning exercise for the 'ports and adapters' architecture

The script creates a simple app with a GUI containing a input field and a button to select a folder. On startup a default value is set to the input field. If the user types a value or selects a ...
2
votes
0answers
79 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 ...
5
votes
1answer
99 views

Nested LINQ Nightmare, calculating %completed

This code horrifies and scares me. I wrote this. ...
3
votes
1answer
49 views

Settings class for web app

I needed to write a settings class for my web app; ideally this class should read its settings from a file (and be able to save them back to the file), and have only 1 instance per application - all ...
4
votes
1answer
107 views

Writing an MVC project for the first time - how close am I?

I've recently started programming (learning Ruby) and wrote a small game. Now I've started reading about MVC and am trying to refracture my code to follow that architecture. The only classes with big ...
9
votes
1answer
150 views

PHP-framework with MVC architecture and Active Record pattern for the DB management

I tried to create the PHP-framework, with no experience in the task like this: Folders: ...
7
votes
1answer
168 views

Fluent Nhibernate, is the mapping correct?

I'm very new to NHibernate and DB. I have three tables which are connected with many to many relationship. Here are the tables creation Script: ...
8
votes
2answers
489 views

MVC controller code

Please review my servlet. ...
7
votes
1answer
153 views

MV* Pattern for a board game

I have made a small game in Javascript, while simultaneously learn about the ever so popular model view controller. The game is this, there are 3 players(green, purple, yellow) and they have to try ...
0
votes
1answer
75 views

How to write this code more efficient and simplify creation of dependency objects?

How can I write my code more efficient (not repeating same code)? And is there a solution that simplifies the way of having to create a lot of dependency objects over and over again whenever I ...
2
votes
1answer
58 views

Member restricted game with API

My website is poorly coded. The structure is pretty simple: A RewriteRule redirects /.... to /index.php?page=$1 mypages/page.php contains the page content and actions (model controller and view ...
1
vote
1answer
98 views

How to re-factor dynamic menu code to OOP in a MVC framework?

I have a MVC framework, and I am struggling with the following dynamic menu code. A menu is pretty much HTML, so technically it should reside in the View, but the dynamic part is driven by PHP and a ...
2
votes
1answer
37 views

.ASP controller code

I've tried to create application with MVC N-layer pattern. I asked my buddy for a shot review, and he said, "You should separate logic from controller". But my controller only work as a ...
3
votes
1answer
99 views

MVC architecture in PHP

I have developed a few web applications according to my own coding style similar to MVC architecture. I'm a self learner. But there is no controller class or model class. In my way, I don't split the ...