cjeffers / stealthmode

Quiz website for CS 108 final project
0 stars 0 forks source link

Design API for AbstractModel subclasses #19

Open cjeffers opened 10 years ago

cjeffers commented 10 years ago

For @ulmerb and @jedtan:

Take a look at the tech spec for AbstractModel, and start coming up with the API for all the subclasses. They're listed under AbstractModel in the tech spec. Think about what functions we're gonna need to satisfy the functional spec.

Major considerations:

I don't really care how you guys split this stuff up, just update the wiki with the API choices you make. Woohoo! :poop:

ulmerb commented 10 years ago

Did the quiz class (although waiting on setters) and working on the question class.

cjeffers commented 10 years ago

Some things to think about:

  1. Take a look at Jacob's code and see how the superclass methods actually work, i.e. they return AbstractModel instances, not List<String>. Also calling the class method AbstractModel.getByValue() is not tied into any table (or worse is unpredictably tied to some unknown table), so you need to override the static variable instance_tablename to be the name of the table you're using, then call the static methods off your class.
  2. I would suggest thinking clear through the API for the classes you're doing and putting the functions on the wiki so that at least one other person (@jedtan?) can talk over them with you to make sure you're getting all the cases. My hunch is that User will be easier than Quiz or Question, because there's less processing and more simply accessing and returning stuff from the database.
ulmerb commented 10 years ago

My b, I was branching off the master, not Jed's