简体   繁体   English

如何实施拍卖网站的时间管理?

[英]How do I go about implementing time management for auction website?

I am making an auction website ebay style for my Computer Science course. 我正在为我的计算机科学课程设计拍卖网站ebay风格。 I am using Java servlet, JSP, CSS, Javascript and MYSQL for implementing alla the different parts. 我正在使用Java servlet,JSP,CSS,Javascript和MYSQL来实现alla的不同部分。 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? 例如,我应该使用javascript管理每个项目的剩余时间,还是应该使用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 我将不胜感激您可以提供给我的任何提示,链接,想法

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. 制作一个Java脚本,查询数据库以检索出价。 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. javascript部分仅负责向用户显示剩余时间。

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. 有关于这个主题的书。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM