SlideShare a Scribd company logo
Extending Oracle
E-Business Suite
      with
 Ruby on Rails
Raimonds Simanovskis

                       github.com/rsim




                  @rsim


           .com
Why to extend
   Oracle
 E-Business
   Suite?
Customize or extend
    functionality
Embed EBS data in
  other systems
Simplify and make
     usable
Simplify and make
     usable
Simplify and make
     usable
How to extend
   Oracle
 E-Business
   Suite?
Release 11, 1998
             Custom
          Forms, Reports,
             PL/SQL

PL/SQL
Self-Service Web
  Applications 11, 1998
         PL/SQL generated
            web pages


PL/SQL
Self-Service Web
Applications 11i, 2000



   PL/SQL => JSP
                    Java
OA Framework 11i,
     ~2005
  JSP => full MVC
    framework


                    Java
OA Framework 12,
           2007
          or maybe move to
               ADF?
  “My general advice is to stick with OAF so
long as you are working with the E-Business
 Suite, and wait until you move to the Fusion
     Applications before moving to ADF”         Java
               -- Steven Chan
Oracle E-Business
            Suite today
                ADF?
                                               Java
   “Extending Oracle E-Business Suite with
     Oracle ADF and Oracle SOA Suite”




                           APEX?
PL/SQL
           “New Whitepaper: Extending E-Business Suite
             12.1.3 using Oracle Application Express”
Do not blindly
  trust what
    Oracle is
recommending...
Many Open-Source
        Web Technologies

CSS 3
                      Raphaël.js
What is
Ruby on
 Rails?
Ruby is
                object-oriented
                   dynamic
             programming language
              simple from outside
 Yukihiro
Matsumoto
 or “Matz”      powerful inside
Ruby on Rails
  Web applications development framework

             Developed in Ruby

Extracted from 37signals Basecamp application

            Open source software

      Focused on developer productivity

    Agile software development approach
Main principles
DRY - Don’t Repeat Yourself

Convention over Configuration

    Opinionated software
MVC Architecture
              Request    Router      Database




                                      SQL
Browser
  Response




                         Action      Active
                        Controller   Record
Action
 View
Active Record (Model)
class CreatePosts < ActiveRecor::Migration
  def self.up
    create_table :posts do |t|   CREATE TABLE posts (
      t.string :title               id         NUMBER(38) NOT
      t.text :body               NULL,
      t.timestamps                  title      VARCHAR2(255),
    end                             body       CLOB,
  end                               created_at DATE,
end                                 updated_at DATE
                                 );
                                 CREATE SEQUENCE posts_seq;
class Post < ActiveRecord::Base
  # nothing here!
end
post = Post.new
post.title = "First post"
post.save
post = Post.find(1)
puts post.name # output: "First post"
Action Controller
class PostsController < ApplicationController
  def index
    @posts = Post.all
  end

 def show
   @post = Post.find(params[:id])
 end

 def new
   @post = Post.new
 end

  # ...
end
Action View

<h1>Posts</h1>
<% @posts.each do |post| %>
  <h2><%= post.title %></h2>
  <h3>Created at <%= post.created_at %></h3>
  <p><%= post.body %></p>
<% end %>
ActiveRecord
Oracle enhanced
    adapter
Multi-platform support
        oracle_enhanced adapter




 Ruby 1.8.7       Ruby 1.9.2      JRuby

 ruby-oci8        ruby-oci8       JDBC
Oracle Data Types
    Ruby            Rails             Oracle
    Fixnum          :integer        NUMBER
     Float             :float        NUMBER
  BigDecimal       :decimal      NUMBER, DECIMAL
     Time         :datetime          DATE
     Time              :time         DATE
     Date              :date         DATE
     String           :string      VARCHAR2
     String            :text         CLOB
     String          :binary         BLOB
True/FalseClass    :boolean     NUMBER(1), CHAR(1)
Existing database
      schemas
class Employee < ActiveRecord::Base
  set_table_name "hr_employees"
  set_primary_key "employee_id"
  set_sequence_name "hr_employee_s"

  set_date_columns :hired_on, :birth_date_on
  set_datetime_columns :last_login_time

  set_boolean_columns :manager, :active

  ignore_table_columns :attribute1, :attribute2
end
PL/SQL calls from Ruby
      (old way)
 require "oci8"
 conn = OCI8.new("hr","hr","xe")

 cursor = conn.parse <<-EOS
 BEGIN
   :return := test_uppercase(:p_string);
 END;
 EOS
 cursor.bind_param(':p_string',"xxx",String)
 cursor.bind_param(':return',nil,String,4000)
 cursor.exec
 puts cursor[':return']
 cursor.close
ruby-plsql library

gem install ruby-plsql

require "ruby-plsql"
plsql.connect! "hr","hr","xe"

puts plsql.test_uppercase('xxx')
ruby-plsql library
plsql.connect! "hr","hr","xe"

plsql.test_uppercase('xxx')              # => "XXX"
plsql.test_uppercase(:p_string => 'xxx') # => "XXX"
plsql.test_copy("abc", nil, nil)         # => { :p_to => "abc",
                                         # :p_to_double => "abcabc" }
plsql.test_copy(:p_from => "abc", :p_to => nil, :p_to_double => nil)
                                         # => { :p_to => "abc",
                                         # :p_to_double => "abcabc" }
plsql.hr.test_uppercase('xxx')           # => "XXX"
plsql.test_package.test_uppercase('xxx') # => 'XXX'
plsql.hr.test_package.test_uppercase('xxx') # => 'XXX'

plsql.logoff
class Employee < ActiveRecord::Base
             set_create_method do
               plsql.employees_pkg.create_employee(
                 :p_first_name => first_name,

ActiveRecord     :p_last_name => last_name,
                 :p_employee_id => nil
               )[:p_employee_id]
     with    end
             set_update_method do

   PL/SQL      plsql.employees_pkg.update_employee(
                 :p_employee_id => id,
                 :p_first_name => first_name,
   CRUD        )
                 :p_last_name => last_name


 procedures  end
             set_delete_method do
               plsql.employees_pkg.delete_employee(
                 :p_employee_id => id
               )
             end
           end
Demo
Ruby on Rails on Oracle
    E-Business Suite
             Request    Router

Browser                                   Oracle EBS Database
  Response




                                     XXAPP schema
                        Action      additional
                       Controller   application tables
                                                         EBS module
                                                          EBS module
                                                           EBS module
                                                         schemas
                                                            EBS module
Action                                                    schemas
                                                           schemas
                                                            schemas
 View                                APPS schema
                                    XXAPP_% views
                        Active      XXAPP_% packages
                        Record
Additional
  Ruby libraries
    database_loader

oracle_ebs_authentication

     ruby-plsql-spec
Deployment options
                         Application source




        Apache                                   Java app sever

                                              Application WAR file
Ruby     mod_passenger
                                               JRuby      Gems
       Application                                Application
References
Rails on Oracle
  E-Business Suite
mytime
mydata
crmdata
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
Why Rails?
   Fast agile / iterative development
   Test-driven development support
Flexible HTML/CSS/JavaScript front-end
Easy to put on top of legacy applications
Libraries for all new “cool” technologies
    Open-source with liberal license
More information
         Demo app source code:
https://github.com/rsim/rails_ebs_demo



http://github.com/rsim/oracle-enhanced

       http://blog.rayapps.com

More Related Content

PDF
Fast Web Applications Development with Ruby on Rails on Oracle
KEY
Rails and Legacy Databases - RailsConf 2009
PDF
Using Ruby on Rails with legacy Oracle databases
PDF
Introduction to Ruby on Rails
PDF
Solid And Sustainable Development in Scala
PDF
How to dockerize rails application compose and rails tutorial
PDF
Ruby on Rails Oracle adaptera izstrāde
PDF
Warsaw Frontend Meetup #1 - Webpack
Fast Web Applications Development with Ruby on Rails on Oracle
Rails and Legacy Databases - RailsConf 2009
Using Ruby on Rails with legacy Oracle databases
Introduction to Ruby on Rails
Solid And Sustainable Development in Scala
How to dockerize rails application compose and rails tutorial
Ruby on Rails Oracle adaptera izstrāde
Warsaw Frontend Meetup #1 - Webpack

What's hot (20)

PDF
Creating a modern web application using Symfony API Platform, ReactJS and Red...
PDF
Short intro to scala and the play framework
PPTX
Demystifying Oak Search
PDF
Akka Cluster in Java - JCConf 2015
KEY
An Introduction to Ruby on Rails
PDF
Building a chatbot – step by step
PDF
Rails Performance
PPTX
Introduction to laravel framework
PDF
Laravel 5 Annotations: RESTful API routing
PDF
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
PDF
Life in a Queue - Using Message Queue with django
PPTX
Mastering the Sling Rewriter
PDF
Scala active record
PPTX
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
PPTX
Laravel ppt
PPT
Ruby on Rails workshop for beginner
PPTX
Java Play RESTful ebean
PDF
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
PPTX
Java Play Restful JPA
PDF
Intro to Rack
Creating a modern web application using Symfony API Platform, ReactJS and Red...
Short intro to scala and the play framework
Demystifying Oak Search
Akka Cluster in Java - JCConf 2015
An Introduction to Ruby on Rails
Building a chatbot – step by step
Rails Performance
Introduction to laravel framework
Laravel 5 Annotations: RESTful API routing
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Life in a Queue - Using Message Queue with django
Mastering the Sling Rewriter
Scala active record
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Laravel ppt
Ruby on Rails workshop for beginner
Java Play RESTful ebean
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
Java Play Restful JPA
Intro to Rack
Ad

Similar to Extending Oracle E-Business Suite with Ruby on Rails (20)

PDF
Oracle adapters for Ruby ORMs
PDF
Rails on Oracle 2011
PDF
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
PDF
Ruby on Rails in UbiSunrise
PPT
Using Rails to Create an Enterprise App: A Real-Life Case Study
PDF
When To Use Ruby On Rails
PDF
Connecting the Worlds of Java and Ruby with JRuby
PDF
The View - Leveraging Lotuscript for Database Connectivity
KEY
Desarrollando aplicaciones web en minutos
PDF
Ruby on Rails For .Net Programmers
PDF
Rails Scala Citec Presentation
PDF
JRuby - Programmer's Best Friend on JVM
PDF
Rails ORM De-mystifying Active Record has_many
PDF
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
PPT
Ruby on Rails: Building Web Applications Is Fun Again!
PDF
Ruby on Rails (RoR) as a back-end processor for Apex
PDF
Database Refactoring
PDF
Free The Enterprise With Ruby & Master Your Own Domain
PDF
Ruby on Rails : 簡介與入門
PDF
Databases -- Have it Your Way (Frederick Cheung)
Oracle adapters for Ruby ORMs
Rails on Oracle 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
Ruby on Rails in UbiSunrise
Using Rails to Create an Enterprise App: A Real-Life Case Study
When To Use Ruby On Rails
Connecting the Worlds of Java and Ruby with JRuby
The View - Leveraging Lotuscript for Database Connectivity
Desarrollando aplicaciones web en minutos
Ruby on Rails For .Net Programmers
Rails Scala Citec Presentation
JRuby - Programmer's Best Friend on JVM
Rails ORM De-mystifying Active Record has_many
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails (RoR) as a back-end processor for Apex
Database Refactoring
Free The Enterprise With Ruby & Master Your Own Domain
Ruby on Rails : 簡介與入門
Databases -- Have it Your Way (Frederick Cheung)
Ad

More from Raimonds Simanovskis (20)

PDF
Profiling Mondrian MDX Requests in a Production Environment
PDF
Improve Mondrian MDX usability with user defined functions
PDF
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
PDF
Data Warehouses and Multi-Dimensional Data Analysis
PDF
mondrian-olap JRuby library
PDF
eazyBI Overview - Embedding Mondrian in other applications
PDF
Atvērto datu izmantošanas pieredze Latvijā
PDF
JavaScript Unit Testing with Jasmine
PDF
Agile Operations or How to sleep better at night
PDF
TDD - Why and How?
PDF
Analyze and Visualize Git Log for Fun and Profit
PDF
PL/SQL Unit Testing Can Be Fun
PDF
opendata.lv Case Study - Promote Open Data with Analytics and Visualizations
PDF
Rails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
PDF
RailsWayCon: Multidimensional Data Analysis with JRuby
PDF
Why Every Tester Should Learn Ruby
PDF
Multidimensional Data Analysis with JRuby
PDF
Rails-like JavaScript using CoffeeScript, Backbone.js and Jasmine
PDF
How to Adopt Agile at Your Organization
PDF
Multidimensional Data Analysis with Ruby (sample)
Profiling Mondrian MDX Requests in a Production Environment
Improve Mondrian MDX usability with user defined functions
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Data Warehouses and Multi-Dimensional Data Analysis
mondrian-olap JRuby library
eazyBI Overview - Embedding Mondrian in other applications
Atvērto datu izmantošanas pieredze Latvijā
JavaScript Unit Testing with Jasmine
Agile Operations or How to sleep better at night
TDD - Why and How?
Analyze and Visualize Git Log for Fun and Profit
PL/SQL Unit Testing Can Be Fun
opendata.lv Case Study - Promote Open Data with Analytics and Visualizations
Rails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
RailsWayCon: Multidimensional Data Analysis with JRuby
Why Every Tester Should Learn Ruby
Multidimensional Data Analysis with JRuby
Rails-like JavaScript using CoffeeScript, Backbone.js and Jasmine
How to Adopt Agile at Your Organization
Multidimensional Data Analysis with Ruby (sample)

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
cuic standard and advanced reporting.pdf
PPTX
Spectroscopy.pptx food analysis technology
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Chapter 3 Spatial Domain Image Processing.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MIND Revenue Release Quarter 2 2025 Press Release
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
cuic standard and advanced reporting.pdf
Spectroscopy.pptx food analysis technology

Extending Oracle E-Business Suite with Ruby on Rails

  • 2. Raimonds Simanovskis github.com/rsim @rsim .com
  • 3. Why to extend Oracle E-Business Suite?
  • 4. Customize or extend functionality
  • 5. Embed EBS data in other systems
  • 9. How to extend Oracle E-Business Suite?
  • 10. Release 11, 1998 Custom Forms, Reports, PL/SQL PL/SQL
  • 11. Self-Service Web Applications 11, 1998 PL/SQL generated web pages PL/SQL
  • 12. Self-Service Web Applications 11i, 2000 PL/SQL => JSP Java
  • 13. OA Framework 11i, ~2005 JSP => full MVC framework Java
  • 14. OA Framework 12, 2007 or maybe move to ADF? “My general advice is to stick with OAF so long as you are working with the E-Business Suite, and wait until you move to the Fusion Applications before moving to ADF” Java -- Steven Chan
  • 15. Oracle E-Business Suite today ADF? Java “Extending Oracle E-Business Suite with Oracle ADF and Oracle SOA Suite” APEX? PL/SQL “New Whitepaper: Extending E-Business Suite 12.1.3 using Oracle Application Express”
  • 16. Do not blindly trust what Oracle is recommending...
  • 17. Many Open-Source Web Technologies CSS 3 Raphaël.js
  • 18. What is Ruby on Rails?
  • 19. Ruby is object-oriented dynamic programming language simple from outside Yukihiro Matsumoto or “Matz” powerful inside
  • 20. Ruby on Rails Web applications development framework Developed in Ruby Extracted from 37signals Basecamp application Open source software Focused on developer productivity Agile software development approach
  • 21. Main principles DRY - Don’t Repeat Yourself Convention over Configuration Opinionated software
  • 22. MVC Architecture Request Router Database SQL Browser Response Action Active Controller Record Action View
  • 23. Active Record (Model) class CreatePosts < ActiveRecor::Migration def self.up create_table :posts do |t| CREATE TABLE posts ( t.string :title id NUMBER(38) NOT t.text :body NULL, t.timestamps title VARCHAR2(255), end body CLOB, end created_at DATE, end updated_at DATE ); CREATE SEQUENCE posts_seq; class Post < ActiveRecord::Base # nothing here! end post = Post.new post.title = "First post" post.save post = Post.find(1) puts post.name # output: "First post"
  • 24. Action Controller class PostsController < ApplicationController def index @posts = Post.all end def show @post = Post.find(params[:id]) end def new @post = Post.new end # ... end
  • 25. Action View <h1>Posts</h1> <% @posts.each do |post| %> <h2><%= post.title %></h2> <h3>Created at <%= post.created_at %></h3> <p><%= post.body %></p> <% end %>
  • 27. Multi-platform support oracle_enhanced adapter Ruby 1.8.7 Ruby 1.9.2 JRuby ruby-oci8 ruby-oci8 JDBC
  • 28. Oracle Data Types Ruby Rails Oracle Fixnum :integer NUMBER Float :float NUMBER BigDecimal :decimal NUMBER, DECIMAL Time :datetime DATE Time :time DATE Date :date DATE String :string VARCHAR2 String :text CLOB String :binary BLOB True/FalseClass :boolean NUMBER(1), CHAR(1)
  • 29. Existing database schemas class Employee < ActiveRecord::Base set_table_name "hr_employees" set_primary_key "employee_id" set_sequence_name "hr_employee_s" set_date_columns :hired_on, :birth_date_on set_datetime_columns :last_login_time set_boolean_columns :manager, :active ignore_table_columns :attribute1, :attribute2 end
  • 30. PL/SQL calls from Ruby (old way) require "oci8" conn = OCI8.new("hr","hr","xe") cursor = conn.parse <<-EOS BEGIN :return := test_uppercase(:p_string); END; EOS cursor.bind_param(':p_string',"xxx",String) cursor.bind_param(':return',nil,String,4000) cursor.exec puts cursor[':return'] cursor.close
  • 31. ruby-plsql library gem install ruby-plsql require "ruby-plsql" plsql.connect! "hr","hr","xe" puts plsql.test_uppercase('xxx')
  • 32. ruby-plsql library plsql.connect! "hr","hr","xe" plsql.test_uppercase('xxx') # => "XXX" plsql.test_uppercase(:p_string => 'xxx') # => "XXX" plsql.test_copy("abc", nil, nil) # => { :p_to => "abc", # :p_to_double => "abcabc" } plsql.test_copy(:p_from => "abc", :p_to => nil, :p_to_double => nil) # => { :p_to => "abc", # :p_to_double => "abcabc" } plsql.hr.test_uppercase('xxx') # => "XXX" plsql.test_package.test_uppercase('xxx') # => 'XXX' plsql.hr.test_package.test_uppercase('xxx') # => 'XXX' plsql.logoff
  • 33. class Employee < ActiveRecord::Base set_create_method do plsql.employees_pkg.create_employee( :p_first_name => first_name, ActiveRecord :p_last_name => last_name, :p_employee_id => nil )[:p_employee_id] with end set_update_method do PL/SQL plsql.employees_pkg.update_employee( :p_employee_id => id, :p_first_name => first_name, CRUD ) :p_last_name => last_name procedures end set_delete_method do plsql.employees_pkg.delete_employee( :p_employee_id => id ) end end
  • 34. Demo
  • 35. Ruby on Rails on Oracle E-Business Suite Request Router Browser Oracle EBS Database Response XXAPP schema Action additional Controller application tables EBS module EBS module EBS module schemas EBS module Action schemas schemas schemas View APPS schema XXAPP_% views Active XXAPP_% packages Record
  • 36. Additional Ruby libraries database_loader oracle_ebs_authentication ruby-plsql-spec
  • 37. Deployment options Application source Apache Java app sever Application WAR file Ruby mod_passenger JRuby Gems Application Application
  • 39. Rails on Oracle E-Business Suite mytime mydata crmdata
  • 46. Why Rails? Fast agile / iterative development Test-driven development support Flexible HTML/CSS/JavaScript front-end Easy to put on top of legacy applications Libraries for all new “cool” technologies Open-source with liberal license
  • 47. More information Demo app source code: https://github.com/rsim/rails_ebs_demo http://github.com/rsim/oracle-enhanced http://blog.rayapps.com