在生成丰富的博客时,Rails Ruby Gems与纯开发 [英] Rails Ruby Gems vs Pure Development When Generating A Rich Blog

查看:139
本文介绍了在生成丰富的博客时,Rails Ruby Gems与纯开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些像jekyll,toto和webby这样的宝石宝石提供了开箱即用的博客类型集成到你的ruby应用程序中。开发丰富的网络博客类型应用程序的另一种方法是使用纯ruby和rails实践自己构建和建模应用程序。 (例如创建文章和用户模型)。第一个开箱即用的功能第二个选项提供了更多的定制和控制。



在人们的Stack Overflow经验中,这将是最佳路线,人们会考虑什么当决定使用gem开箱即用而不是单独使用时? 解决方案

您提到的所有宝石都采用静态, markdown / textile / etc文件并将它们转换为HTML网站。他们采取不同的方法,用jekyll吐出完成的网站来托管,根据请求做转换和路由,webby和jekyll一样做。

如果您使用的是Rails,请务必注意,这些内容都不会很好地集成到您的应用程序中。它们的建立或多或少都是靠自己的操作。



一般来说,如果一个gem具有你需要的功能,就使用它。它们并不等同于您在Wordpress和Drupal中找到的插件,它们通常是低质量的,错误的,记录不当的等等。通常,宝石只需添加一些模块,您可以将它们集成到应用程序中。另一方面,基本的博客在Rails中非常快速和简单,特别是考虑到你有一个方便的演练指南直接从Rails文档中了解如何操作。


Some ruby gems like jekyll, toto and webby offer out of the box blog-type integration into your ruby app. Another way of developing a rich web blog-type application is to build and model the application yourself using pure ruby and rails practices. (e.g creating an Article and User model). The first offers out of the box features the 2nd option offers more customization and control.

In people's experience on Stack Overflow, which would be the best route and what would people consider when making the decision to use a gem out of the box versus going alone?

解决方案

All of the gems you mentioned take static, markdown/textile/etc files and turn them into HTML websites. They take different approaches to it, with jekyll spitting out the finished website for hosting, toto doing the converting and routing on request, and webby doing the same as jekyll mostly.

If you're using Rails, it's important to note that none of these will integrate into your application well. They're built to more-or-less operate on their own.

Generally speaking, if a gem has the functionality you need, use it. They are not equivalent to plugins you find for Wordpress and Drupal where they are typically low-quality, buggy, poorly documented, etc. More often than not, gems simply add a couple modules that you can integrate into your application how you like.

On the other hand, a basic blog is pretty quick and simple in Rails, especially considering you've got a handy walkthrough guide straight from the Rails documentation on how to do it.

这篇关于在生成丰富的博客时,Rails Ruby Gems与纯开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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