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.
5
votes
1answer
39 views
Filtering ASP.NET membership roles without the default attributes
I am building an application, and I needed an attribute similar to AuthorizeAttribute, supporting Roles but not using the ...
2
votes
0answers
26 views
MVC-fying number inputs, barely
Spoilers!!
(duh..)
This code manipulates two HTML number input controls and multiplies them.
I am trying my luck on implementing MVC in JavaScript by example. This is a very minimal and useless ...
1
vote
1answer
48 views
Data Access Layer (object oriented)
I am using a global class (like a global model) that acts like a sql abstraction layer for my application. I am using it without problems now, but since the application I am creating is getting bigger,...
0
votes
0answers
100 views
My included in every script file - follow-up -1
In this particular question, I need the reviewers help to judge my understanding to MVC and OOP as it was my biggest problem in my original question a month ago. I included in the question the contact ...
0
votes
0answers
26 views
Weather-App for terminal done with node.js, OpenWeatherMap and ES6 promises
I've started to learn node.js a few weeks ago.
This weekend I've made a tiny app for to recap what I've learned so far.
It uses OpenWeatherMap as a data-source.
The user calls the main file (...
-2
votes
1answer
53 views
How to optimize the below code in order to reduce the space and time to execute? [closed]
Am using the datasource which is from the MVC controller method "GetRepairIssues" in the client side to bind the options to the dropdownlist. The result comes as expected. I have to do it even better ...
4
votes
2answers
70 views
7
votes
1answer
214 views
C# Rental Program
I knew a little Java, and thought what the hell, I'll help my school and design this program that'll help checkout phone chargers and calculators and things to students. So I got in way over my head, ...
2
votes
0answers
85 views
Securing Web API using token authentication and allowing external application to post or get data
Implementing OAuthAuthentication with OWIN and Identity to secure Web API and let external application like Chrome Extension to access our self hosted API for getting and posting data through our ...
1
vote
0answers
48 views
Instantiate repository classes dynamically
I'm curious about the best way to instantiate my repositories. Currently they're in the main controllers constructor method.
I was thinking making separate controllers for inbounds, outbounds, ...
4
votes
1answer
117 views
PHP, MySQL quiz application
I'm working on a quiz application for training purposes and I think I'm done with most of it.
However, I'm not comfortable with what I've done: it seems to be complicated and unprofessional and I ...
3
votes
0answers
70 views
Vanilla JavaScript ToDo List implementation
Just started learning JavaScript and I have created a basic TODO list following MVC concepts to apply what I have learnt so far. This is probably overkill for a simple todo app, but the objective is ...
1
vote
1answer
34 views
A localization helper in codeigniter
I created a project to better understand CI3, while developing it I tried to introduce localization elements.
When I tried to localize the view everything messed up. I made a helper to identify if the ...
0
votes
0answers
50 views
Handling routing with jQuery + Laravel
Basically, it's a matter of code organization, trying to delegate as most responsibility as possible to the server and keeping JavaScript use to a minimum, mostly as "glue" code between the view and ...
1
vote
0answers
83 views
MVC architecture for a Slim application
(https://github.com/trvshrmn/slim)
This is more of an entire project review... if this is 'off topic' I apologize. I attempted to make Slim into an mvc structure. I added a few controllers, views and ...
1
vote
1answer
34 views
-1
votes
0answers
76 views
Showing data on days range: 15, 30, etc
I have to show a dashboard based on days range like -30, -15, 0, 15, 30. I have taken this approach: Produces results withing 1.56sec. I want to know a better approach to implement the same thing with ...
1
vote
0answers
31 views
Formatting data in a UIViewController in a weight-training app
I'm writing a weight training app that calculates a one rep maximum and it has several options including recording your lifts in pounds or kilograms. I'm trying my best to follow the MVC pattern but I'...
0
votes
1answer
50 views
Model-View-Controller-Service shared flat expenses interface
I'm new to php and OOP, and for learning I started writing an application that would help me and my flatmates to manage our expenses and debts to one another.
The full source is available at https://...
2
votes
0answers
82 views
Implementation of a like button in iOS for Instagram like app in Swift
I have just completed an implementation a like button for an Instagram-like app, but now that I am looking at it I feel that there is something off. Maybe it is my formatting or maybe I am not quite ...
1
vote
2answers
100 views
Yet another PHP MVC form validation
I'm working on my own "MVC" framework for learning purposes and for personal use. I use the "MVC" expression as a concept not a concrete design pattern. So I refer to MVC as a "separation concept" not ...
1
vote
1answer
81 views
Custom CMS in PHP
I had previously written a very simple CMS in PHP, but it wasn't very good looking so I decided to rewrite and improve it using the PHP standards.
Have I done this well, and what areas can be ...
1
vote
1answer
156 views
Volunteer Signup Page
In a previous code review, it was strongly suggested that I start using PHP Frameworks to improve security for my websites. I tried Laravel and got stuck due to the steep learning curve. Then I tried ...
1
vote
0answers
33 views
Working with legacy code, is this kind of “controller” okay? [closed]
I'm used to the MVC structure of web apps, but while working with legacy code, I wasn't able to implement it exactly as it should be done. Mainly I can't pull in a router/controller components, and ...
2
votes
1answer
305 views
MVC design pattern approaches
I am actually more confused rather than understanding the concept. I have been developing a system and want to know the MVC design pattern. which one is best and the concept and usability of the ...
1
vote
0answers
42 views
CodeIgniter MVC Controller to validate and save a form
I feel although my controller is over complicated and more should be moved to the model.
I've read that the controller shouldn't contain any logic, and just call the model/view, however it currently ...
4
votes
0answers
67 views
5
votes
1answer
74 views
Displaying game progress in a JApplet
I gave myself a small project to work on and at first I wanted to use the MVC approach, but I got confused as to which part of my code should go into which class. I did some research and still don't ...
0
votes
1answer
113 views
Simple PHP CRUD application with Google Maps
I've got some experience with Laravel but for fun I started a small project (basically a CRUD with also Google Maps) without a framework because I considered that is oversized.
This is the directory ...
-1
votes
1answer
36 views
Rails - Events fully booked [closed]
I'm building an events app using Rails. I've installed a code block in my controller to ensure that over-booking doesn't occur once the total number of spaces for the event have been allocated/booked. ...
1
vote
2answers
102 views
Controller method to update properties of a request
I have a view that displays details of a work order request submitted by a user. As far as security and database querying is concerned, which one of the following options would be better if I'm going ...
6
votes
1answer
568 views
Using Identity to create user administration page
I'm developing an ASP.Net web application, using MVC 5. This application authenticates via LDAP and will assign an Identity Role of "Admin" to a designated user.
The Admin user will be able to go to ...
1
vote
0answers
71 views
Quiz MVC application
I am developing a Quiz module in which a user can create a quiz based on a large set of questions grouped on categories. But he can also repeat a certain quiz, or view it again read only.
The ...
4
votes
1answer
75 views
Reimplemented QAbstractTableModel::setData
I have subclassed Qt QAbstractTableModel with QJsonDocument as data source which I have reimplemented the ...
1
vote
1answer
91 views
Laravel controller to update appointment requests
My question/refactor is similar to what is found here:
Laravel controller for form validation skinny
However, I feel that the answer is for 5.0 and not 5.2. This question does not pertain only to one ...
1
vote
1answer
372 views
Dynamic Routing PHP MVC
I'm creating a simple MVC framework for a new version of my website I'm working on. Currently I have simple routing, such as /about-us etc ...
I've just implemented 'my version' of dynamic routing. I ...
1
vote
1answer
37 views
index.php implementation
I'm writing a MVC app, I've put effort into writing index.php since it must be the entrance point (like main for C and Java) imho.
I would like to ensure if someone who were to work on this file ...
1
vote
4answers
403 views
PHP MVC implementation without a framework
I've been using PHP for years and in every project I've ever done I've included the HTML, PHP, SQL etc ... in the same page. Upon looking through Github at large projects like WordPress and MediaWiki ...
0
votes
0answers
27 views
Decouple resource that only lists items owned by logged user
Both methods works just fine, but I would like people's opinion on whether I'm facing this the wrong way. JWTAuth returns an ...
7
votes
3answers
126 views
Revised - Game of Fifteen
This is a revised version of a previous post. I attempted to address each aspect of the feedback provided. The key changes are as follows:
Replace the deprecated ...
1
vote
0answers
26 views
Qt model and Qml pages/controls binding to that model
We're currently learning Qt Quick (with Qt 5.3 at the moment). QML and Qt are not very familiar to me. I'm looking for feedback on the code below.
It's not complete code. Ports.h and Ports.cpp are ...
1
vote
0answers
40 views
Correct Swift Model for JSON
I am working on a program that would generate swift classes/ structures for JSON file contents.
The link to the application is Json2Model in case you want to contribute directly.
I do not know a ...
0
votes
1answer
75 views
Initial stages of MVP, is the bootstrap file efficient coding
I am attempting to put my new OOP skills to the test and am eventually going to build a simple OOP login/registration system.
However as I am making use of OOP I have decided to make my own simple ...
1
vote
0answers
30 views
Developing a Feed Reader in the MVC Architecture are there better posabilities?
I'm redisigning my old Feed Reader APP with the MVC architecture, to understand the OOP better, currently there is just registration functionallity implemented, ...urrently workiing on the session ...
1
vote
1answer
81 views
Simple router for updating users
I need to know if I am going in the right direction with my code so far. I am really trying hard to transition from procedural, page-based programming into OOP MVC. So far I have written a simple ...
6
votes
1answer
173 views
Business logic to interact with Data access layer with exceptional handling
The code below is the BLL and the DAL logic for the form submission with multiple pages.
A form will have more than one page, will have a button on every page until it reaches the final submission.
...
0
votes
0answers
35 views
Model controller relation
I am creating a PHP app in MVC (no framework). I am having a difficult time understanding how the Model and the Controller communicate in an optimal manner.
User.php
...
3
votes
0answers
34 views
One user profile for company and person
I'm creating a web page which has two types of users with very similar permissions: Person and Company. The main difference is ...
1
vote
0answers
59 views
Mail service implementation using Razor engine a MailMessage
This is a very basic Mailer service that I put together after finding out that MVC Mailer doesn't play nice with MVC 5.
...
0
votes
1answer
42 views
Accessing Models Directly Through AJAX [closed]
I was thinking about how to handle AJAX requests in a MVC environment in PHP in a easy way.
What I've come up is (without showing you the backend code):
...