设计一个日历系统,像谷歌日历 [英] Designing a Calendar system like Google Calendar

查看:371
本文介绍了设计一个日历系统,像谷歌日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建类似的东西到谷歌日历,所以我创建了一个事件表,其中包含所有用户的事件。

I have to create something similiar to Google Calendar, so I created an events table that contains all the events for a user.

困难的部分是处理再发生的事件,在事件表中的行具有EVENT_TYPE现场,告诉你什么样的事件是,因为一个事件可以是一个日期而已,或再存在的事件每隔X天。

The hard part is handling re-occurring events, the row in the events table has an event_type field that tells you what kind of event it is, since an event can be for a single date only, OR a re-occuring event every x days.

的主要设计挑战是处理再发生的事件。

当用户查看日历,使用月份的观点,我怎么可以显示所有的给定月份的事件?查询将是棘手的,所以我认为这将是更容易地创建另一个表,并创建一个行的每一个事件,包括重新发生的历史事件。

When a user views the calendar, using the month's view, how can I display all the events for the given month? The query is going to be tricky, so I thought it would be easier to create another table and create a row for each and every event, including the re-occuring events.

你们有什么感想?

推荐答案

由于previously指出, 不重新发明轮子,只是提高了。

As previously stated, don't reinvent the wheel, just enhance it.

结帐 VCALENDAR ,它是开源的,并配在PHP,ASP,和ASP.Net(C#)!

Checkout VCalendar, it is open source, and comes in PHP, ASP, and ASP.Net (C#)!

你也可以检查出日试点它提供写在Asp.Net 2.0日历。它们提供了一个精简版的版本,你可以看看,如果你的作品,你可以购买一个许可证。

Also you could check out Day Pilot which offers a calendar written in Asp.Net 2.0. They offer a lite version that you could check out, and if it works for you, you could purchase a license.

更新(零九年九月三十〇日):

当然,除非轮子坏了!此外,你可以把油漆闪亮的新外套,如果你喜欢(即:做一个更好的用户界面)。但至少试图找到一些基础建设掉,因为日历系统可能会非常棘手(含重复事件),并且它已经做了几千次了。

Unless of course the wheel is broken! Also, you can put a shiny new coat of paint if you like (ie: make a better UI). But at least try to find some foundation to build off of, since the calendar system can be tricky (with Repeating events), and it's been done thousands of times.

这篇关于设计一个日历系统,像谷歌日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆