Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
7 votes
2 answers
969 views

OOP PHP form builder with validation

Yes, another PHP form builder... I wrote this solely to demonstrate OOP principles. My questions are: Could this be written better? OOP-wise. How could I better implement error handling? Index.php <...
PRobert's user avatar
  • 73
11 votes
3 answers
2k views

IP address detection code

I am using PHP for detecting a user's IP address and displaying their details, and I use OOP (i.e. object-oriented programming). Are there any problems in it or is it well-written? index.php: ...
Pscho's user avatar
  • 29
0 votes
1 answer
98 views

Best method to further execute the DRY principle and/or raise performance in my script? (client login/signup system)

Just for practice purposes, I written a basic client sided login/signup system that allows you to make an account, and then log into the account from my webpage. What it does is append to an object ...
DanielP533's user avatar
2 votes
1 answer
62 views

Building a JavaScript GroupPicker class that is tightly coupled with HTML structure. Is this an anti-pattern?

I'm building a GroupPicker class that essentially manages an interface that allows the user to move items between two columns "assigned" vs "unassigned". The items ...
Clint Winter's user avatar
3 votes
0 answers
207 views

Dynamic Bootstrap 4 modal using JavaScript OOP

I have created dynamic Bootstrap 4 modal using JavaScript OOP. Please verify and give your reviews how I can improve the code. I have passed four parameters to create a dynamic modal: ...
user11657014's user avatar
2 votes
1 answer
138 views

Tile and grid abstraction

This question is a small subset of the problem I am trying to solve. I am trying to learn to break problems into better abstractions. The original problem I am trying to solve is: Write a JS ...
CodeYogi's user avatar
  • 5,205
0 votes
1 answer
217 views

Object for generating HTML for hyperlinks

I have a function that generates HTML for hyperlinks. It's arguments may be string literals or variables read from the database. An example call to this function looks like: ...
NewSites's user avatar
  • 125
2 votes
1 answer
81 views

Command-line search for web-scraped TV Guide listings

This is a project that I am looking to clean up. The code is fully functioning and it has already been turned in, so I figured I can let Code Review help me. The git repository can be found here: ...
TylerP3358's user avatar
1 vote
2 answers
313 views

Weather application data structures and design

Relevant files are script.ts, WeatherData.ts, index.html. I made a simple weather 5-day forecast application using mainly TypeScript. I was wondering how I can improve my code since I originally ...
Jonathan Wang's user avatar
2 votes
2 answers
218 views

List component using plain JS

beginner web dev here. I created a custom list component (with edit feature) in plain JS/HTML. I have few questions on which I would like to get an answer (besides the normal feedback that you folks ...
user avatar
2 votes
2 answers
893 views

CRUD operations for a patient database

My code performs CRUD operations in PHP using OOP and dynamic queries. How can I completely separate HTML tables from this code? Db.php ...
Abdullah Faraz's user avatar
2 votes
0 answers
106 views

HTML canvas element Encapsulation

I am preparing to write a widget for the browser that is both visual and interactive. I am a newbie to Javascript/Ecmascript and prototyping. I want to encapsulate the canvas element, abstract the ...
sfanjoy's user avatar
  • 223
-2 votes
1 answer
75 views

Is it ok to change implementation of parent function with child data? [closed]

I was wondering is it OK to change implementation of parent class with child class data. I have situation of creating a child class (form) which extends the parent class (other form with same elements)...
Programmer Apprentice's user avatar
1 vote
1 answer
122 views

Moving To Object Orientated Programming

Please keep in mind I am new and still learning when reading the following. What I am doing I have the following code which pulls a sport, tournament and round NR, from a DB table called ...
Tim C's user avatar
  • 167
3 votes
2 answers
274 views

Form validation library

Background: After reading this thought provoking book I decided to write a small library as an exercise. ...
CodeYogi's user avatar
  • 5,205

15 30 50 per page