Sunday, April 15, 2012

Clarifications to term project

Please see the comments of this post for important clarifications to the term project.

31 comments:

  1. Clarifications (made in class on April 16th):

    (1) min_severity should be enum('1', '2', '3', '4') to allow for not sending of text messages for example. This affects tables subscriptions and dynamic_subscriptions. The a5.project.sql file has been updated.

    (2) the subscriptions.php page should include the dynamic subscriptions as well (both viewing and adding)

    (3) it would be best to include navigation links to all pages (e.g., at the bottom of every page)

    (4) it would be best to include a logout button, to simplify testing.

    ReplyDelete
    Replies
    1. I am a little unsure about the dynamic subscription / check-in relationship. Is this the correct interpretation:

      -The Dynamic_Subscription table stores a user's notification preference for ALL check-in's. There is only one record per user.

      -The Subscriptions table stores a user's notification preference's for each location. These do not apply to check-ins (Dynamic_Subscription table handles preference for all check-ins)

      -The Users table keeps track of the user's last check-in.

      -The subscriptions.php page allows a user to add/remove/view subscriptions set for specific locations and their ONE subscription for all check-ins.

      -The checkin.php page allows a user to check-in. But a notification, in the case of an event, will not be delivered if the user hasn't set up their dynamic subscription preference on the subscriptions.php page, which is stored in the Dynamic_Subscriptions table

      Delete
    2. Yes, these are all correct. Keep in mind also that a user's location is only valid for 2 hours, when we are checking to see if a dynamic subscription plus checkin would match an event.

      Delete
    3. Great - Super-fast response too. Thank you

      Delete
    4. If a user registers and immediately checks-in without visiting the subscription table to setup their dynamic subscription, will they receive no notification for an event at the location? That is what I asked above but I am double-checking because I noticed the "default" values in the assignment description for the dynamic subscription table -- 1, 2, and 3. I wasn't sure if that refers to the default set drop-down values when the user establishes their preferences on the Subscriptions page, or just the default values even if the user doesn't bother to set their dynamic subscription. It does not seem correct that a new user could check-in and they still won't get any notification if they didn't explicitly set their dynamic subscriptions.

      Delete
    5. There has to be a dynamic subscription in place, otherwise no event matches will occur. The defaults apply if you do not assign values for these in the database (i.e., NULL) when inserting a tuple, but a tuple needs to be inserted. You can add them as defaults in the user interface, but that is not necessary.

      Delete
  2. One more clarification:

    You should provide for the ability for subscriptions and dynamic subscriptions to be changed. The easiest way is to allow for them to be deleted, if the user wants to (and thus perform an update by delete+add).

    ReplyDelete
  3. For the autocomplete, are we able to implement it in a similar way to the AJAX example -- a list of matches under the text box (but clickable)? Or does the text field itself need to fill with a suggestion as you type (like a Google search).

    I did some web searches the more sophisticated approaches seemed to involve JQuery.

    ReplyDelete
    Replies
    1. Actually, I took the wrong approach previously. I now see that the text box can be updated with the result of the search string without JQuery. I'm all set.

      Delete
    2. I was going to say that it can be whatever you want. It would be nice to get the google-style one, but a basic one should suffice also.

      Delete
  4. 1) Does anything happen if a user checks in to a location and there was a recent event there? (The event occurred before the user checked in, but recently so that the user might want to know about it.)

    2) Since event_map.php is supposed to be the same as event_list.php, does the map only show events that apply to the user's web notifications? So if a user had only text notifications and chose not to receive web notifications, there would be no events on their map?

    3) I remember you mentioning that the hierarchical selection of check-in locations should be through a dropdown (or multiple dropdowns?). How should this appear to the user?

    ReplyDelete
    Replies
    1. 1) no, let's keep things simple

      2) yes, if there is no web notification then they should not see the events

      3) should be multiple drop-downs, one per line, along the lines of choosing a make and model for a car (e.g., at http://www.edmunds.com/)

      Delete
    2. Is there a static number of drop-downs (e.g. 4 for the number of location levels), or does the checkin begin with one drop-down and more drop-downs appear when you select a location that has child locations?

      Delete
    3. The drop-downs should be updated as you go from parent to child, I.e., only the children should be shown under a specific selection. Note that you should have a "none specified" option in case someone wants to stay with just the parent and not select a child

      Delete
  5. Updated schema: current_login_ts



    It seems with the current setup you will need the current_login time and the last_login time in order to properly do event matching (for the current and future sessions). In other words, if you just update the login time at login, you will not be able to use it in queries.

    If you have already found a way around this (there are two), then that is fine.

    IF NOT, then I added a special field in the database to record the information. In particular, I added a current_login_ts field in the users table. This is set at login and when a user logs out, then the current_login time becomes last_login time and current_login time becomes NULL.

    The updated schema has been posted.

    ReplyDelete
  6. 1) Can we implement autocomplete the same way as the "suggestions" from the posted AJAX examples, or does it need to be more sophisticated (someone mentioned clickable suggestions above)?

    2) Should the new_event.php autocomplete only offer locations for which the user has the ability to post an event (they have a subscription or are checked in) or should the autocomplete list all locations as checkin.php does?

    ReplyDelete
    Replies
    1. 1) needs to be clickable, but can be on a list below, does not have to be fancy like google.

      2) you can either make the check at the input OR let the input be the generic one and make a check later. Probably a later check is simpler and this is perfectly fine.

      Delete
    2. If we use JQuery autocomplete to list the suggestions below the text input, can we use JQuery's built-in UI div classes to help with the styling?

      Delete
  7. Thanks for all the answers so far!

    1) How are dynamic subscriptions supposed to work with web notifications? event_list.php and event_map.php can't check if a person was checked in to the relevant location at the time of a past event, because only the last checkin is stored. So if the user wants to display all notifications since the beginning, this list will not include events that matched dynamic subscriptions.

    2) What information needs to be included on the map? Beyond putting a marker at the site of every event, do we need to somehow represent that there were multiple events at a single site?

    ReplyDelete
    Replies
    1. 1) correct, you cannot visualize dynamic subscriptions with the current database schema. We would need to have kept the list of all locations and I decided to keep it simple.

      2) you need to display the event information (i.e., time, location, description, etc). It is up to you to combine events in a single pushpin, or add multiple pushpins.

      Delete
    2. So we shouldn't check dynamic subscriptions at all for the web version then?

      Delete
    3. You do have one accurate location, the last checkin.

      Delete
  8. Were the google maps powerpoint notes ever posted online?

    ReplyDelete
  9. Is a dynamic subscription global and persistent, or instead created each time a checkin occurs?

    Case 1 would be that I can use the subscriptions page to set my dynamic subscription severity preferences, which then apply to every location I check into until I choose to update my subscription from the subscriptions page

    Case 2 would be that the checkin page asks me for dynamic subscription severity with every location that I log into

    ReplyDelete
    Replies
    1. Case 1, you set dynamic subscriptions once and they are in place until updated.

      Delete
  10. can we use a drop down menu instead of an autocomplete field?

    we still would need to use ajax to generate the list, and this would prevent the user from entering an invalid location, so we wouldn't have to check for that.

    ReplyDelete
    Replies
    1. You need both a drop-down (for the checkin) and an autocomplete (for everything else). If you run out of time, then using a drop-down is an acceptable substitute (but won't be full points).

      Delete
  11. When computing whether the user receives a message for an event, do dynamic or static subscriptions take priority? In other words, if a user is logged into a location and has a static subscription to that location, which severities are used to compute whether he/she is notified?

    ReplyDelete
    Replies
    1. You need the union and essentially choose the case where it would lead to more notifications. E.g., if the static only says 3, 4, 4 but the dynamic says 1, 1, 1, then they get a notification email and text if they have checked in there, but only get web notification after 2 hours of checking in, if a new event arrives.

      Delete

Note: Only a member of this blog may post a comment.