CSC/ECE 517 Fall 2013/ch1 1w24 nv

From Expertiza_Wiki
Revision as of 04:46, 14 September 2013 by Vkara (talk | contribs)
Jump to navigation Jump to search

A Tour of Ruby Gems


Some important Gems that are useful in RAILS environment

There are many gems which provide easy of functionality that can be included in the rails development environment. Bundleris a useful gem that enables a developer to quickly add and manage gems in a few lines of code.

We can classify the Gems based on the usage in different layers Model, View and Controller.

MODEL layer

Active Record Plugins

  • oracle-enhanced Oracle "enhanced" ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.
  • activerecord-jdbc-adapter AR-JDBC is a database adapter for Rails' ActiveRecord component designed to be used with JRuby built upon Java's JDBC API for database access. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.
  • nulldb A database backend that translates database interactions into no-ops. Using NullDB enables you to test your model business logic - without ever touching a real database.
  • oracle-enhanced-enhanced It includes several enhancements and customization to the standard ActiveRecord Oracle Enhanced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.

Active Record Index Assistants

  • foreigner Adds helpers to migrations and dumps foreign keys to schema.rb.
  • rails_indexes A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.
  • schema_plus SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.
  • automatic_foreign_key Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.

Rails DB Bootstrapping

  • seed-fu Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.
  • populator Mass populate an Active Record database.
  • seedbank Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.
  • alter ego Has alter ego has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.


Data Persistence