New Project: PHP-based workout tracker

Summer term kept me busy (Analysis of Algorithms in 8 weeks was intense!), so now it’s time to catch up on projects and posting here about my projects.

Project Description

In my Databases class this term (CS 340), my final project was a simple web-based workout tracker using the mysqli extension in php. In its current iteration, the workout tracker can track users’ goals, exercises, routines (composed of exercises), and workouts (instances of routines) through a simple login system. The front end is fairly simple, with css template recycled from another project, and just a touch of javascript to redirect, for example when logging out.

 

Reflections and Future Work

MySQL Improved

In a past php project (CapstoneDB), I had primarily used PDO for database interaction because of the availability of documentation. For this project, I used MySQLi. I found that I preferred the ease of using named parameters with PDO over MySQLi.

Passwords and Hashing

My biggest to-do for improving the project in the near future is adding hashing for passwords. Right now, the passwords are just plaintext, which is a big security no-no. This will be the first thing I change. The project, as a class project, had some major time constraints, but even for a rush project, it’s important to have good password hygiene.

PHP – DOM, interleaving, or return html string?

I’m still thinking about this one. Currently my strategy has been to use a combo of interleaving with echo and methods that return strings of html (ie, dynamically generating a table using results from a database query, forms with datalists or select options generated from a dynamic list of options, etc, etc). More recently, I’ve been wondering about the merits of using the DOM document for things like creating a table and adding it to a given div. I’d like to follow common practice with this, so I plan to go to StackOverflow or Quora and get more information about common or preferred ways to do this. Using the DOM would certainly model the way I’ve learned to interact with the document using javascript using createElement, appendChild, etc.

 

Check out a live version of this project here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s