开发者

I'm about to start a new project in rails

Are there any addons/plugins/etc. that I should take a look at before starting a new project besides RSpec? I'm going to be doing a fairly heavy ajax/interactive web application. It's probably going to have 60 models by the time I am done.

I'm just looking for direction as to what people commonly use these days with rails that saves time, makes your code cleaner, etc.

Some more specific things:

  • support different user roles/privileges without typing myself to concrete base classes, because it's possible that roles can be shared (basically more like a privilege-based system rather than having subclasses for each user type).
  • There's go开发者_开发知识库ing lots of json requests and results - not a lot of the old-school style web programming.
  • themes
  • password salting/encryption
  • dynamic layouts based on privileges
  • public/private sections of the site
  • lots of css/js
  • file and image uploads. Maybe image storage/management is another thing, or should I just put those in the database these days?
  • taging
  • automatic positioning of records when inserted/updated (I figured I would just code this myself, but I'll throw it out there anyway)
  • paged results
  • sending emails
  • cron-like functionality to execute services (send out weekly newsletters, remove unused user accounts, delete unused images on the disk, etc.)

I ask these questions because I am a hardcore Java programmer just getting into Ruby


Depends on your project scope. However, "common", may differ from dev to dev. My common list of gems include:

  1. Devise for authentication. An alternative: Authlogic
  2. Cancan for user roles.
  3. Carrierwave for uploads. Some alternative: Paperclip, Dragonfly
  4. Kaminari for pagination. An alternative: Will_paginate
  5. Friendly_id for pretty urls.

Above list, is a personal preference. Any other gems I can think of, may be more suitable for specific / non-general project scopes.

Hope that helps!


It depends so, so much on what you're doing. Devise and Authlogic are good for authentication, Paperclip for file attachments, Factory Girl for test data, SCSS for improved CSS handling... there are so many. What kind of app are you making and what challenges do you expect? More info will make it easier to make suggestions.

Edited based on your comments: I would recommend Devise for user authentication, it'll handle salting and everything else and it's nearly brainlessly easy to use. For file and image uploading, Paperclip. For tagging, check out the jQuery Token Fields plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜