Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
57 views

Simple Factory Pattern Demo

I am trying to create a simple factory pattern demo in PHP. I am not sure if my codes are the best practice. It seems that I have some duplicated codes but I am not sure how to improve it. Basically, ...
0
votes
0answers
80 views

OOP. Interfaces and Inheritance

I'm attempting to implement driver-layer from top-level app to hardware. Driver is shared library. Framework: Qt. QDriverInterface class is In the first, I extracted interface functions, which ...
2
votes
2answers
70 views

Two similar API calls PHP optimisation and structure

I have the following script that I'm part way through and I'm not happy with it at all, it feels messy: <?php class Process { public $search = ...
2
votes
3answers
71 views

PHP spl_autoload_{x} class, reviews welcome

Having spent years writing procedural PHP (albeit with a moderate understanding of OOP from Java) I took the plunge and have attempted to write an autload class for my PHP applications. I do have a ...
1
vote
1answer
55 views

JPEG metadata processor

I am looking to make the below code a bit more efficient / OOP based. As can be seen by the X, Y & Z variables, there is a bit of duplication here. Any suggestions on how to make this code more ...
2
votes
1answer
133 views

Knight's Travails solution

I created this as part of an interview process of graduate programming job. Submitted the code to them, and I was called for an interview. This is the assignment brief: ...
1
vote
1answer
61 views

PDO MySQL class

I'm new to using PDO and am trying to create a secure class to handle MySQL statements. Here is what I have so far: class SQL { private static $dbh = null; private function __construct($host, $user, ...
1
vote
1answer
51 views

Trying to use “this” to refer to a class's instance variable inside a function within the class's method in JavaScript

Hope that title makes sense. This is part of an object I have: The event listener attaches to the correct marker passed in the parameter but inside the function, this points to something else. ...
1
vote
1answer
101 views

Do the objects in this code follow OO standards?

I previously posted my first attempt at writing a program that I was given to test my skills for a position that I was interviewing for. I have rewritten the program using the excellent advice that I ...
1
vote
1answer
62 views

Please Review the following code

public class Bank { public int Id { get; set; } public static IDictionary<int,Customer> Customers { get; set; } static Bank() { Customers = new Dictionary<int, ...
2
votes
2answers
204 views

PHP Router MVC OOP

I just finished rewriting my Router class. Any input would be much appreciated. The class routes URLs based on a site.com/class/method/param/param/etc syntax. One thing I've done differently is ...
1
vote
2answers
76 views

PHP Form generator class

I have made the following classes and objects. It was made to create forms programattically easily. It should produce highly readable, valid, and clean HTML. Care to give me some feedback? :) ...
2
votes
1answer
117 views

Design+code review of an implementation of Dijkstra's shortest path algo

this is my code that implements dijkstra's single source shortest path algorithm (as submission to a coding forum hence tag:homework) which is called multiple times to recalculate after graph changes. ...
1
vote
1answer
71 views

Could this PHP Class be any more OOP-ified

I have this Facebook class and I'm wondering if the OOP nature of it could be improved at all? (GitHub project here - https://github.com/benhowdle89/facebookInfo): <?php class Facebook { ...
1
vote
2answers
106 views

Is this good class design (OOP PHP)?

Explained what I'm doing in the comments: class User { public $id; public $email; public $username; public $password; public $rep; public function __constructor($id, $email, ...

1 2 3 4 5 7
15 30 50 per page