S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II

Page created by Josephine Hoffman
 
CONTINUE READING
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
Aino Andriessen
S319117 - WEBSERVICE BASED
BUSINESS COMPONENTS

 Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
AMIS

•   Systems integrator
•   Co-sourcing
•   Maintenance
•   Oracle, Java, Open Source, ADF, DBA, SOA
•   AMIS technology school
•   APS

•   http://www.amis.nl
•   http://technology.amis.nl/blog/
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
AINO ANDRIESSEN

Technical Consultant
Technical Architect
Java, ADF, PL/SQL, XML, ...
SOA , Integration
Software engineering
Quality management
Agile development

aino.andriessen@amis.nl
http://www.fttech.net
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
Aino Andriessen
S319117 - WEBSERVICE BASED
BUSINESS COMPONENTS

 Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
New App        Main App

 ADF                      Forms

          ws   ws
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
ADF ARCHITECTURE
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
ADF BUSINESS COMPONENTS 2

                           Application Modules
                 ViewObjects
ADF BC's
                           Entities

                 Tables and views
 Database
                                      Stored
                                      Procedures
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
ADF BUSINESS COMPONENTS 1

•   ORM
•   Entities
     – An entity object represents a row in a database table and
        simplifies modifying its data by handling all data manipulation
        language (DML) operations for you.
     – CRUD
•   ViewObjects
     – A view object represents a SQL query and simplifies working
        with its result.
     – CRUD
•   Application Modules
     – An application module is the transactional component that UI
        clients use to work with application data. It defines an
        updatable data model and top-level procedures and functions
        (called service methods) related to a logical unit of work
        related to an end-user task.
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
ADF BC 'DOMAINMODEL'

    Jobs
S319117 - WEBSERVICE BASED BUSINESS COMPONENTS - Aino Andriessen Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
CHALLENGE - 10G

•   The standard option is to base ADF BC's on database
    objects (tables, views).

•   Programmatic BC's allow other sources.
     – webservices, ref cursor, properties, etc.
     – but you must do all the work yourself
     – guidelines are available
CHALLENGE - 11G

•   Programmatic BC's

•   ADF BC's can be, natively, based on webservices
     – but only if they have a so-called service interface
         • avaliable with ADF BC based webservices
     – SDO
     – very new feature
DEMO

•   Let's demo the hard-way with programmatic BC's
•   Then the easy, future, way with SDO's
DEMO EXPLANATION

       •   A Webservice that provides access to jobs information.
       •   An ADF application to manage employees, that needs the
           jobs information to translate the jobId (AD_PRES) to a
           description (President).

                                                 WS Producer
                    UI

WS Consumer
                                                         Job
              Emp        Job
WEBSERVICE PRODUCER

•   Standard ADF BC's
•   Remote interface
•   AM client interface method
     – objects must be serializable
•   Pojo's
•   Deploy
WEBSERVICE CONSUMER

•   webservice proxy
     – standard client to access webservice
     – can easily be generated
DEMO CONTINUED
CHALLENGE
ACCESS WEBSERVICE
ADF app / WS Consumer

      JobEO                  JobsVw

              Programmatic                        WS Producer
                ResultSet

                        Pojo

                                      Generated       Job
                DataAccess
                                        Proxy
•   BaseClasses
     – Overriden methods
     – General methods
•   Utility classes
     – Hold retrieved data
     – Conversion
     – Service access via proxy
BASECLASSES

EntityBase                      VOBase
 doDML()                         create()
 doSelect()                      executeQueryForCollection()
                                 hasNextForCollection()
                   DataAccess
                                 createRowFromResultSet()
                                 getQueryHitCount()
                                 releaseUserDataForCollection()
JobEO
 insertRow()
 updateRow()
 deleteRow()        DAJobs
 getCurrentRow()
                                JobsVw
                                 getProgrammaticResultSet()
OVERRIDE METHODS

•   Entity
     – doSelect()
     – doDML()
•   ViewObject
     – create()
     – executeQueryForCollection()
     – hasNextForCollection()
     – createRowFromResultSet()
     – getQueryHitCount()
     – releaseUserDataForCollection()
         • viewlinkaccessors
CONVERTERS

•   Generic code
     – to support multiple objects
•   Represent data in tabular form (rows, colums)
     – ProgrammaticResultSet
SHORT WRAP UP

•   Producer
•   Consumer
     – ws proxy
     – programmatic BC's
     – override a few standard methods
     – lot of custom code, especially for conversion
SERVICE INTERFACE PRODUCER

•   Special webservice
     – Business Components service interface
•   Create on top of BC's
     – Create BC's
     – Enable service interface
•   VO's are published as SDO's
     – compare to custom POJO in 10g impl.
     – extends from org.eclipse.persistence.sdo.SDODataObject
•   Service is also available as EJB
•   Support for relations
SERVICE INTERFACE CONSUMER

     •   Create Entity
          – Service Interface entity
     •   Base VO on entity
     •   Include common jar from
         producer (with object
         definitions)
     •   Configure connection
SERVICE DATA OBJECT

•   Service Data Objects is a technology that allows
    heterogeneous data to be accessed in a uniform way.
     – The SDO specification was originally developed in 2004 as a
       joint collaboration between BEA and IBM and approved by
       the Java Community Process.
     – Version 2.0 of the specification was introduced in November
       2005 as key part of the Service Component Architecture.
•   Java standaard
•   Disconnected
ISSUES

•   Connection either via SOAP or EJB

•   Configuration

•   In webapp:
     – Only EJB works

     – SOAP will work in the next JDev version

•   Very new feature
SERVICE BASED WEBSERVICE
INTERACTION
•   WS datacontrol
•   WebService proxy
     – WSDL
•   Custom interaction
     – REST
        • Jersey Client
        • Commons HTTPClient
•   Business Components can be based on webservices but it's
    not a trivial exercise and requires a lot of work

•   Others have done it before so don't invent the wheel again.

•   It's much easier to use 11g service interface BC's, but they
    requires service interface webservices and are still under
    development, although almost done.
Aino Andriessen
S313467 - ADF BUILD PROCESS WITH
MAVEN AND HUDSON

 Thursday, September 23, 11:00 | Hotel Nikko, Peninsula
You can also read