CSC/ECE 517 Fall 2013/ch1 1w24 nv: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 33: | Line 33: | ||
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''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. | * [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''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. | ||
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''] | * Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core''']. | ||
'''Rails DB Bootstrapping''' | '''Rails DB Bootstrapping''' | ||
Line 43: | Line 43: | ||
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds. | * [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds. | ||
* [https://www.ruby-toolbox.com/projects/ | * [https://www.ruby-toolbox.com/projects/has_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. | ||
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/Bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/Db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber''']. | |||
'''Rails Search''' | |||
* [https://www.ruby-toolbox.com/projects/Sunspot '''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. | |||
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''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. | |||
* [https://www.ruby-toolbox.com/projects/tire '''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. | |||
* [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''']. | |||
'''Data Persistence''' | '''Data Persistence''' |
Revision as of 04:54, 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.
- Other useful Ruby Gems here. activerecord-sqlserver-adapter, activerecord-jdbcmysql-adapter, activerecord-jdbcpostgresql-adapter, activerecord-jdbcderby-adapter,.
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.
- Other useful Ruby Gems here. ambitious_query_indexer, lol_dba, immigrant, redhillonrails_core.
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.
- Other useful Ruby Gems here. Bootstrapper, Db-populate, seed_dumper, dibber.
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.
- Other useful Ruby Gems here. pg_search, redis-search, Ferret, searchlight.
Data Persistence