CSC/ECE 517 Fall 2013/ch1 1w24 nv: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 56: Line 56:


* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.


* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].

Revision as of 05:02, 14 September 2013

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.
  • 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.

Rails Search

  • Sunspot Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.
  • sunspot_rails Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.
  • Tire Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.
  • thinking-sphinx An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.


Data Persistence

  • Mongoid Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.
  • Mongomatic Mongomatic is a modular Ruby object mapper for Mongo.
  • dynamoid Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.
  • squeel Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.