5
votes
1answer
140 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 ...
4
votes
2answers
76 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: ...
2
votes
0answers
36 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 ...
3
votes
1answer
91 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 ...
0
votes
2answers
346 views

Simple sign up form

I have tried to build my first MVC sign up form. Here is the user controller method register: ...
0
votes
1answer
104 views

Is my first MVC architecture set up to standards?

I just started learning about the MVC architecture. And I started to create my own MVC framework to how I like it the most. Here I've got the index.php, indexcontroller.php and view.php. I'm not too ...
10
votes
1answer
164 views

Markup calculator application using MVC

I want to make sure that the code is correct in terms of its design, code correctness, best practices & Junit testing. The complete description is given below: Functioning of the app quickly ...
10
votes
3answers
257 views

Listener/Observer Model in PHP

I've taken a look at the SPL Listener/Observer model but found that it doesn't work when using static methods. So I wrote my own but it's very simply. Can anyone suggest ways to make it more like the ...
3
votes
1answer
165 views

Java MVC pattern

I recently posted a question about modeling a system that contains elements that can perform actions (here). The model runs in cycles and parts perform their action every cycle. The model should have ...
3
votes
1answer
49 views

Is it a classical MVC (Xerox Parc) implementation?

I've been trying to understand the original MVC implementation (the Xerox Parc's one). I'm sure it has flaws, but it's a simple code to practice/learn the original MVC. Working example View ...
3
votes
1answer
297 views

First attempt at MVC JavaScript pattern

I would really appreciate a review of my interpretation of MVC here. It's as bare bones and clear as possible. I've based it on some in-depth reading but I don't know if I have understood everything ...
1
vote
1answer
51 views

Is this a model? What is controlling it (controller?) and how does the data get to the view?

My goal is to instantiate a class based on the request and call a method on it based on the request verb. The classes I'm referring to will have methods such as ...
2
votes
1answer
2k views

Refactor Windows Form code to follow MVC

I started an open source Markdown editor using C#. I'm a huge fan of the MVC pattern, however I am having trouble refactoring my back-end form code. It's getting pretty long and I was wondering if ...
3
votes
1answer
746 views

TicTacToe - introduction to MVC pattern

After reading about MVC pattern in Head First Design Patterns, I've decided to write a TicTacToe app. I will not reveal the source code of the classes Matrix, ...
5
votes
1answer
238 views

First introduction to MVC

I'm not sure that I fully understand this pattern. I've written a simple application that uses MVC. Please criticize my approach to the use of this pattern. For convenience, I'll post the source code ...
2
votes
1answer
614 views

Builder pattern for Codeigniter ActiveRecord queries

I am using Codeigniter and it's ActiveRecord. I had this idea for a base class that provided a generic getter/setter for doing simple queries on a database. I have a lot of database objects that ...
3
votes
1answer
219 views

JQuery code repetition and MVC

A while ago I started working on a project, which does things mostly with JQuery and PHP. I had some problems with my structure and started using CodeIgniter which uses an MVC pattern. So the PHP part ...
1
vote
1answer
93 views

how do I encapsulate this List<Message> properly?

I know that Swing isn't true MVC: Using this modified MVC helps to more completely decouple the model from the view. Leaving aside the veracity of the above claim, the problem I run into is ...
1
vote
1answer
161 views

How can I refine this code so that it complies with MVC (specifically, separating view and model)

Background I am making an app that allows the user to type chemical equations (H2O + NaCl) to the screen. The user taps, inside a tableviewcell, a custom textfield and types on a custom keyboard ...
2
votes
0answers
76 views

Design for uploading a file and persisting it to a data store [closed]

Say we have a spreadsheet (.CSV) being uploaded with static columns | (int) item 1 | (string) item 2 | (int)item 3]| That ...
2
votes
0answers
118 views

Guidance on SoC and passing data between GUI instances (MVC pattern)

I'm fairly new to Python and currently building a small application to record loans of access cards to people in a company. I'm using wxPython for the GUI and SQLAlchemy for the CRUD. I'm loosely ...
2
votes
3answers
1k views

A simple php Session class, is the layout/design correct?

Basically I'm writing a simple framework in php in order to learn more. This session class is extremely rudimentary. At this point I'm not even checking ip/user_agent to prevent session hijacking, ...
5
votes
2answers
2k views

MVC Controller in Java Swing Apps - Singleton or public static

This article has left me a little confused. In explaining a method on how to design MVC into Java Swing apps the author defines the controller class as Singleton and relays a series of calls to the ...