looking for feedback/ideas on pump

Discussion in 'Web Design and Development' started by twoodcc, Aug 31, 2009.

  1. twoodcc macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #1
    http://tmac.podzone.net/pump/index.php

    hi. i'm looking for feedback and ideas this site that i made. right now, you can only track pushups and situps. in the future, i have plans to add a running log to it as well, and also maybe other exercises.

    please let me know what you think. i know the looks and layout of the site isn't that great. i was looking at functionality over beauty. the pics on there are just for filler right now.

    and if anyone wants to help me on the project, i'm open to that as well.

    thanks
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    I've actually been working on a jogging logger web app. I don't have it up to check out, but it has been a fun little project. Not sure when it'll be done though, I just work on it in my rare spare time.

    Your site looks like a nice start. Not much to look at without signing up though. Have you created a test or demo account that can be signed into for looking around?
     
  3. twoodcc thread starter macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #3
    thanks for the reply. yeah i just do this in my spare time as well (i have a few sites like this actually, but only this one is related to working out).

    i can setup a demo account for you if you'd like. do you plan on hosting yours yourself?

    EDIT: demo account: username = guest, password = guest1
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    At first yes. Currently it's being developed as a standalone install like WordPress (and will only have my account, but it does support multiple accounts), but I may design it so it could be run as a hosted web app (many accounts). Just playing it by ear for now.
     
  5. twoodcc thread starter macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #5
    well mine is hosted on my own computer, and as i said before, i have several other sites as well that is mainly just me and other family members that use them.

    if you are interested, we could kinda implement the two sites together. i know i'm not the best developer by any means, but i am always trying to learn more. which is why i'm even making these sites at all. my focus is php right now with mysql, but i think i could learn a lot more from working with someone else to see how they do things
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    Trying out the guest account. Some things I'm noticing:

    • After login, when checking the source there's some validation issues.
      • In the style tag there's a title tag, which doesn't belong.
      • You also have some style tags inside the body tag, which is invalid, it should only be in the head tag.
      • You have a link tag in your body tag, which is also not allowed.
    • When I clicked on add push ups the page it took me to has validation issues. The navigation section is placed before the opening HTML tag for instance.
    • I know the images are temporary, but just wanted to mention they're kind of large so take a moment to download.
    • I added in 55 push ups and it shows my total down toward the bottom of the page as having that many, but when I click on the data or stats links it shows none. ... OK, I see I had to submit the query before it showed the data. You might want it to default to the currently logged in user with the option to query other user names.
    • On the date entry adding new push ups it doesn't specify the format needed (sit ups does), not is there any validation. I entered Sept. 1, 2009, and in the data screen it shows 0000-00-00, which shows it didn't understand my format from before. Validation is critical. You'll also want to make sure you check data to protect from SQL-injection, otherwise you may lose your database.
    • For the date field you may also want to default the field to the current date. That's what I did with my jog log app. I wanted to reduce the amount of effort on the users part.
    • As for additional features, I think you've captured most of the basic elements you would want.
      • It doesn't look like there is a way to delete data after it has been entered.
      • Export data, maybe is CSV (comma separated values).

    So, based on the quick inspection of the HTML I would recommend you focus some time there cleaning up the outputted HTML so it's at least closer to being valid and move all your CSS to a external CSS file. You should also probably decide on a DOCTYPE to use to get better feedback from the validator. I'd suggest either HTML 4.01 Strict or XHTML 1.0 Strict. Once you have the code cleaned up for the current data sets it'll be easier to add additional exercises and such.

    I'll pass right now on a team up. I'm just not sure how much time I can really put into it. If you post questions here though I'll likely help out as I can.

    I'm also figuring things out as I go and using SQLite as a change of pace. I actually started off using a flat file for keeping data and settings, but I kept adding new features and thinking up new ways to do things so I eventually realized I was better off with a database. I'm hoping to code things in a way that I can add multiple database options that the installer could choose from.
     
  7. twoodcc thread starter macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #7
    wow, thanks for that great feedback! i really appreciate it!.

    now my first question is how would i get the current date, and put that in as the default value? i know how to do default values, but how would i get the date in the correct format?
     
  8. twoodcc thread starter macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #8
    well i got the default value of the date box to work. but i do need to work on checking the data before putting into the database. how would i go about this?
     
  9. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #9
    Here's my date validation function. I allow for 2 possible formats; YYYY-MM-DD or MM-DD-YYYY, but I always change the format to YYYY-MM-DD for data storing.
    PHP:
      /**
       * Validates a given date according to format and being a true date
       *
       * @param d date string
       * @return array [0] boolean if date is valid.
       *               [1] Error message, or properly formatted date
       */
      
    public function Date($date)
      {
        
    // YYYY-MM-DD or MM-DD-YYYY
        
    $y $m $d 0$msg '';
        
    // Parse the date to check components, date array
        
    $da preg_split('/[\/ -]/'$date);
        
    // Make sure there's enough components
        
    if (count($da) != 3) { return array(false'Invalid date format.'); }
        
    // Make sure each component is a number
        
    if (intval($da[0]) == || intval($da[1]) == || intval($da[2]) == 0) {
          return array(
    false'Enter date in numerical format.');
        }
        
    // See if 1st component is the year
        
    if ($da[0] > 31) { $y $da[0]; $m $da[1]; $d $da[2]; }
        
    // If year in 3rd spot
        
    else if ($da[2] > 1900) { $y $da[2]; $m $da[0]; $d $da[1]; }
        else { 
    // bad/unrecognized format of date
          
    return array(false'Invalid date format: YYYY-MM-DD or MM-DD-YYYY.');
        }
        
    // Add leading zero if need be
        
    if (strlen($m) < 2) { $m '0'.$m; }
        if (
    strlen($d) < 2) { $d '0'.$d; }
        
    // Use PHP date validator for existing dates
        
    if (checkdate($m$d$y)) { return array(true"$y-$m-$d"); }
        else { return array(
    false'Invalid date format.'); }
      }
     
  10. twoodcc thread starter macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #10
    thanks for the reply. hopefully i'll be able to work on this this weekend. we'll see. i'll also post back if i have any questions with the code you put up. i think i can follow it though.

    thanks again :)
     

Share This Page