Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Extending OracleE-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/SQLPL/SQL
Self-Service Web  Applications 11, 1998         PL/SQL generated            web pagesPL/SQL
Self-Service WebApplications 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 solo...
Oracle E-Business            Suite today                ADF?                                               Java   “Extendi...
Do not blindly  trust what    Oracle isrecommending...
Many Open-Source        Web TechnologiesCSS 3                      Raphaël.js
What isRuby on Rails?
Ruby is                object-oriented                   dynamic             programming language              simple from...
Ruby on Rails  Web applications development framework             Developed in RubyExtracted from 37signals Basecamp appli...
Main principlesDRY - Don’t Repeat YourselfConvention over Configuration    Opinionated software
MVC Architecture              Request    Router      Database                                      SQLBrowser  Response   ...
Active Record (Model)class CreatePosts < ActiveRecor::Migration  def self.up    create_table :posts do |t|   CREATE TABLE ...
Action Controllerclass PostsController < ApplicationController  def index    @posts = Post.all  end def show   @post = Pos...
Action View<h1>Posts</h1><% @posts.each do |post| %>  <h2><%= post.title %></h2>  <h3>Created at <%= post.created_at %></h...
ActiveRecordOracle enhanced    adapter
Multi-platform support        oracle_enhanced adapter Ruby 1.8.7       Ruby 1.9.2      JRuby ruby-oci8        ruby-oci8   ...
Oracle Data Types    Ruby            Rails             Oracle    Fixnum          :integer        NUMBER     Float         ...
Existing database      schemasclass Employee < ActiveRecord::Base  set_table_name "hr_employees"  set_primary_key "employe...
PL/SQL calls from Ruby      (old way) require "oci8" conn = OCI8.new("hr","hr","xe") cursor = conn.parse <<-EOS BEGIN   :r...
ruby-plsql librarygem install ruby-plsqlrequire "ruby-plsql"plsql.connect! "hr","hr","xe"puts plsql.test_uppercase(xxx)
ruby-plsql libraryplsql.connect! "hr","hr","xe"plsql.test_uppercase(xxx)              # => "XXX"plsql.test_uppercase(:p_st...
class Employee < ActiveRecord::Base             set_create_method do               plsql.employees_pkg.create_employee(   ...
Demo
Ruby on Rails on Oracle    E-Business Suite             Request    RouterBrowser                                   Oracle ...
Additional  Ruby libraries    database_loaderoracle_ebs_authentication     ruby-plsql-spec
Deployment options                         Application source        Apache                                   Java app sev...
References
Rails on Oracle  E-Business Suitemytimemydatacrmdata
Why Rails?   Fast agile / iterative development   Test-driven development supportFlexible HTML/CSS/JavaScript front-endEas...
More information         Demo app source code:https://github.com/rsim/rails_ebs_demohttp://github.com/rsim/oracle-enhanced...
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
Nächste SlideShare
Wird geladen in …5
×

Extending Oracle E-Business Suite with Ruby on Rails

Presentation at Oracle OpenWorld 2011

  • Als Erste(r) kommentieren

Extending Oracle E-Business Suite with Ruby on Rails

  1. 1. Extending OracleE-Business Suite with Ruby on Rails
  2. 2. Raimonds Simanovskis github.com/rsim @rsim .com
  3. 3. Why to extend Oracle E-Business Suite?
  4. 4. Customize or extend functionality
  5. 5. Embed EBS data in other systems
  6. 6. Simplify and make usable
  7. 7. Simplify and make usable
  8. 8. Simplify and make usable
  9. 9. How to extend Oracle E-Business Suite?
  10. 10. Release 11, 1998 Custom Forms, Reports, PL/SQLPL/SQL
  11. 11. Self-Service Web Applications 11, 1998 PL/SQL generated web pagesPL/SQL
  12. 12. Self-Service WebApplications 11i, 2000 PL/SQL => JSP Java
  13. 13. OA Framework 11i, ~2005 JSP => full MVC framework Java
  14. 14. OA Framework 12, 2007 or maybe move to ADF? “My general advice is to stick with OAF solong 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. 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. 16. Do not blindly trust what Oracle isrecommending...
  17. 17. Many Open-Source Web TechnologiesCSS 3 Raphaël.js
  18. 18. What isRuby on Rails?
  19. 19. Ruby is object-oriented dynamic programming language simple from outside YukihiroMatsumoto or “Matz” powerful inside
  20. 20. Ruby on Rails Web applications development framework Developed in RubyExtracted from 37signals Basecamp application Open source software Focused on developer productivity Agile software development approach
  21. 21. Main principlesDRY - Don’t Repeat YourselfConvention over Configuration Opinionated software
  22. 22. MVC Architecture Request Router Database SQLBrowser Response Action Active Controller RecordAction View
  23. 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!endpost = Post.newpost.title = "First post"post.savepost = Post.find(1)puts post.name # output: "First post"
  24. 24. Action Controllerclass PostsController < ApplicationController def index @posts = Post.all end def show @post = Post.find(params[:id]) end def new @post = Post.new end # ...end
  25. 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 %>
  26. 26. ActiveRecordOracle enhanced adapter
  27. 27. Multi-platform support oracle_enhanced adapter Ruby 1.8.7 Ruby 1.9.2 JRuby ruby-oci8 ruby-oci8 JDBC
  28. 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 BLOBTrue/FalseClass :boolean NUMBER(1), CHAR(1)
  29. 29. Existing database schemasclass 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, :attribute2end
  30. 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. 31. ruby-plsql librarygem install ruby-plsqlrequire "ruby-plsql"plsql.connect! "hr","hr","xe"puts plsql.test_uppercase(xxx)
  32. 32. ruby-plsql libraryplsql.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) # => XXXplsql.hr.test_package.test_uppercase(xxx) # => XXXplsql.logoff
  33. 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. 34. Demo
  35. 35. Ruby on Rails on Oracle E-Business Suite Request RouterBrowser Oracle EBS Database Response XXAPP schema Action additional Controller application tables EBS module EBS module EBS module schemas EBS moduleAction schemas schemas schemas View APPS schema XXAPP_% views Active XXAPP_% packages Record
  36. 36. Additional Ruby libraries database_loaderoracle_ebs_authentication ruby-plsql-spec
  37. 37. Deployment options Application source Apache Java app sever Application WAR fileRuby mod_passenger JRuby Gems Application Application
  38. 38. References
  39. 39. Rails on Oracle E-Business Suitemytimemydatacrmdata
  40. 40. Why Rails? Fast agile / iterative development Test-driven development supportFlexible HTML/CSS/JavaScript front-endEasy to put on top of legacy applicationsLibraries for all new “cool” technologies Open-source with liberal license
  41. 41. More information Demo app source code:https://github.com/rsim/rails_ebs_demohttp://github.com/rsim/oracle-enhanced http://blog.rayapps.com

    Als Erste(r) kommentieren

    Loggen Sie sich ein, um Kommentare anzuzeigen.

  • ramakrishnarebbapragada

    Jan. 27, 2014
  • malhallaq

    Jun. 10, 2014

Presentation at Oracle OpenWorld 2011

Aufrufe

Aufrufe insgesamt

3.322

Auf Slideshare

0

Aus Einbettungen

0

Anzahl der Einbettungen

36

Befehle

Downloads

43

Geteilt

0

Kommentare

0

Likes

2

×