CSC/ECE 517 Fall 2013/ch1 1w24 nv

From Expertiza_Wiki
Revision as of 05:22, 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.
  • 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.
VIEW layer

CSS

  • Sass Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.
  • bourbon The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.

Graphing

  • google_visualr This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.
  • highcharts-rails Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.
  • Seer Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.

HTML & Markup

  • formula Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.
  • Formtastic A Rails form builder plugin/gem with semantically rich and accessible markup.

JavaScript

  • Jasmine Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.
  • konacha Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines

Rails In-Place Editing

  • BestInPlace BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.
  • best_in_place_mongoid BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.
CONTROLLER layer