restful feb2012 final 3
DESCRIPTION
Servicios web, tecnología RESTTRANSCRIPT
![Page 1: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/1.jpg)
Nik Kesic,Lead Technical Support for Rocket U2
Take a Load Off withU2 RESTful Web Services
![Page 2: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/2.jpg)
2
Orange arrow = control GoTo Webinar control panel
This webinar will be recorded and posted to ourRocket U2 web site for you to replay at a later date You will be notified via email once .pdf and video are posted
If using phone – don’t select “Use Mic & Speakers”
All attendees are muted during the presentation
Brief Q&A session – after the presentation
Webinar Opening Procedure
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 3: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/3.jpg)
3
Joined Unidata in 1995
ATS (Advanced Technical Support), U2 Clients and DBTools
Provides consultancy, Level 3 support and training
Published articles on web enablement using U2 WebDE, Sockets, XML, SOAP, SSL and Encryption
MCP (Microsoft Certified Professional) in networks
Nik Kesic’s Biography
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 4: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/4.jpg)
4
A push towards newer web technology
Modern programming language agnostic
Decoupling database interface
Webinar Origins
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 5: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/5.jpg)
5
URL or URN or maybe URI
Web Services
SOAP vs. REST
REST and RESTful
REST Architecture
RESTful Methods
HTTP Authentication
Agenda 1 of 2
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 6: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/6.jpg)
6
Resource
Service
Representation
State
Reveal/Expose
Consume
Definitions
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 7: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/7.jpg)
7
URL or URN or maybe URI Diagram
©2012 Rocket Software, Inc. All Rights Reserved.
URL is often used as a synonym for URI
![Page 8: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/8.jpg)
8
URN - Uniform Resource Name Functions like a person's name
URL - Uniform Resource Locator Resembles that person's street address
URI - Uniform Resource Identifier Strings of characters used to identify a name or a
resource Can be classified as locators (URLs), as names
(URNs), or as both
Protocol – http, ftp, file, etc.
URL / URN / URI Defined
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 9: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/9.jpg)
9
Web Services
Web services provide a standardmeans of interoperating between different software applications, running on a variety of platforms and/or frameworks.
Unlike a browser, a web service is a web page that is consumed by an autonomous program.
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 10: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/10.jpg)
10
Enterprise View of Web Services
©2012 Rocket Software, Inc. All Rights Reserved.
The Enterprise
Web ServerDatabases
BackendServer/System
![Page 11: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/11.jpg)
11
Today’s View of Web Services
©2012 Rocket Software, Inc. All Rights Reserved.
The Enterprise
BackendServer/System
Web Server
![Page 12: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/12.jpg)
SOAP vs. RESTUnless you have a reason
to use SOAP …..use REST
![Page 13: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/13.jpg)
13
REST and RESTful REST: (Representational State Transfer) software
architecture style of networked systems such as the World Wide Web
RESTful: Systems that follow REST principles.
RESTful web services has become a popular way to build and consume Web services
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 14: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/14.jpg)
14
RESTful Example
©2012 Rocket Software, Inc. All Rights Reserved.
RESTfulService
ClientApplication
{“price”:”$21.99”}
../ShippingCost?Zip1=80202&Zip2=90210
Web Services Are JustInformation, Not Presentation
What does it cost to ship from ZIP code 80202
to 90210?
![Page 15: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/15.jpg)
15
U2 REST Architecture
©2012 Rocket Software, Inc. All Rights Reserved.
ClientHTTP {JSON}
HTTP U2 REST Server
(JETTY)
U2JPA
UOJ U2 DBServer
* U2JPA – U2 Java Persistence Architecture
Attribute PRICE, ZIP1, ZIP2Returns 21.99
../ShippingCost?Zip1=80202&Zip2=90210
{“price”:”$21.99”}
![Page 16: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/16.jpg)
16
Request MethodsREST – Uses HTTP Methods (CRUD) to Access Business Logic
©2012 Rocket Software, Inc. All Rights Reserved.
Operation SQL HTTP/REST
Create INSERT POSTRead (Retrieve) SELECT GETUpdate UPDATE PUTDelete (Destroy) DELETE DELETE
![Page 17: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/17.jpg)
17
HTTP AuthenticationHTTP Authentication is a method for a web browser or other client program to provide a user name and password when making a request
U2 RESTful Web Services support both Basic and Digest Access Authentication
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 18: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/18.jpg)
18
U2 REST Architecture
©2012 Rocket Software, Inc. All Rights Reserved.
U2 Resource Mapping• Customer• States • Subroutine• ….
U2 DB Components• UniVerse
• HS.SALES• UniData
• Demo
Any HTTP Client
Python, JavaScriptU2 BASIC, .NET, Java,Jython, Ruby, etc
U2 REST Server (JETTY)
Access control&
Authentication
Response / Data
CRUD Request
![Page 19: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/19.jpg)
19
U2 DBToolsJSONHTTP Authentication Data Access ControlSecurityDeploymentMonitoringResources
Agenda 2 of 2
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 20: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/20.jpg)
The New U2 DBTools ReleaseIncludes U2 RESTful Web
Services Developer –And it is a FREE download!
![Page 21: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/21.jpg)
21
New U2 DBTools just released Configures RESTful Web ServicesSimilar to SOAP WSD Native U2 integration Wizard based Test facilities for data and subroutine resources Deployment ADE (Automatic Data Encryption) not supported
naturally SB+ data support Remote monitoring
U2 RESTful Web Services Developer
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 22: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/22.jpg)
22
U2 to REST Mapping
![Page 23: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/23.jpg)
23
U2 RESTful Web Services Developer
![Page 24: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/24.jpg)
24
JSON (JavaScript Object Notation) is a lightweightdata-interchange format Easy for humans to read and write Easy for machines to parse and generate
Properties of an Object: Defined as an unordered set of name/value pairs Begins with { (left brace) and ends with } (right brace). Each objects’ name (property, field, attribute) is followed by : (colon) Each object’s name/value pairs are separated by , (comma).
What is JSON?
http://json.org/
![Page 25: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/25.jpg)
25
JSON – JavaScript Object Notation
JavaScript is native to all browsers
Can handle from very simple to complex structures
U2 RESTful Web Services Uses JSON
![Page 26: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/26.jpg)
26
REST Web Service – Customer Rec
©2012 Rocket Software, Inc. All Rights Reserved.
HTML Response
Request URL
![Page 27: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/27.jpg)
27
REST Web Service - Member
©2012 Rocket Software, Inc. All Rights Reserved.
JSON Response
![Page 28: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/28.jpg)
28
HTTP AuthenticationBasic Authentication:
Based on HTTP/1.0 specification
User passwords are sent in simple base64 ENCODING (not ENCRYPTED)
Digest Authentication:
User passwords are sent in an ENCRYPTED which is much more secure
U2 REST server enforces a qop=auth
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 29: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/29.jpg)
29
Data Access Control
User+Password+Roledefines which CRUD method(s) are allowed for that resource
Users can be assigned one of more roles
User roles are defined by grouping a set of user privileges together
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 30: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/30.jpg)
30
SSL SecurityU2 REST supports SSL connections
between the U2 REST server and its clients
U2 REST supports SSL connections between the U2 REST server and the U2 database server
Tools needed to implement XAdmin and Java keytool
Security
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 31: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/31.jpg)
31
Platform independent
Java JRE 1.6 required
.bat and .sh files
Start and Stop U2 RESTful Server
Change Deployment setting after deployment SSL implementation / changes Access control Database properties
U2 RESTful Web Services Deployment
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 32: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/32.jpg)
32
Turn Debug ON/OFF
View RESTful Server log files
Stop U2 RESTful Server
Remote Monitoring
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 33: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/33.jpg)
33
Test Tools Fiddler – www.fiddler2.com REST Client – www.WizTools.org
Client Tools Python – www.python.org/ Jython – www.jython.org/U2 Samples – In the U2 RESTFul pdf
Resource Tools
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 34: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/34.jpg)
34
RESTful Client Tools
©2012 Rocket Software, Inc. All Rights Reserved.
Readily available JSON viewers can help
organize info
Readily available JSON viewers can help
organize info
![Page 35: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/35.jpg)
35
U2 Client Sample Code
Source U2U 2012 iPhone
Android
UDO BASIC(U2 Dynamic Objects)
BASIC
Python
JQuery
Jscript
Ruby
PHP
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 36: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/36.jpg)
36
U2 REST Pass-through & UDO
U2 REST Pass-through Enables: UDO object data structure strictly follows JSON specification
UDO object structure that supports unlimited nesting levels, make it easier to consume web services
UDO provides convenient data structures available in more modern languages
UDO is a new data format to transfer data between server and client
UDO defines a new subroutine parameter type, easier to publish a subroutine as web service
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 37: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/37.jpg)
For a guided tour of U2 RESTful Web Services…You are invited to join us at U2 University 2012
![Page 38: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/38.jpg)
38
U2U 2012 Preview
![Page 39: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/39.jpg)
39
Question and Answer Session
Or you may email us your question later at:[email protected]
Or you may email us your question later at:[email protected]
To ask a question:• Click on hand icon with
green arrow and we will call your name
For more information on Professional Services email: [email protected]
For more information on Professional Services email: [email protected]
![Page 40: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/40.jpg)
40
Rocket Software http://www.rocketsoftware.com/u2 U2 Support – DeveloperZone
Microsoft http://www.microsft.com and http://www.msdn.com Apple http://developer.apple.com Android – http://www.android.com and http://www.eclipse.org Java – http://www.oracle.com Help – http://www.google.com and http://wikepedia.com Books Articles U2 Education U2 Professional Services – Quick Start Email questions to [email protected]
References and Resources
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 41: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/41.jpg)
41
The following are trademarks or registered trademarks of Rocket Software, Inc.: Dynamic Connect, SystemBuilder, U2, U2 Web Development Environment, UniData, UniVerse, and wIntegrate.IBM, the IBM logo, AIX, and DB2 are trademarks of IBM in the United States and other countries.Oracle and Java are registered trademarks of Oracle and/or its affiliates. Microsoft, SQL Server, Windows, and Excel are trademarks of the Microsoft group of companies. UNIX is a registered trademark of The Open Group.Other company, product, and service names mentioned herein may be trademarks or service marks of others.
Trademarks and Acknowledgements
©2012 Rocket Software, Inc. All Rights Reserved.
![Page 42: RESTful Feb2012 Final 3](https://reader033.vdocuments.net/reader033/viewer/2022042822/55cf99f3550346d0339fda74/html5/thumbnails/42.jpg)
Thank you!