Question

I am making an auction website ebay style for my Computer Science course. I am using Java servlet, JSP, CSS, Javascript and MYSQL for implementing alla the different parts. I can't understand how to go about implementing the time management for the different items on bid. For example, Should i manage the time left for each item using javascript, or should i do it with a servlet? How should I implement these methods? In all I need to be explained the theory behind time management in websites. I would gratefully apprecieate any tips, links, ideas that you can provide me

Was it helpful?

Solution

You want to implement a database-driven solution. To track anything that has to do with money on the client-side is a complete disaster.

At the very basic level, it boils down to these steps:

  1. Create a database containing the current bids, the day they expire etc.
  2. Make a Java script that queries the database to retrieve the bids. The server side is also responsible for checking if bids have expired and removing them etc.
  3. The javascript part is only responsible for displaying the remaining time to the user.

If you have little to no knowledge of how the tools you picked work, start with understanding them first. There are books written on the topic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top