Question: What is Oracle
Ruby on rails (RoR) all about?
Answer: Ruby was first
introduced as an extension to PHP, and Rails was a web development tool, but
Ruby on Rails has evolved into an object-oriented language with scripting
capabilities, code generators and libraries of re-usable components.
Andrej Koelewijn has published a great sample Oracle Ruby on Rails tutorial,
and here is a sample Oracle RoR script:
require 'active_record'
class TodoList < ActiveRecord::Base
end
ActiveRecord::Base.establish_connection(
:adapter => "oci",
:host => "oraxe/xe",
:username => "tl_owner",
:password => "tl_owner"
)
todoList = TodoList.new
todoList.name = "List 1"
todoList.description = "My first description"
todoList.save
todoList2 = TodoList.find(:first,:conditions =>["name = ?","List 1"])
puts "#{todoList2.id}, #{todoList2.name}, #{todoList2.description}"
When do I use Oracle Ruby on Rails?
Ruby on Rails for Oracle is a tool for
developing web applications quickly and it differs from standard Ruby on Rails
in that it includes persistence routines to store Ruby on Rails objects within
the Oracle relational tables. Oracle RoR (Ruby on Rails) is just the
latest incarnation of yet another web application development environment,
joining the other Oracle web development tools of SQL*Forms, JDeveloper,
Application Express (HTML-DB, Apex).
As-is the case with all relational
persistence methods for object-oriented languages, Oracle Ruby on Rails
programmers must overcome the issue of the
impedance mismatch.
Using Ruby on Rails with Oracle
Oracle has complete instructions for
installing Oracle RoR and an
Oracle Ruby on Rails tutorial, yet
Andrej Koelewijn has the best working example of Oracle RoR. Remember,
the only thing different from Oracle Ruby on Rails and standard Ruby on Rails is
the Oracle storage interface methods.
Hence, Oracle RoR is most appropriate for developers who already
have experience with Ruby on Rails.
The future of Oracle Ruby on Rails
The central question is whether
the addition of Oracle persistence methods within Oracle Ruby on Rails, is
enough to make it a popular development platform for Oracle-based applications.
Tim O'Reilly, the technology publishing guru notes that Ruby on Rails book sales
are flat:
"PHP is up only 4%, Cold Fusion up
9%, and JSP off 16%. Ruby on Rails shows in the treemap as flat, up 0%."
Steve Karam, an Oracle Certified
Master, author and expert in web technologies, shares these predictions on
programming languages for 2015 and the state of Ruby and Ruby On Rails (RoR):
"I should learn about more about
Ruby, as that's the "hot language" on the market right now.
Ruby is a fork of PHP with some
special features built in, and pretty rapid development, which is why it's
popular right now.
A
lot of the people I work with, however, think that Ruby is going to fade at
some point whereas PHP has and will not...I guess time will tell.""
Oracle ruby on Rails References: