1 / 33

CON4285 - A Whole New World: How to Build Web Services From Your Existing ADF Applications

CON4285 - A Whole New World: How to Build Web Services From Your Existing ADF Applications. Frédéric Desbiens Principal Product Manager Application Development Tools.

gram
Download Presentation

CON4285 - A Whole New World: How to Build Web Services From Your Existing ADF Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CON4285 - A Whole New World: How to Build Web Services From Your Existing ADF Applications Frédéric DesbiensPrincipal Product ManagerApplication Development Tools

  2. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

  3. Program Agenda • Why Should You Do This? • Service Concepts • Choosing a Web Service Style • Building Services From Your Application

  4. Why Should You Do This? • To break application silos • Align priorities • Favour information flow • Coordinate decisions • To support your Mobile apps • To fight the development gap Development Gap Development Resources Application Needs Time

  5. Service concepts

  6. What Is a Service? • A publicized package of functionality • Can be discovered by potential consumers • Described by metadata • Usage usually governed by a service contract • Technical interface (signature) • Semantics • Non-functional requirements (SLAs, …)

  7. What Is a Service? From a technical standpoint • Implementation • Deployed code • Configuration of the infrastructure • Interface • Means by which the service in invoked • Contract • Description (what the service provides) and constraints • Not a specific technology or platform

  8. The Enterprise Service Bus A specific approach to build a SOA • Message-driven backbone • Abstracts communication between services • Central duties: • Messaging (store-and-forward delivery) • Data transformation (XML to XML) • Content-based routing (publish/subscribe) • « Fire and forget » pattern

  9. Core SOA Tenets • Service decoupling • Asynchronous processing • Statelesness • Encapsulation • Service Facade pattern

  10. Choosing a web service style

  11. Three words to know • SOAP • XML based web services protocol • REST (RepresentationalState Transfer) • Architectural style based on HTTP • JSON (JavaScript Object Notation) • Text-based format derived from JavaScript

  12. SOAP Main characteristics • Extensible • Neutral (towards transport protocols) • HTTP • SMTP • JMS • Independent • Support for any programming model • W3C recommendation

  13. SOAP Consuming a service Client • Client APIs are usually generated by tools from the WSDL • In JDeveloper, the WSDL will be generated for service-oriented App Modules API SOAP WSDL Definition Endpoint Service

  14. The WS-* extensions OASIS standards • Messaging • WS-Addressing (support for non-HTTP protocols) • WS-ReliableMessaging • Security • WS-Security: integrity, confidentiality, security tokens • WS-Trust: issue, renewal and validation of tokens • WS-SecureConversation: creation and sharing of security contexts • WS-AtomicTransaction: Two-phase commit for ACID transactions

  15. REST • Uses some of the standard HTTP methods (verbs) • GET (Retrieve) • POST (Create/Update resource subordinate) • PUT (Create/Update full resource) • DELETE (Delete) • Each resource resolves to an URI • Results should be cacheable GET http://www.oracle.com:8080/Customers/12345

  16. REST Consuming a service Client • No standard API. • No standard definition language for the interface • JDeveloper‘s Web Service and URL Data controls mitigate both issues • We aim to make App Modules exposable as REST services in a future 12c release API HTTP Endpoint Service

  17. JSON REST doesn’t mandate a data format. Here’s a contender • Derived from JavaScript (Data structures, Associative arrays) • Language-independent http://api.rottentomatoes.com/api/public/v1.0/movies/770672122.json?apikey=[key] { "id": 770672122, "title": "Toy Story 3", "year": 2010, "genres": [ "Animation", "Kids & Family", "Science Fiction & Fantasy", "Comedy" ], "mpaa_rating": "G", … }

  18. Which one should I choose? • SOAP • Enterprise-grade features • Broad standardization and interoperability • Based on XML (verbose, slower to process) • REST • Simpler • Better performance and scalability

  19. Which one should I choose? Both! It all depends on the use case • Is the service about data or business logic? • REST is a natural choice for data • SOAP is better for complex logic • Do you need the Enterprise-grade features of WS-* ? • Think about the development team • Easy to work with both in ADF Business Components 12c

  20. Building Services From Your ADF Application

  21. Conflicting Requirements Meeting the SLA Low response time Application Clients Consumers

  22. The service facade pattern Facade Business logic User Interface Clients Consumers Data

  23. The service facade pattern A possible ADF implementation AM 1 JSF Lib Model VO EO VO VO VO EO VO VO Task Flows EO EO AM 2 AM n AM Facade UI Logic

  24. EXAMPLE Graphic Section Divider

  25. What to do? • Messages should represent forms or documents, not objects • Keep network calls at a minimum • Network transit takes time • Favour services with a high level of granularity • Consumers shouldn’t have to make several calls in a row for a single transaction

  26. What to avoid? • Stringent SLAs for non-mission critical applications • Service calls to access local resources • Creating a service for a single consumer • Polluting messages with implementation details • Using database transactions spanning several service calls (if possible)

  27. Conclusion Is it worth it? • Pros • Higher productivity • Better code quality • Clear separation of concerns • Encapsulation • Potential for better performance • Cons • More complex • Service layer requirements influence the application’s lifecycle

  28. Q&A

  29. Join the Oracle ADF Community http://oracle.com/ADF @jdeveloper@BlueberryCoder JDeveloper /jdeveloper ADF Insider ADF Architecture

  30. Learn More at Oracle OpenWorld Related sessions and labs Oracle ADF booth at the Oracle Demo Ground – Moscone South

More Related