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

2
votes
0answers
20 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 ...
0
votes
0answers
32 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 ...
3
votes
1answer
38 views

Is it an anti-pattern to let ViewModel fill itself from a domain object?

Let's say you have a Employees table mapped to a Employee class. Now you want to code a Edit page for general information. You need a ViewModel with all the properties you need to build the page, so ...
2
votes
0answers
28 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 ...
9
votes
3answers
462 views

Solving quadratic equation using quadratic formula

I've just started learning C# + MVC. Here's my attempt with MVC: ...
4
votes
1answer
41 views

Is my blog controller too “Fat”?

I would like some advice which relates to the "fat model skinny controller" concept in Rails. See my show action in the Micropost controller ...
4
votes
1answer
61 views

MVC'd login form

I've written this small MVC login application as an example for someone, would anyone let me know what they think of it? index ...
1
vote
1answer
47 views

Rover on a grid

I have ridden to much about MVC and SOLID, so I have a mess in my head. I have written a small MVC application and I need your experience and sober mind. index.php - Start point of my app ...
1
vote
1answer
38 views

Empty product model

I don't think I am using MVC concept in Ruby on Rails properly. Model accesses db, controller works on logic and view displays information/data. But in my below code, My Model code is empty. Can ...
1
vote
2answers
66 views

Helping a user manage a database

The following code will read a db, show the contents to the user and provide instruments to edit them. This has been tested and works well. model.php ...
2
votes
1answer
59 views

Controller to list users

I think I put too much code in my controller that was supposed to go in the model. This is a part of my controller, I'm not gonna paste everything since there is a lot of code. ...
0
votes
0answers
22 views

Proper JS MVC / Extending

I am looking for some critique / comments / help regarding what I have written so far. Is this proper JS (jQuery)? This is my first crack at a MVC and Extending style setup. There are some standard ...
-1
votes
1answer
114 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 ...
1
vote
1answer
59 views

Check if modelitem refers to currently logged in user with mvc identity

I'm using MVC in order to generate a couple of views within my webpage. For a way of logging in, I've decided to use Asp.net's Identity, which I am very happy with. However, I'm trying to find an ...
6
votes
2answers
190 views

Clear function for Stanford iOS 8 Calculator application

I am following the Stanford iOS 8 lectures and I believe I have successfully added the "Clear" functionality to the application, but I don't know if I am doing it properly. Controller ...
3
votes
1answer
105 views

Retrieving values from UITableViewCell

I have a UITableview with custom cells, every cell has a button called cellButton. When the user taps the button I present an ...
2
votes
2answers
91 views

MVC controller / PHP request dispatcher

After getting the requested controller from the URI request, it checks whether this exists and whether the requested method (default index) exists within that controller, then calls them. My ...
2
votes
0answers
34 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? ...
10
votes
1answer
101 views

Hangman game using Java 8

I’ve been getting used to Java and I’ve written a simple hangman game using event-driven programming in Java 8. Please let me know of any improvements regarding the readability and design of the ...
3
votes
1answer
142 views

GUI flashcard program in Java

I'm new to Java and I've written a flashcard program in Java 8 that allows the user to create a collection of flashcards and then test themselves using those flashcards. Please provide any ...
1
vote
0answers
72 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. ...
2
votes
0answers
82 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 ...
6
votes
1answer
73 views

Simple Java MIDI player

I created a simple program that allows you to create and play MIDI sounds. I've used the MVC approach and I’d like to know if there are any improvements to be made regarding the design and structure ...
2
votes
1answer
466 views

Calling Stored Procedure “insert query” using EF 6, UOW, and MVC 5

I'm a beginner in MVC programming, repository, and UOW using Entity framework. I tried to calling my existing SP in my MVC project using UOW and EF. Here is my code to mapping my SP in myDbContext ...
3
votes
0answers
136 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 ...
0
votes
1answer
146 views

Implementation of MVC Bootstrap & Factory

Before I get started, I feel I need to list the following. I am not looking for an existing DI or Framework this is a personal project to shift from procedural to oop programming. Tear this apart. ...
2
votes
0answers
71 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 ...
5
votes
1answer
72 views

Static registry

I am working on a base framework for my various PHP related projects. I have grown since beginning all of this, but the one area I am still having difficulty/concerns with involves the dependencies of ...
1
vote
0answers
60 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: ...
0
votes
3answers
72 views

Mixing business logic and presentation layer in enum type

Let's assume I have an enum type with currency: ...
2
votes
0answers
43 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 ...
3
votes
1answer
148 views

Portfolio landing page

I'm trying to grasp this whole MVC design pattern idea but I'm in the dark if I'm doing it correct. This is where I need some feedback on what I've done so far. Here's what I'm wondering: Does the ...
1
vote
1answer
237 views

Dependency Injection With Unity in MVC 5 without repository and unit of work

I want to use dependency injection with Unity in my application. I am not following repository pattern and unit-of-work (and don't want to). I also have ViewModel in my controller action method. ...
15
votes
1answer
274 views

Order a delicious pie here

For a quick summary: I've created this internal web application, and I've hit a point where I can really see the mess I've made. I need some help separating the logic, the view, and the data. More ...
8
votes
1answer
98 views

Refactoring my Todo List was on my Todo List. How's my MVC?

This is a follow up to Rolling my own Configuration with UI. I got a lot of great advice about the Configuration system I created, but no one touched on how all of my logic for the UI was in the code ...
4
votes
1answer
268 views

2D board game: good Model part?

First time writing a big project in OOP. I am quite used to scientific programming but not to OOP, and even less to building GUIs. I am writing a 2D board game: the player can move on a map from tile ...
5
votes
1answer
189 views

Data model in MVC for multiple providers

I have constructed an API service that dives into a storage engine and retrieve data. I have tried my best to apply the MVC modelling with services (repository) in mind where the controller (as it ...
1
vote
0answers
40 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 ...
2
votes
0answers
223 views

MVC Login for Android

The code for my Android application is below and so far I'm happy with it. Before anyone comments, I do acknowledge it requires the addition of further validation. The android application is a login ...
2
votes
0answers
46 views

Binding model to view

What I need - if there are some changes to model in must be rendered in view (HTML). The main problem here is to catch changes in model. Firstly I tried to use watch. However it can't work with IE8 ...
5
votes
3answers
149 views

Code redundancy issue while feeding dropdownlists

I have a dashboard to manage a learning center system. There are scenarios like admin create learning center and define a classroom in it and then assign some courses in it and assign students to ...
4
votes
2answers
80 views

Using a registry with static container

I am currently working on a class to make objects and vars available to child classes while attempting to avoid a singleton. Each child with dependencies extend this class and pass params (var names) ...
1
vote
1answer
111 views

Account view with MVC and paging

My Model ...
5
votes
1answer
309 views

Tic Tac Toe in MVC

Do I have basics of MVC and SOLID principles right in this simple 'Tic Tac Toe' game? View.java ...
4
votes
3answers
126 views

Make huge view in C# readable and maintanable

I have an application that is using MVC5 with C# and Razor Engine. This view displays a huge table: ...
5
votes
2answers
1k views

Unit of work Repository pattern DBcontext EF-Entities and ninject

I am totally confused while implementing Repository pattern with unit of work and Entity framework because I have seen tons of examples. Please suggest whether I am on the right track or not. ...
1
vote
0answers
84 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 ...
2
votes
0answers
123 views

Usage of MVVM in iOS [closed]

I'm an iOS developer and I'm guilty of having Massive View Controllers in my projects so I've been searching for a better way to structure my projects and came across the MVVM (Model-View-ViewModel) ...
0
votes
0answers
77 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: ...
1
vote
1answer
90 views

Implementation of a URL router

I was wondering if you could provide some feedback on this Router class I built. Worth noting that it relies on an Apache rewrite rule that always redirects to this file, but passes the path into ...