views:

594

answers:

10

In my next rails project I'm going to need blogging functionality. I'm wondering whether anyone has any good suggestions, or should I just roll my own? (Probably not in 15 minutes)

I think the most important feature will be to display code samples elegantly.

+5  A: 

How's your free time?

Five years, that's how long that little idea took. Plus 2 years of adding bells and whistles. And that, folks, is why I'm giving in and using a blog host. Because I have lots of ideas, lots of things to say and to explore, but only a few dozen years left at best. I can't afford to go chasing every 5-year idea that springs to mind. After due consideration of the crap web frameworks and crap blog packages out there, I decided that I don't want to spend my next 5 years implementing my vision for a decent self-publishing system. Someone else can do it.

http://steve-yegge.blogspot.com/2006/03/blog-or-get-off-pot.html

kch
+2  A: 

Rolling your own blog is a great project (and quite fun too!), but for practical usage, using something pre-made is going to be more secure, have more cool features, etc. etc. Unless you're incredibly dedicated, you'll probably end up cutting corners and end up with something that isn't quite what you want.

Despite being a Rails guy myself, I'm a huge fan of Wordpress. If you're looking for Rails-based blog engines, I've had luck with Mephisto, although the documentation leaves something to be desired. Radiant CMS is another CMS/Blog system that might be worth looking at.

zenazn
A: 

If the project is to write a blog, don't roll your own. There are plenty solutions out there that will solve this problem for you while you worry about pumping out great content.

You will end up spending to much time futzing with the little things that don't really matter.

Chris Bartow
A: 

Probably there are tons of those.

For example, Rastafari, or Enkiblog.

friol
Thank you for the Enkiblog link, I think I will probably give this ago, seems to offer me the best combination, time will tell.
tsdbrown
A: 

In my next rails project I'm going to need blogging functionality. I'm wondering whether anyone has any good suggestions, or should I just role my own? (Probably not in 15 minutes)

I wouldn't recommend rolling your own blog system. You should look into using Radiant CMS with a blog extension.

I think the most important feature will be to display code samples elegantly.

For this I can recommend looking into SyntaxHighlighter.

Wolfr
A: 

All depends on your goal:

If it is for learning purposes and it's for fun, code it from scratch. Also, try to add new functionality that you will not find in current blogging platforms. For example, make in a way that is easy for a developer to blog tutorials or screencasts.

If it's for a client or just to blog, use wordpress. You can have your site in ruby and then link to wordpress. Think about it, how many human hours are behind wordpress so for you to match that you will need to work full time on it for 8 years.

Wordpress will work out of the box and then periodically you can tweak it, depending on future needs.

Geries
+2  A: 

It's a classic build-versus-buy (or, in this case, download for free) decision isn't it?

  • Write up the feature set of what you are looking for.
  • Survey the offerings out there to see how close a fit you have.
  • For the one or two products that is the closest fit, evaluate whether or not it would be less effort to write your own solution or customize the offering to do what you need.
  • If all you need is a blog site, then this is a no-brainer. Use WordPress and that's it.
  • If there are other features for this app and blogging is just one of them, then consider writing an app around WordPress. It is just a PHP application using MySql after all.
  • If WordPress has features or does things that you don't want, then maybe you do need to roll your own.
  • If the most important feature for this site is that it is to be written in RoR, then roll your own or find a RoR based blogging app as WordPress is not written in RoR. I haven't really done the homework on this but I would imagine that getting PHP and RoR to share session state would be a time consuming hack.
Glenn
A: 

I agree, for fun and learning, code from scratch. But consider coding something people really need and don't already have. Innovate.

There are so many excellent blog platforms out there, and some (like Wordpress) have active developer communities writing hundreds of useful and powerful plugins. And that includes some excellent support for code samples.

No need to reinvent the wheel.

Walt Gordon Jones
+1  A: 

A lot of Ruby/Rails developers have actually gone the route of using static website/blog generators. This has a few advantages. First, the pages are static HTML with no dependency on a database. This means they can be served by your front-end Web server (Apache, Nginx, etc.) faster than if they were to go through Mongrel, Thin or Phusion Passenger. Secondly, the pages will be easier for search engines to index. Finally, and probably most importantly, you can easily version control your posts using Git (or your favorite SCM)

I switched my blog over to a static model after development on Mephisto seemed to stall. I am using Tom Preston-Werner's Jekyll and Disqus for the comments. Works great. Give it a try!

kstewart
+1  A: 

If you are just looking for a project, then building your own blog engine is a good start.

Personally, though I have been a full-time Rails developer for the past 3 years, I still use and recommend Wordpress for myself and others.

cpjolicoeur