This is it - you're flying solo.Your team is in total control of what you end up building. We have some expectations about the amount of effort put in on this, but what to do with that effort is up to you. "Build a cseBay" is the full spec.
Setup
cvs updatewill fetch all of the files used in my mockup of cseBay, except forprocessTemplate.pm(which is the milestone 2 assignment).What To Do
You have free rein. Your group needs to design what pages you'll have, then it needs to implement them.The sample code and template pages should provide a lot of guidance about how to accomplish things. The big things missing are
HTMLforms (that let users enter data, e.g., to create a new cseBay account) and SQL database updates (e.g., to enter new bids). I've added some links to the documentation page, but it's (intentionally) minimal.Take the design phase seriously. You should try to map out what you want your site to be/do in some detail, so that you can map out what needs to get done in some detail. Then decide on a "schedule", which in such a short period really means an order in which to try to do things, and an assignment of responsiblities among the team members.
Try to figure out what your "biggest risks" are up front. Typically, these are the things you know least about -- anything you have no idea at all how to do at this point would be a candidate, for instance. Try to minimize your risks by attacking them first. Get far enough along on each thing you don't understand that you understand it, even if you don't do a complete implementation. (For instance, if you don't know about
HTMLforms, try experimenting with them until you do, even if you haven't built quite exactly the final forms you'll need. Then move on to the next risk.)Especially while you're whittling down the risks, communication among the team members is crucial. Best is to work in the same location. No matter what, you'll almost certainly want to be in touch with each other regularly (every couple of hours of work time, I'd guess, at least). Once the risks are conquered, it's more likely that you can make working independently for long periods of time.
The
SQLDatabase(The DB is the MySQL flavor ofSQL. Only under circumstances that would normally indicate some kind of misunderstanding should that information be of any relevance to you, though.)The
SQLdatabase requires use of an account that it manages, that is, an account that has nothing to do with your CSE login name or password. You'll find the account to use (name and password), as well the as the DB name and location (host machine), in the sample code you fetched with thecvs update.You will all have the permissions required to modify, add, or delete any entries the in DB. You will all be using data from a single DB. That means that any changes you make will be seen by everyone. We don't anticipate that this will cause any problems that aren't just part of normal life using a DB, but it does mean that your code may need to be more than usually prepared to deal with problems - DB data that doesn't make sense. Everyone will be debugging, so somewhat arbitrary things could happen to the DB data.
Note: The database has been designed so that nothing is ever deleted from the DB. Instead, the things that one might imagine deleting have a "valid bit" associated with them. We don't delete anything from the DB, we simply mark it as invalid.
Note:!!!! It's harder than you might expect to put the DB back into a reasonable state if you do delete something. For instance, say you test creating a new user, then you test having that user list some items for sale and maybe make some bids herself, and then you delete that user. The DB will be littered with references to the user, who no longer exists. That's probably not good, and fixing it may or may not be complicated.
One thing you don't have permission to do is change the DB schma. You have to live with what we set up, the three following tables:
Because of a bad decision made years ago, bids do not have valid bits. There is no way to delete them logically as it stands, and because of the massive amount of legacy code that has built up it's unthinkable to change the schema to add a valid bit now.
users (that's the table's name) Field name (DB column) Use id A unique-for-all-time integer identifying a user firstname Oddly enough, a first name lastname Ditto nickname A cseBay user name for this person password Their cseBay password, in plain text rating User feedback total valid If 0, this record has been (logically) deleted.
items Field Use id A unique-for-all-time integer identifying an item owner The (integer) unique id of the user listing this item title The one-line description of the item description an arbitrary chunk of HTMLsupplied by the cseBay userstarttime The time at which this item was listed, in the units used by perl'stimefunction (seconds since 1900 began).
Note:If you're running code on a Mac, it looks like your times as provided byperlmay be off 3 or 4 years from the ones stored in the DB. (See theperldoc.)endtime The time at which this item's auction ends highbid The amount of the highest bid for this item so far, as a double (e.g., 20.25) valid If 0, this record has been (logically) deleted, probably because the auction expired.
bids Field Use item_id The unique id of the item this bid is for bidder_id The unique id of the user making this bid amount As a double bidtime When the bid was placed You may not end up using all these fields. For instance, if user ratings is low on (or maybe completely off of) your priority list, you may not get to it, and won't have any code using that field.
The DB Data
Most of the links in the sample data are live -- if you click on them, you're headed to real, commercial sites, where money is real money. (That's just an undoubtedly unnecessary heads up.)Useful Tool
MySQL Control Center lets you look at and modify the DB. That's handy, as it gives you a way to determine whether your code has in fact fetched the right data, etc.Tempting but Maybe Not Useful Tool
Mozilla has an HTML editor --Windowmenu,Composer. It seems likeComposerwould make it easy to create new.templatefiles -- you just create and save them usingComposer, then rip off the head (up through<body>) and tail (</body></html>) and you've got a template.The problem is that while you can use
Composerto create templates, you can't use it to edit the templates -- even if you put the head and tail back on, there's those pesky lines with braces at each end to worry about. (Composerwill at the very least break them, if not break itself when it sees them.)I still think
Composermight be of some use, though. If there's some look you want your page to have but you don't know theHTMLfor it, it's often easier to create a sample inComposerand look at theHTMLit has created than to find, read, and understand documentation (the search part of which usually requires knowing the name of someHTMLtag you don't know the name of).The bots
There are two bots running:
bidBotis busily making bids on random items on behalf of randomly chosen users.invaliBotwakes up every ten minutes or so and turns off the valid bits on any item whose auction has expired.The Distributed Sample Code
Distributed as is, with no guarantees or warrantees of any sort. (One bug was left in intentionally, but it's minor and you probably won't ever see it as things have turned out. If you want to know more about it, I'm happy to explain in person, but it would be ineffective to try to do it in writing here.)