Questions tagged [mvc]

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.

Filter by
Sorted by
Tagged with
1
vote
0answers
17 views

Web application with user privileges and role feature

I'm building a web application with CodeIgniter which manage the following roles: Super Administrator Administrator Operator Customer Each role have a default list of privileges, eg: ...
5
votes
1answer
70 views

Java program to encrypt/decrypt text

I am working on adding a GUI to the project that I was making in some course. I am curious if the layout looks good, if there variables and methods are shared properly between particular classes, if ...
4
votes
1answer
239 views

Codeigniter 3 micro-blogging application

I am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. The application allows Registration (as an author), Login, adding Categories and Posts. I have created an installation ...
4
votes
1answer
217 views

PHP MVC render view method

I am working on creating a simple MVC inspired framework (for learning purposes and because i don't want to use a pre-existing framework at the moment). I have the system already set up and its ...
4
votes
2answers
44 views

Simple wiki with PHP, part two

Following up from part one, I've attempted to convert the largest part of my project into an MVC pattern as per suggestions from the accepted answer. I've managed to split the original ...
0
votes
1answer
72 views

Simple wiki with PHP

I'm attempting to create a basic wiki for personal use. I've got a pretty good start, but the code is beginning to become cumbersome to modify, and some of the things I'm doing feel very fragile. I've ...
0
votes
0answers
19 views

Asking data to a Servlet from jsp and send them back to the jsp

Image that a user have to book a private lesson by compiling this form. Using MVC pattern I'm building a WebApplication to achieve this goal; I have a jsp wich contains the form and by using Ajax I ...
1
vote
0answers
60 views

Rails dynamically changing parts of view but using the same method in controller

I have this update method which decides whether to update or recreate(same as update but resets the approval_status and create_date) of the building_approval object. I have the on_progress? method on ...
2
votes
2answers
146 views

MVC Java console tic-tac-toe

...
4
votes
0answers
60 views

MVC Controller Error & Exception Handling .NET Core

I'm putting together a basic web app in .NET core 2.1 MVC to try and better understand how it works. Currently I'm working on returning validation to the UI. Once I have this working I then want to ...
0
votes
0answers
39 views

ROR - Point of Sale (POS)

I've the following scenario: the user clicks the "Sales" button which redirects to the creation view of the Shopping Cart. Then, the user enters the EAN code and the Quantity, presses "Add" and the ...
1
vote
0answers
52 views

Applying Observer-Observable pattern to a code and multithreading

I have to: 1) Apply the Observer-Observable pattern to the original code. 2) starting from the original code, I have to suppose that the modification of the array fields (slot machine numbers) ...
0
votes
1answer
189 views

PHP OOP MVC Project Structure

I'm a beginner in OOP and PHP frameworks. I used slim skeleton to create a project and designed the project in this way. Project structure is given by the slim skeleton. Object Mappers are added by ...
1
vote
1answer
109 views

Simple MVC built in PHP

I tried to make a MVC in PHP with OOP approach. Code Review this so I can understand whether am I using the best practices and can I legally call it a MVC framework or not. Also, I am going with 1 ...
1
vote
0answers
70 views

Symfony controller to register and activate users

I've been in an interview some time ago. They objected my Symfony API code with following line: Too much code in controller actions. Can be moved to services to keep the business logic apart ...
1
vote
2answers
137 views

Simple router in PHP

Before I start writing my first MVC framework, I want to improve my code quality as much as I can, can anyone give me some constructive criticism on how I can improve this? It is a simple router, ...
1
vote
1answer
42 views

Laravel function to add a supplier, and associated addresses and contacts

I have a function addSupplier() that adds a supplier. Each supplier has multiple addresses and each address has multiple contacts. ...
1
vote
1answer
43 views

Showing data for a chat with another user

I have a get route to show the data for a chat with another user. If an existing chat exists I want to return that, otherwise create a new chat and return it. ...
4
votes
2answers
600 views

Simple Python calculator applying MVC

I've been implementing a simple Python calculator for learning purposes. Since there are no properties or bindings like in Javafx, I implemented my own MVC pattern. I'm aware of missing logic like ...
3
votes
1answer
128 views

ToDoApp - adding users, managing tasks, getting tasks

I've implemented a console ToDo application. I would like to hear some opinions about it, what should I change etc. About project: It is intended to manage everyday tasks. Application contains: ...
2
votes
0answers
184 views

Python (Sanic) Routing

I wanted to explore how I can associate routes with "controllers" with Sanic as a base. It works fine but "feels" a bit clunky but I can't put my finger on why/how. routes.py - Returning controller ...
1
vote
0answers
54 views

Small website with MVC

I'm struggling if this is the correct way to implement an MVC-like pattern for small websites. I have separate controllers and models, my main concern is the view part, did I understand it correctly? ...
5
votes
0answers
265 views

Battleship MVC Architecture

The entry point is the Macros module, which - for now - includes only a single procedure, at a very high abstraction level - I'm quite happy with this: ...
3
votes
1answer
164 views

Text editor using MVC pattern

I am beginner in programming and recently I wrote an editor, inspired by the Notepad program, with all basic features any editor should have, like finding, undoing, copying, etc. The problem is I do ...
1
vote
1answer
223 views

Custom MVC framework

So, I've been working on a very simple MVC framework and I wanted some feedback on how it works. I've worked it slightly differently where the controllers don't need to extend the base ...
1
vote
2answers
154 views

Simple Java MVC (swing)

I'm a Java beginner currently practising MVC pattern and came up with this. Could you please check if this is a proper implementation of MVC and if there are any best practices that I have broken? <...
1
vote
2answers
377 views

Creating an MVC router

I created an MVC router based on knowledge of an MVC design pattern. It will simply take a URL as a string (class/method/params...), then it will instantiate a requested class controller and call its ...
5
votes
1answer
575 views

Convert IEnumerable<Reads> to CSV

I have an IEnumerable of a view model that I need to convert to CSV and send back as a file response. I have written it out quite manually and I'm just seeking code ...
4
votes
2answers
900 views

Java Snake game using MVC with difficulty settings, persistent stats, and sounds

I completed two intro computer science courses on the basics of Java programming and data structures in university, and have continued to study programming on my own over the past few months. This is ...
3
votes
0answers
207 views

Conway's Game Of Life using SFML and MVC

This is a follow-up to my previous question. I followed the given advice and implemented the MVC design pattern. As I've never used MVC before I am quite unsure about the quality or if it is even ...
4
votes
1answer
151 views

Upload and database insert php function

I love to post here on codereview my code to have a feedback from developers that have more experience than me, to improve my coding skills. During these days I'm working on a webapp for a small ...
0
votes
2answers
416 views

Ruby on Rails application controller

My application controller keeps growing with small helper methods that I use in both my controller and views, is it okay? or what do you recommend doing? ...
1
vote
1answer
55 views

store and warehouse management class

I've already posted this PHP class few days ago when I started writing it. Now that all the methods and all the controller logics are ready, I will be ask here for some suggestions about how to ...
6
votes
1answer
326 views

Winform, with a workaround to avoid dependencies

I'm working on a Winform project. We currently have a modular design (shown in the image) in our project. Where on every user action (button clicked or selection changed etc), first we set the Model ...
10
votes
3answers
1k views

Simple dice game - JavaScript MVC implementation

I did a simple dice game using what I learned about separating the 'view', 'model', and 'control'. I am quite clear on what the model is (it's the data and state). But I'm a bit confused on the ...
4
votes
1answer
171 views

Laravel UserController Design

...
2
votes
0answers
109 views

How to optimize code to only pull separate table rows that are necessary

I have a Company Class, and separate normalized Address Class. I did this because the Address table will hold more than just Company Addresses, so I don't want "CompanyAddress", "EmployeeAddress", "...
3
votes
1answer
1k views

Simple PHP Router for home grown MVC framework

I don't know if you guys get tired of seeing a bunch of requests for review of similar projects, but I was really looking for advice. My website is designed on the MVC pattern. I have a very simple ...
2
votes
0answers
51 views

Implementation of MVC pattern for single and multiple objects

I've implemented a student administration with MVC pattern (Tutorial: Link). I've decided to divid the students in "SingleStudentModel" and "MultipleStudentModel", but I'm not sure if that make sense ...
1
vote
0answers
44 views

MVC implementation for displaying movies on main page and by category in PHP

In order to improve my PHP skills I decided to implement my own MVC in PHP. So far it can display movies on the main page and show movies by categories. Obviously I use rewrite mode in ...
3
votes
2answers
109 views

Image Database Service

I created simply database service with get, insert, get all image names and verify exist method. All images will be store in blob storage with unique filename + postfix size. Next one I have image ...
5
votes
0answers
260 views

ATB strategy MVC architecture refactoring

NOTE: this question isn't as long as it appears to be. I added the comments to the code only to answer some possible questions that may appear. I'm making an active time battle strategy. Its ...
4
votes
2answers
312 views

Java TicTacToe MVC with Singleplayer mode

To practice the MVC pattern and Unittesting in Java I decided to make a simple TicTacToe Console Application. The features of this App are: Multiplayer-Mode Singleplayer-Mode (that should always ...
2
votes
1answer
85 views

Wiring classes together in PHP

I've created a base structure for my project and found a way to wire classes together, I create an array of previously loaded classes and call them from the cache. I then have a static class that ...
3
votes
2answers
291 views

Web browser in Swing with MVC

Follow up question to: Utilizing OOP when creating a web browser After I received help on the question above, I've created 3 classes for my Browser. ...
1
vote
2answers
1k views

A Quiz game realized with MVC-Pattern (Java)

Project description The program can be tested here This project is an exercise designed to check if I understand the MVC pattern correctly and apply it correctly. A quiz is to be designed in which ...
0
votes
2answers
139 views

Decoupling UI code from game logic

IIUC I should decouple UI logic from the model and controller in my project. I didn't succeed and had to resort to TextView etc in my game logic: ...
1
vote
1answer
57 views

Clear data-model layer in Django MVC

I have a Django model User ...
1
vote
0answers
89 views

PDcurses wrapper module, with mvc or pimpl

I have been writing a library wrapper for pdcurses for a while and implemented each widget/class in it with the pimpl idiom, however I start to see that for large widgets it creates a god object and ...
1
vote
1answer
80 views

Controller with abstract methods for a delete method

I'm studying OOP and MVC structure, and all my controllers extends the main controller, and almost all of them has a delete method, basically this: ...