SOA-4: Introduction to OpenEdge ® Integration Technologies Jamie Townsend Applied Architect.
SOA-4: Enabling Your OpenEdge ® Application With Web 2.0 Ken Wilner Vice President of Technology.
-
Upload
janis-heath -
Category
Documents
-
view
214 -
download
0
Transcript of SOA-4: Enabling Your OpenEdge ® Application With Web 2.0 Ken Wilner Vice President of Technology.
SOA-4: Enabling Your OpenEdge® Application With Web 2.0
Ken WilnerVice President of Technology
2 © 2008 Progress Software Corporation
Content Producer
Content Consumers
Web 1.0 - Very Little Content Sharing
Web-based
Services
Users
Internet
3 © 2008 Progress Software Corporation
Content Prosumers
Content Prosumers
Web 2.0 - Content Flows in All Directions
Web-based Services
Users
Internet
4 © 2008 Progress Software Corporation
Web 2.0 Core Principles
User generated content Harnessing the power of the crowd Data on an epic scale Architecture of participation Network effects Openness – easy to access
What Is Web 2.0?, Design Patterns and Business Models for the Next Generation of Software, Tim O'Reilly, http://www.oreilly.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html
What is Web 2.0? Ideas, technologies, and implications for education, Paul Anderson, http://www.jisc.ac.uk/media/documents/techwatch/tsw0701b.pdf
Collaboration, Contribution, and Community
5 © 2008 Progress Software Corporation
Mashups
Combining data from a web-based service with your application or another web-based service
Types:• Client-side
– Presentation focused– Browser-based using Javascript, e.g. Google maps.
• Server-side– Data focused– Using your preferred programming language or
specialized tools to access service via standard protocol (api)
Applications Leveraging the Power of Web 2.0
6 © 2008 Progress Software Corporation
Web 2.0 Mashups- Impact on an OpenEdge Application
Mashup Web 2.0 services with your application• Learn the api
• Use a standard protocol
Make your application mashable• Follow the “openness principle”
• Easy to access in lots of ways using standard protocols
7 © 2008 Progress Software Corporation
Agenda
A Walk Through Flickr’s Web 2.0 Interface REST RSS OpenEdge and Web 2.0
8 © 2008 Progress Software Corporation
Demo - Walk Through Flickr’s Web 2.0 Interface
9 © 2008 Progress Software Corporation
Flickr - Open and Easy to Access
Traverse the website Access content directly
• Simple to understand URL Access programmatically
• Well-documented API
• Access via REST Be notified of changes
• Use RSS
10 © 2008 Progress Software Corporation
Agenda
A Walk Through Flickr’s Web 2.0 Interface REST RSS OpenEdge and Web 2.0
11 © 2008 Progress Software Corporation
REST
Representational State Transfer Design pattern based on existing Web
capabilities – HTTP Resources, methods, representations Lots of nouns (resources) with a few verbs
(methods) – compare with Web Services (RPC)
12 © 2008 Progress Software Corporation
Resources
The thing you are acting on, e.g. an employee, a collection of photos, etc.
Unique URL for each entity (resource)
Resources can be nested, e.g. employee last name
Format:http://<host>/<path>?<query>
• Host - location of resource• Path - name of resource• Query - filters the resource, indicates
response format, etc.
13 © 2008 Progress Software Corporation
Resources - Examples
http://www.domain.com/employees • all employees
http://www.domain.com/employees/17624• employee 17624
http://www.domain.com/employees/17624/lastname• last name attribute of employee 17624
http://www.domain.com/employees/17624?format=xml• Return the result in xml format
http://www.domain.com/employees?location=France• Only the employees in France
14 © 2008 Progress Software Corporation
REST – CRUD Methods
HTTP Method Meaning
POST Create (Update)
GET Read
PUT Update (Create)
DELETE Delete
Examples:
GET http://www.domain.com/employees• Get all employees
DELETE http://www.domain.com/employees/17624• Delete employee 17624
PUT http://www.domain.com/employees/17624/state• Update the state attribute of employee 17624
15 © 2008 Progress Software Corporation
Representation
Format of the resource – any well-known content type, e.g.• XML - most popular
• JSON - becoming popular
• JPEG
• HTML
• Text Contains links to other resources where
appropriate
16 © 2008 Progress Software Corporation
Representation - Example
GET http://www.domain.com/employees?limit=3
XML:
<Employees>
<Employee id=“17624” href=“http://www.domain.com/employees/17624” />
<Employee id=“62371” href=“http://www.domain.com/employees/62371” />
<Employee id=“63412” href=“http://www.domain.com/employees/63412” />
</Employees>
JSON:
{“Employees”:[
{“id”: “17624”,”ref”: “http://www.domain.com/employees/17624” },
{“id”: “62371”,”ref”: “http://www.domain.com/employees/62371” },
{“id”: “63412”,”ref”: “http://www.domain.com/employees/63412” }
]}
17 © 2008 Progress Software Corporation
Flickr - Examples
GET http://www.flickr.com/photos/kenwilner• Ken Wilner’s photos in HTML
GET http://www.flickr.com/photos/kenwilner/2521135043/ • Ken Wilner’s photo number 2521135043 in HTML
GET http://api.flickr.com/services/rest/?method=flickr.photos.search&
api_key=d7c94440fdce1b53a39b071f471b74a0&user_id=65153788%40N00
• Ken Wilner’s photos in XML Not very RESTfulWhy not?
GET http://www.flickr.com/photos/kenwilner&api_key=d7c94440fdce1b53a39b071f471b74a0&format=XML
18 © 2008 Progress Software Corporation
Agenda
A Walk Through Flickr’s Web 2.0 Interface REST RSS OpenEdge and Web 2.0
19 © 2008 Progress Software Corporation
RSS – Really Simple Syndication
Used to publish frequently updated web content Typically, used with news items, weblogs, web
site updates, company announcements, etc. Can reference any digital content, i.e. anything
that has a URL – use REST Easy access to all updated information from
one place
20 © 2008 Progress Software Corporation
RSS Concepts
Web Server Application
RSS File
Syndicate
www.mysite.com
RSSReader
RSSReader
GET http://www.mysite.com
Response (RSS file)
RSSCache
Subscribe www.mysite.co
m Subscriptions: www.mysite.com
www.cnn.com
Aggregate
Syndication – publishing something – dynamically or statically
Subscription – saying what you are interested in
Aggregation – fetching what you are interested in
12
3
4
Read
21 © 2008 Progress Software Corporation
Syndication - Readers
Browser-based • Firefox
– Live Bookmarks– Wizz RSS add-on
• Internet Explorer – V7
Desktop• infoRSS (http://inforss.mozdev.org)• NewzCrawler (http://www.newzcrawler.com)
E-mail client• Outlook 2007
Web-based• Bloglines (http://www.bloglines.com)• Google (http://www.google.com/reader)
Multiple formats• Newsgator (http://www.newsgator.com)
Summary information on multiple readers• RSS Compendium (http://www.allrss.com)
22 © 2008 Progress Software Corporation
RSS Formats
23 © 2008 Progress Software Corporation
RSS 2.0
<rss version="2.0“ …>
<channel>
<title>Uploads from kcdubya, tagged tahoe</title>
<link>http://www.flickr.com/photos/kenwilner/tags/tahoe/</link>
<description></description>
<item>
<title>Tahoe-73</title>
<link>http://www.flickr.com/photos/kenwilner/2521135043/</link>
<description><p><a href="http://www.flickr.com/people/kenwilner/" … </description>
</item>
<item>
<title>Tahoe-38</title>
<link>http://www.flickr.com/photos/kenwilner/2521953972/</link>
<description><p><a href="http://www.flickr.com/people/kenwilner/" … </description>
</item>
<item>
<title>Tahoe-52</title>
<link>http://www.flickr.com/photos/kenwilner/2521134919/</link>
<description><p><a href="http://www.flickr.com/people/kenwilner/" … </description>
</item>
</channel>
</rss>
24 © 2008 Progress Software Corporation
rsschannel
RSS Message Format
…
item
title
link
description
title
link
description
item
title
link
description
Channel Properties
List of items
25 © 2008 Progress Software Corporation
RSS 2.0 – Building a Document
<rss version="2.0">
<channel>
[…]
</channel>
</rss>
26 © 2008 Progress Software Corporation
RSS 2.0 Channel Attributes
<rss version="2.0">
<channel>
<title>Uploads from kcdubya, tagged tahoe</title>
<link>http://www.flickr.com/photos/kenwilner/tags/tahoe/</link>
<description></description>
[…]
</channel>
</rss>
27 © 2008 Progress Software Corporation
RSS 2.0 Items
<rss version="2.0“ …> <channel>
<title>Uploads from kcdubya, tagged tahoe</title>
<link>http://www.flickr.com/photos/kenwilner/tags/tahoe/</link> <description></description> <item>
<title>Tahoe-73</title> <link>http://www.flickr.com/photos/kenwilner/2521135043/</
link> <description> <p><ahref="
http://www.flickr.com/people/kenwilner/" …</description>
</item>[…]
</channel> </rss>
28 © 2008 Progress Software Corporation
RSS 2.0 – Channel Property Elements
Property Description
title* Name of the site or blog that the feed refers to
link* URL of the site that associated with the feed
description* Description of the feed
category A self-described category for the feed. Used for sorting. Can be multiple.
cloud Used by consumer to register a Web service to be called when feed is updated.
copyright Copyright of feed
image Image to display with feed
language Language of feed, e.g. en-us
pubDate Publication date for feed
skipDays Days of week when the feed is not expected to be updated
lastBuildDate The last time the content of the channel changed.
ttl Indication of how often to check for content
* Required
Selected Elements
29 © 2008 Progress Software Corporation
RSS 2.0 – Item Elements
Property Description
title* Title for the item
link* URL of the item
description* Summary description of the item
comments URL of a Web page where you can enter a comment about the page
enclosure Specifies a media object, e.g. mp3 podcast, associated with the item
guid Uniquely identifies the item within the feed. Used to detect updates to items.
author E-mail address of author of item
pubDate Date and time of publication
source The title and URL of the feed
category A self-described category for the feed. Used for sorting. Can be multiple.
* Typically specified
Selected Elements – All Theoretically Optional
30 © 2008 Progress Software Corporation
Other RSS Formats
31 © 2008 Progress Software Corporation
Agenda
A Walk Through Flickr’s Web 2.0 Interface REST RSS OpenEdge and Web 2.0
32 © 2008 Progress Software Corporation
OpenEdge and Web 2.0 Examples
REST• A library system which locates a book on
Amazon.com
• An HR system that searches sites like Monster.com and Careerbuilder.com for potential candidates
RSS• A financial site that fetches relevant news feeds for
some financial news site
• A travel site that fetches the latest photos from Flickr.com
Mashup REST and RSS Services
33 © 2008 Progress Software Corporation
OpenEdge and Web 2.0
Use sockets to communicate with HTTP service• Progress Knowledge Base Solution ID: 20011
and p125506
XML-based service• DOM
• SAX
Mashup REST and RSS services
34 © 2008 Progress Software Corporation
OpenEdge and Web 2.0 Examples
REST• Anything you can do with Web Services
RSS• A shipping system that indicates the status of
an order• A data warehouse system that indicates when
there is some critical problem in the warehouse
Expose Your Application as a Web 2.0 Service
35 © 2008 Progress Software Corporation
OpenEdge and Web 2.0
Use AppServer™ with Web Services Use WebSpeed for REST and RSS
• REST – for simplified access– Design with simple well-defined URLs– Manipulate resources using HTTP verbs– Use DOM or SAX parser to build XML document– Consider also supporting JSON– Use CGI and modify script to convert URL to
WebSpeed URL• RSS – a powerful notification mechanism
– Use DOM or SAX parser to build RSS document– Use REST principles to point back to key resources
Expose Your Application as a Web 2.0 Service
36 © 2008 Progress Software Corporation
Things We’re Thinking About…
REST adapter for OpenEdge AppServer ABL HTTP and REST objects ProDataSet to JSON serialization RSS object
37 © 2008 Progress Software Corporation
In Summary
Web 2.0 – the web is a platform
Extend the value of your application with Web 2.0 technologies
Open up your application in lots of ways
Consider using REST to simplify access
Leverage RSS as a very powerful notification mechanism
Leap ahead of the
competition!!
38 © 2008 Progress Software Corporation
For More Information, go to…
Books• Beginning RSS and Atom Programming, Danny Ayers
and Andrew Watt, Wrox Press, 2005• How to Do Everything with Web 2.0 Mashups, Jesse
Feiler, McGraw Hill, 2008• Pro Web 2.0 Mashups, Raymond Lee, Apress, 2008
Web Sites• O'Reilly -- What Is Web 2.0
http://www.oreilly.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html
• ProgrammableWebhttp://www.programmableweb.com/
39 © 2008 Progress Software Corporation
Questions?
40 © 2008 Progress Software Corporation
Thank You
41 © 2008 Progress Software Corporation