重新编码播客网站 - 我应该使用什么?

发布于 2024-08-11 02:47:05 字数 1743 浏览 1 评论 0原文

好吧,这就是交易。我和一些朋友正在做一个播客(到现在已有 4 年多了),四月份我们重新启动了该网站,其中包括一个新的后端。由于当时我只有两周的时间来让一切正常工作,所以我决定从头开始创建一些东西,以便一切都完全符合我们的需求。整个事情是基于 mod_python 用 Python 编写的。

目前我没有太多事情要做,所以我考虑重构代码(因为你在两周内编写的代码并不是你想象的最干净的代码),我想到我可以将它基于内容管理系统。

我确实花了几分钟来写出整个模型的模型,但这里是:

所有

  • 创建者
  • 创建者
  • 编辑者
  • 编辑者

用户

  • 密码
  • 真实姓名
  • 管理员(真/假)
  • 版主(真/假)
  • 个人资料可见(真/ False)
  • 个人资料图片
  • 个人资料文本

标签(belongs_to_many :posts)

  • 姓名

帖子(has_many :files, :comments, :tags)

  • 标题
  • Feed 标题
  • 剧集编号
  • 类型(播客/新闻)
  • 日期
  • 图片
  • 评论(打开/关闭/隐藏)
  • 状态(公共/自动) /隐藏)
  • 文本
  • 文件
  • 标签

文件(belongs_to_many :posts)

  • 文件
  • 大小
  • 持续时间(这需要库来确定 mp3/mp4/m4v 文件的长度)

评论(belongs_to :posts)

  • 帖子
  • 用户(如果由播客发布,所以我们可以突出显示评论等)
  • 日期
  • 隐藏(真/假)
  • 姓名
  • 电子邮件
  • IP
  • 文本

页面

  • 标题
  • 文本

OK 上面的东西非常简单,只是获取 mp3 等的持续时间可能会有点麻烦。

现在最大的问题来了,我们的下载跟踪。

这需要名为 Year_Month 的自定义表,格式如下:
- 包含以下内容的行:fileID all、itunes、feed、其他等。

每次下载时,我们都会根据需要创建新的表和行。 获取信息并将其转换为图表的部分非常复杂。

选择...

所以我看了一下 Drupal、Django 和 Ruby on Rails。 Drupal 是 PHP...好吧,我对 PHP 没有任何问题,这里的主要问题是如何实现 mp3 的持续时间检查。

Django 是 Python,因为我也是用 python 编写当前站点,所以很多问题都消失了。

Ruby on Rails 似乎非常适合启动开发(我喜欢 Railscasts),不幸的是,尝试使用 Aptana RadRails 开发演示却以 200 行堆栈跟踪失败。因为在我停下来之前我没有对 Ruby 做任何事情。

我希望你们中的一些人可以帮助我在这里做出选择,因为你们可能已经有了我所没有的 Drupal/Django/Ruby on Rails 的经验,而且我真的很讨厌半途而废重新开始一个项目,只是因为有一些小事情无法用技术 XYZ 来实现。

OK here is the deal. Me and some buddies are doing a Podcast(for over 4 year now) and in April we relaunched the site, that included a new Backend. Since I only had 2 weeks back then for getting everything to work, I decided to create something from scratch so everything fitted precisely our needs. The whole thing was written in Python based on mod_python.

At the moment I don't have much to do so I thought about refactoring the code(since code you write in 2 weeks isn't the cleanest one as you can imagine), I came to the idea that I could base it on a CMS.

It did take me some minutes to write up the model for the whole thing but here it is:

All

  • Create by
  • Create at
  • Edited by
  • Edited at

Users

  • Usermame
  • Password
  • Realname
  • Administrator(True/False)
  • Moderator(True/False)
  • Profile visible(True/False)
  • Profile picture
  • Profile text

Tags(belongs_to_many :posts)

  • Name

Posts(has_many :files, :comments, :tags)

  • Title
  • Feed Title
  • EpisodeNumber
  • Type(Podcast/News)
  • Date
  • Image
  • Comments(Open/Closed/Hidden)
  • State(Public/Auto/Hidden)
  • Text
  • Files
  • Tags

Files(belongs_to_many :posts)

  • File
  • Size
  • Duration(This needs libraries for determening the length of mp3/mp4/m4v files)

Comments(belongs_to :posts)

  • Post
  • User(If posted by a podcaster, so we can highlight the comment etc.)
  • Date
  • Hidden(True/False)
  • Name
  • Email
  • IP
  • Text

Pages

  • Title
  • Text

OK the stuff above is pretty simple, only the getting the duration of the mp3s etc. could be somehow troublesome.

Now comes the bigest problem, our download tracking.

This needs custom tables named Year_Month with the following format:
- rows with: fileID all, itunes, feed, other etc.

On every download we create new tables and rows as necessary.
The part of getting the information back out and converting it into charts is quite complex.

Choosing...

So I took a look at Drupal, Django and Ruby on Rails.
Drupal is PHP... well I have no problem with PHP the main question here is how to implement duration check for mp3s.

Django is Python since I wrote the current site in python too, many questions fall away.

Ruby on Rails seems pretty good for kickstart development (I love the Railscasts), unfortunately, trying to develop a Demo with Aptana RadRails failed epically to a 200 line stack trace. Since I didn't do anything with Ruby before I stopped there.

I hope that some of you people can help me with the choice here, since you may already have experience with Drupal/Django/Ruby on Rails that I don't have, and I really hate it to having start over after being half way though a project, only because there is some little thing that can't be implemented with technology XYZ.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

<逆流佳人身旁 2024-08-18 02:47:05

Drupal 很复杂,您不容易学会使用。这样做的好处是,你可以免费获得很多东西。您使用模块、设置等进行了大量构建,而不是编写自己的东西。在这种情况下,使用诸如 CCK视图ffpc 你会无需太多工作即可生成播客。唯一的事情是定制它,如果你不知道 drupal 是如何工作的,那是相当困难的。几周前,我实际上制作了一个播客网站,它需要的功能比您描述的更多,并且有一个风格化的 alpha 版本,一切都在一周内准备就绪。因此,使用 Drupal 的功能非常强大,但前提是您知道如何使用。

另一方面,django 可能更容易控制。与 Drupal 相比,您在代码中做了更多的事情,但是当您习惯这样做时,这应该不是问题。看来您对网站的分解和需求更符合 Django 的思维方式,而不是 Drupal 的方式。 Drupal 使用对象的方式与 Django 不同,而且它对 OO 编程的使用也有很大不同,因为它不经常使用对象。

在我看来,对你来说使用 Django 会很困难,但如果我现在应该在 Django 和 Drupal 之间进行选择,我将这两者用于不同的项目,Drupal 将是我的选择,因为大部分需要的东西已经制作好了,所以所需要的只是设置一些东西。

免责声明,我没有使用过 RoR,所以不知道那会怎么样,但据我所知,它在很多方面都很像 Django。

Drupal is complicated and not something you easily learn to use. The thing about it, which is very nice, is that you get a lot for free. You do a lot of building with modules, settings and such, instead of coding your own stuff. In this case, with modules such as CCK, views, ffpc you would be able to generate podcasts without much work. The only thing is customizing it, is quite hard, if you don't know how drupal works. A few weeks ago, I actually made a podcasting site which needed more features than you describe and had a styled alpha version with everything ready within a week. So using Drupal can be incredibly powerful, but only once you know how to do it.

On the other hand, django is probably a bit easier for you to control. You do a lot more in the code, compared to Drupal, but when you are comfortable doing this, it shouldn't be a problem. It also seems that your break down of the site and what's required fits the Django way of thinking a lot more than the Drupal way. Drupal doesn't use objects the same way Django do and it's use of OO programming is a lot different too, since it doesn't use objects that often.

It seems to me, that for you it will be a lot to use Django, but if I should choose right now between Django and Drupal, both of which I use for different projects, Drupal would be my choice, since most of what's needed is already made, so all that's needed is setting up a few things.

Disclaimer, I haven't worked with RoR, so don't know how that would be, but from what I've heard, it's a lot like Django in many aspects.

眼泪都笑了 2024-08-18 02:47:05

Geoffrey Grosenbach 的 Ruby on Rails 播客 站点是开源的。这至少会给你一个好的起点。

The Ruby on Rails Podcast site by Geoffrey Grosenbach is open source. That would at least give you a good starting point.

夢归不見 2024-08-18 02:47:05

与 RoR 一起去。简化。在我看来,RadRails 太过分了。使用文本伴侣。它有大量有用的键盘快捷键,可以简化并加速开发。

Go with RoR. Simplify. In my opinion, RadRails is overkill. Use TextMate. It has a ton of helpful keyboard shortcuts that simplify and speed up development.

跨年 2024-08-18 02:47:05

看看你的规格,我不认为你在谈论火箭科学,这需要你在项目完成一半后重新开始。 RoR 和 Django 都是经过现场测试的框架,它们将使您能够完成您想要完成的任务,这取决于您对它们的熟悉程度。由于您有 Python 经验,我认为 Django“可能”是最佳选择。

Looking at your specs, I don't think you are talking about rocket science that would require you start over after being half way through your project. Both RoR and Django are field tested frameworks that will enable you to do what you want to accomplish, and that makes it boil down to your familiarity with them. As you have Python experience, I think Django "might" be the way to go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文