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
0 votes
1 answer
21 views

MVC Pattern - Need to include services file or not?

I am refactoring an old project, made in Nodejs with Express, applying the MVC pattern, today it is a fairly simple project: handling of the FCM and Remote Config tools from Firebase. Would it be ...
JRR's user avatar
  • 47
3 votes
1 answer
75 views

Simple Python MVC app for incrementing numbers using buttons

Intro: I am learning about the model view controller (MVC) architecture and I am looking for feedback from more experienced/knowledgeable people so I can check if my understanding is sound, and learn ...
dg0802's user avatar
  • 51
6 votes
4 answers
214 views

2-Player Chess in WinForms V.2 (With Separation of Concerns)

Introduction After getting initial feedback on my first working version of this Chess WinForms game here, I have used the suggestions and comments from there to come up with this new version, trying ...
Shinglington's user avatar
1 vote
0 answers
149 views

Restaurant Management follows MVC pattern

I am writing the Restaurant Management homework which must be following the MVC pattern. My Menu model has two parts: Drink menu and Food menu. With Food menu, it separates into three different types ...
David Moore's user avatar
2 votes
0 answers
380 views

Space invaders in java swing

I am not really proud of the final project design. Whenever I try following MVC I get lost and in the end a lot of code doesnt end up where it should be. I am also wondering if am I overusing private ...
Ivica's user avatar
  • 75
1 vote
1 answer
144 views

MVVM pattern in Swift

I've been coding for some time now and since I am working alone I'm not strict in my coding structure approach(bad idea) and was only focused on getting things done which resulted in MVC(MASSIVE-View-...
Joe 's user avatar
  • 13
4 votes
1 answer
221 views

Multithreaded MVC game engine

This is an attempt at a multithreaded model-view-controller based engine for 2d console games (board games, roguelikes that sort of thing.) The code below will provide a fully working example but is ...
Jaldhar's user avatar
  • 409
4 votes
2 answers
172 views

Java Sound GUI using MVC model

I have made a Java Swing application that detects and displays audio pitch and level from an input (e.g microphone). I would like feedback on the current structure of my project, I'm attempting to ...
Sean2148's user avatar
  • 143
1 vote
1 answer
308 views

Index.php automatic router for custom MVC

In house we have been building our own MVC framework. One of the things that was important in the project was to not have to add routes manually but instead have a standard and let the index ...
Joséph Flames's user avatar
2 votes
1 answer
153 views

JavaFX CRUD app for rescue animals

I'm fairly new to Java, and I've been working on the following program. It's a basic CRUD app utilizing JavaFX and MVC design pattern. I'm seeking advice because the class I took on Java only covered ...
user3605767's user avatar
2 votes
0 answers
206 views

Is MVC an overkill for a chess CLI game?

I am working on a CLI chess game that only involves 2 human players, I decided to make it follow the MVC architecture to ensure separation of concern and to make the possibility of a GUI/web ...
Yoh's user avatar
  • 61
1 vote
2 answers
299 views

Tic-Tac-Toe vanilla JS Pseudo OOP

I'm working on building a simple game in vanilla JS (tic-tac-toe). Some weeks ago I created a functional MVP and asked some questions about it (Vanilla JS Tic-Tac-Toe). The code worked, but it was a ...
nabla-f's user avatar
  • 163
2 votes
1 answer
261 views

PHP OOP: Configuring MySQL DB & query w/ Twig

I decided to up my PHP game and learn some OOP. I am re-building my website from procedural to OOP, but since I don't want to use a full framework I fiddle with some components. As a router I use ...
bender's user avatar
  • 21
1 vote
0 answers
40 views

Is my e-commerce app's code compliant with MVC?

Hi I have spent few days reading about various architectures and decided to use MVC (Model-View-Controller). But I had hard time applying all the theory to my node.js code. I've wrote some minimal ...
Faig's user avatar
  • 11
1 vote
2 answers
212 views

'Lean controller'/'Business logic on service' and filtering, sorting, pagination methods on controllers

I'm currently reading about "Lean controllers"/"Business logic on services" and trying to refactor some legacy code. However I am struggling to apply what is taught in the ...
Marco Aurelio's user avatar
1 vote
1 answer
118 views

Is My Controller too Coupling?

To put it in context, I had the assignment to do for a job interview in Node.JS, which basically making CRUD with products (and it have certain conditions). The assignment was well-understandable, and ...
Eloic08's user avatar
  • 19
5 votes
3 answers
754 views

Employee Model definition without an ORM

I am the author of this code. It's from an actual project, and it returns the desired result. However, I am very concerned that I'm not defining my Model correctly. The Model is instantiated in the ...
NamedArray's user avatar
1 vote
1 answer
193 views

Best practices in regards to pass and deserialize data, when calling an API endpoint from a MVC-project?

In my application, I only show users their own data. For that, I need to know in the backend, which user is requesting data. I use the username for that and therefore, I need to send the username as ...
thesystem's user avatar
  • 113
3 votes
0 answers
55 views

Right structure, three-layered architecture webdevelopment

My question is have i gotten the three-layered architecture right with error handling etc. I have a webpage containing different resources. The code works but I am not sure if have structured it ...
PreKaGit's user avatar
-1 votes
1 answer
1k views

Making a generic web API controller when using multiple tables with similar fields

I have been trying to refactor my code since I found I've been doing a lot of copying and pasting to implement the logic of the web API controllers. Here's how the controllers looked like before ...
Youssef Ashraf's user avatar
3 votes
0 answers
1k views

Pomodoro JavaFX (MVC Pattern) Countdown Timer

I made a simple JavaFX app. It is just a Pomodoro timer, it works as expected. The Pomodoro study pattern is a technique where you study for 25 minutes and take a 5-minute break and after 4 periods of ...
user238716's user avatar
2 votes
2 answers
184 views

Router and solid principle

I would like to know if my Routing system respects the solid principle ? The system is simple, Router class contains the routes and returns the correct route and Route class represents a route, ...
user avatar
1 vote
1 answer
353 views

An efficient way to order content in controller [Spring Boot]

My code works as intended. CategoryController class has getAllCategories method, which tells ContentOrderMap class to map differently ordered categories to their respective OrderType enum. The ...
Kleronomas's user avatar
1 vote
2 answers
363 views

Implementing Pagination with Twig in Codeigniter 3

I am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Bootstrap 4. I have decided to add themes to it. The application is not HMVC, only MVC. I thought it was a good idea ...
Razvan Zamfir's user avatar
3 votes
1 answer
73 views

Filtering database with Linq

I'm building an MVC web app with ASP.CORE 3.1 and EF connected to MSSQL. Today, finally after 3 days, I've somewhat reached a working code for filtering my view. I've got database of Date stamps (15 ...
Son Goku ssj4's user avatar
6 votes
1 answer
106 views

Making an alphabatical list grouped by letters

I have a pet project (open source on GitHub) that I built as a learning exercise. It is a lyrics web application built in .NET Core MVC. On the artists page of the site (view on mobile size viewport, ...
J86's user avatar
  • 424
1 vote
0 answers
74 views

Using HttpServletRequest#getPathInfo or getRequestURI for matching routes in a Router

I'm currently writing on a Router for a MVC framework that will be the core part of my application. The Router is implemented as a Servlet to be registered on any embedded servlet container. In the ...
Nightloewe's user avatar
7 votes
1 answer
1k views

Chess application with GUI and AI in Java

I've included the files that I felt were relevant (i.e I haven't included the individual pieces in the inheritance hierarchy). I'm particularly curious as to whether the system as a whole is ...
L292092's user avatar
  • 419
-1 votes
1 answer
103 views

PHP template MVC [closed]

For several days I have been learning about MVC, and I do some code but I don't know if that is correct. I will be grateful for some tips to get this code better. Here is my github respository https://...
MaksStonka's user avatar
3 votes
1 answer
210 views

Meme (title with picture) exchanger

Project structure without code: Packages: Classes in packages: In ConfigConstants I store path to folder, where I save pictures. Also in ...
Miron's user avatar
  • 418
1 vote
2 answers
171 views

PHP - How can I refactor this store function (which handles different database operation for user types) in order to reduce duplication?

I'm simply using Slim PHP MVC framework in my API project. PDO::FETCH_ASSOC is used in the database calls. So no data objects. The router handles requests and pass to the controller. controller calls ...
camille's user avatar
  • 147
1 vote
1 answer
166 views

Is this an good OOP Design in MVC PHP for getting User Details?

I was given a API project by my co-worker to work on half created a system in slim PHP. The project consists of the Models and controllers. When the route is called it calls the Controller with the ...
camille's user avatar
  • 147
5 votes
1 answer
2k views

PHP OOP MVC structure

I am quite new to the MVC concept. I already know how to program object-orientated from other languages like C++ or Java. I have implemented a little login system for test purpose. I am not sure if my ...
Chryfi's user avatar
  • 196
3 votes
2 answers
128 views

PHP Edit Volunteer Group Form

I have a PHP CodeIgniter website that collects volunteer registrations. One thing I have noticed is that the controllers are getting really big. The controllers have many methods, and each method is ...
RedDragonWebDesign's user avatar
1 vote
2 answers
229 views

Improving upon basic MVC in PHP

I've put together a simple CRUD application to keep track of my library of books in an effort to learn the model-view-controller pattern, as well as better myself at PHP. Everything I have works so ...
Robert Holman's user avatar
1 vote
0 answers
37 views

**Refactored** Library project

My Solution What I am looking for: DRY Code - in my handleDeleteBook and handleToggleStatus methods I felt that I couldn't find a way to share the id between the methods. Furthermore, what other ...
Anthony Gedeon's user avatar
1 vote
1 answer
636 views

feedback needed for my first python tkinter simple MVC, list element to print to label

Just starting to get the idea of MVC with tkinter. I wrote this simple program and I'm looking for feedback. There are no errors, but I don't know if I set it up right or not. ...
fishtang's user avatar
4 votes
1 answer
3k views

Checks if user is part of Active Directory group

I'm working in C# using PrincipalContext to do a check if user is part of security group for access to the site. Site is asp.net MVC and part of an internal network with security groups set up via ...
EarthBound's user avatar
3 votes
1 answer
969 views

java swing super simple calculator mvc

i am trying to learn mvc (model view controller). there are many texts out there explaining what mvc is. but not many explaining how to actually code mvc. i found a bunch of questions here asking ...
Lesmana's user avatar
  • 131
0 votes
3 answers
465 views

Filtering data from MYSQL database based on parameters passed with POST request

I am working on a PHP MVC project for my portfolio. Its an web app where you can store contacts (email and phone number). I am having trouble with filtering contacts based on filter form that has 3 ...
Smiley-dev's user avatar
7 votes
1 answer
585 views

Gem Puzzle game

I started learning JavaFX a few days ago and I have just created as an exercise a simple Gem Puzzle game. The puzzle pieces can be moved if we click on them. The visual aspect of the game is very ...
maggle's user avatar
  • 171
2 votes
1 answer
117 views

MVC pattern in my Repair Shop application

I am currently learning Java programing by building real life business application for repair shops. I am posting this code so I can get critical review, and change my application architecture if ...
Zoran Jankov's user avatar
6 votes
1 answer
120 views

Mvc design for FTP Client

This app will be a FTP desktop application meant to transfer files between a server and a client, pretty much like Filezilla, there is no server code to show as I will not implement Network features ...
kandabi's user avatar
  • 63
0 votes
1 answer
68 views

Improving PHP MVC code for personal website [closed]

Github for project: https://github.com/wrpd/portfolio I have a very general understanding of MVC but haven't ever implemented it. In an effort to improve my understanding and get back into a little ...
usulmuaddib's user avatar
7 votes
1 answer
1k views

Properly Structuring a Tkinter Application

I'm fairly new to object oriented programming and while I understand the basic concepts, I'm still having some trouble organizing my applications. I'm building a small Tkinter application as a ...
ShockDoctor's user avatar
5 votes
1 answer
243 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 ...
KarolC's user avatar
  • 51
4 votes
1 answer
343 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 ...
Razvan Zamfir's user avatar
3 votes
1 answer
3k 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 ...
K.D's user avatar
  • 133
4 votes
2 answers
73 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 ...
Robert Holman's user avatar
1 vote
1 answer
205 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 ...
Robert Holman's user avatar

1
2 3 4 5
11