Exercise List: Initial Thoughts Before We Code

Posted October 17, 2007 at 2:00 PM

Tags: ColdFusion, Exercise List

Before I start coding the Exercise List project, I need to get a clear idea what needs to be done. As I have stated before, the project is a hands-on learning experience to familiarize me with Object Oriented Programming in ColdFusion. But, at a more general level, it is an application that will maintain a list of fitness exercises. To help learn the basic principles of Object Oriented Programming, I am keeping this application purposefully simple; there will always be time to complicate it later.

The basic interfaces required for this application are:

  • Add / Edit Exercise
  • View Exercise
  • Search / List Exercise

The only data we will be keeping track of is the list of exercises. There will be no login or users. Here is what I am thinking for the exercise data:

  • Name
  • Description
  • Contraindications
  • Joint Actions
  • Alternate Names (also known as...)
  • Date Created
  • Date Updated

Exercise data could be kept in one table, but that wouldn't help me with OOP (object oriented programming) as much as it could. As such, I am breaking down each exercise as it relates to joints and the actions that need to be done on them. Each exercise can act on one or more joints (ex. Bicep curl acts on the elbow by flexing it). As part of this "joint relationship", the action can be:

  • Flexion, Extension, Rotation, Adduction, Abduction, Plantarflexion, Dorsiflexion (if applicable)
  • Performed in a particular plane of movement: frontal, sagittal, transverse (if applicable)

Not all joints can move in a particular plane or have all joint actions applied to them. There will be a relationship in the database that joins Joints to Joint Actions so that the wrong actions don't get associated with the wrong joints (same for planes of movement). The action performed is also related to the plane of movement (hip rotation in the transverse plane vs. hip extensions in the sagittal plane), but I am NOT going to build in the logic to maintain these constraints; I don't want things to get too complicated right off the bat.

So that's the data that needs to be captured and an overview of the way the data interrelates. As a reminder, I am going to be first building this application (hopefully fast) in my standard procedural style code just to get it done. Then, I am going to go back and do a data model analysis and move to an object oriented approach and hopefully, awesome learning will ensue.

Post Comment  |  Ask Ben  |  Permalink  |  Other Searches  |  Print Page




Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

Oct 18, 2007 at 5:11 AM // reply »
54 Comments

Dont forget to pack yourself a <cf_athsma_inhaler /> custom tag, just in case :-D

Rob


Oct 18, 2007 at 2:21 PM // reply »
1 Comments

You have to normolize your Data Base structure first of all.


Oct 18, 2007 at 2:39 PM // reply »
6,516 Comments

I am gonna make mockups of the interface first before I even worry about the database structure ala the likes of Clark Valberg and Hal Helms; I am going to be following an interface driven design where the prototype dictates the data model that will be required (and discovered).

The mockups will be posted shortly. I am not going to create a full fledged prototype since I think this is so few pages that the designs will suffice.


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 21, 2009 at 1:13 PM
My First ColdFusion Builder Extension - Encrypting And Decrypting CFM / CFC Files
@Ben, Because I am pedantic, I just want to make sure that everyone knows there is absolutely no encryption going on. There is only encoding and obfuscation. The cfencode tool only obfuscates your C ... read »
Nov 21, 2009 at 12:28 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jody I can't seem to get your code sample to work. If you are still having problems, try this code out and see if it gets you what you wanted. <!--- Comma delimited list with various duplicates ... read »
Nov 21, 2009 at 11:03 AM
Groovy Operator Overloading Does Not Work In The ColdFusion Context
Hi Ben, Thanks for this informative post. Now I am reading ur old posts too ... read »
Nov 21, 2009 at 10:56 AM
HostMySite.com Has The Best ColdFusion Hosting
@Mehul, Yes very nice people, however several downtimes per day which was not acceptable. Hence we had to move out. I am glad you are having good luck with them so far. ... read »
Nov 20, 2009 at 11:32 PM
Five Months Without Hungarian Notation And I'm Loving It
I've used headless camel case for years for not only ColdFusion variables, but also SQL tables and fields... pretty much everything involving code. I also subscribe to the "don't abbreviate and clea ... read »
Nov 20, 2009 at 11:00 PM
Five Months Without Hungarian Notation And I'm Loving It
@Marcel, Yeah, I always err on the side of longer but more readable variable names. As for the camel casing of CF methods and the headless camel casing of custom items, I get around this by always ... read »
Nov 20, 2009 at 10:56 PM
Five Months Without Hungarian Notation And I'm Loving It
I use the following and love it: my.namespace.MyComponents.functionMethodsOrUDF() CONSTANT_VALUES_OR_PROPERTIES One thing I always try is to CamelCaseBuiltInColdFusionFunctions() so others can tell ... read »