Formol

Formol is a Rails 3.1 forum engine until Rails 3.2 is out for good.

Why an engine?

Because I needed it. And because a forum is rarely a standalone app in a professional context.

In a near future, formol engine will be packaged in an independent and standalone application for those who need it.

Why writing a forum in rails?

Customers often ask for a forum inside their app. They think about phpBB or vBulletin like forum but it doesn't exist in rails. Developping one is really too expensive for a single project and:

  • bridge users between a phpBB and a rails app is very tricky (I just don't wanna try it).
  • phpBB / vBulletin is hard (or impossible) to embed into an application layout, especially a rails one.
  • Rails app and php forum won't share their sessions

Why don't use an existing solution?

Existing solutions are:

Beast has been inactive for 2 years. It's rails 2.2 and ruby 1.8. Don't need to say more.

Rails3-forums has been inactive for 8 months. It does less than formol after 1.5 weeks of development.

Forem is the most complete solution you can find in rails. Unfortunatly, it doesn't suit my needs.

In addition, I had to "come back" to ruby (was programming Java for 1.5 year) and I've never written an engine, never used rails 3.1 for a real project.

I decided then to write my own, with the best test coverage I can get (actually 99.3%).

Scaling

I do my best to think about everything that could make this engine scale for devils:

  • every non 'eager-loadable' association (like first and last on has_many) is heavily cached with belongs_to.
  • there's counters cache everywhere
  • I'll introduce caching (or try to in any case) for very high scaling when the app is stable.
  • I use a lot of indexes

Compatibility

Actually, formol is only tested with following parameters:

  • Ruby 1.9.2
  • Rails 3.1.3
  • Ubuntu
  • Mysql

When I would have read travis documentation, I'll test it on more platforms / db / rails versions (rails 3.2, ruby 1.9.3 & jruby, postgreSQL)

Installation

As long as formol is in pre-alpha version, it won't be packaged as a gem. It should be installable as a rails plugin but I didn't try it.

Features

  • Administration
    • categories
    • forums
  • Topics
    • locking topics
    • viewing all topics for a forum
    • creating new topics
    • pinning topics
    • tracking (read / unread by user)
    • subscriptions (with not scaling mailing)
    • polls & votes
  • Posts
    • replying to topics
    • deleting posts
    • editing posts
    • quoting
    • display user's signature
    • RTE
  • Text formatting
    • markdown
    • syntax highlighting
  • User preferences
    • display signatures
    • display avatars
    • use signature by default
    • signature
  • User permissions
  • Misc
    • install generator
    • gemspec
    • basic styles

Preview

Find other screenshots in /previews

Topic content

Dependencies

At the moment, formol is independent from any auth system, but I still recommend Devise. Formol is highly coupled with will_paginate, you can't use it without will_paginate.

Maybe I'll change this with something more flexible in the future. It's not planned for the moment because I don't know other solutions than will_paginate.

Others:

Coming next

  • Mark all topics as read (actually have no scaling solution)
  • Soft delete topics (i'm not sure now since all tests failed because soft deletion doesn't trigger destroy callbacks)
  • Theme support
  • Generator (devise views)
  • Demo app
  • Selenium tests
  • More translations (french of course and more)
  • Permissions management (by admin)
  • Gravatars
  • Avatar uploading

Copyright 2011 Florian DUTEY

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.