c11: enabling your openedge ® application with web 2.0 ken wilner vp of technology
TRANSCRIPT
C11: Enabling Your OpenEdge® Application With Web 2.0
Ken WilnerVP of Technology
© 2008 Progress Software Corporation2
Content Producer
Content Consumers
Web 1.0 - Very Little Content Sharing
Web-based
Services
Users
Internet
© 2008 Progress Software Corporation3
Content Prosumers
Content Prosumers
Web 2.0 - Content Flows in All Directions
Web-based Services
Users
Internet
© 2008 Progress Software Corporation4
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
© 2008 Progress Software Corporation5
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
© 2008 Progress Software Corporation6
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
© 2008 Progress Software Corporation7
Agenda
A Walk Through Flickr’s Web 2.0 Interface REST RSS OpenEdge and Web 2.0
© 2008 Progress Software Corporation8
Demo - Walk Through Flickr’s Web 2.0 Interface
© 2008 Progress Software Corporation9
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
© 2008 Progress Software Corporation10
Agenda
A Walk Through Flickr’s Web 2.0 Interface REST RSS OpenEdge and Web 2.0
© 2008 Progress Software Corporation11
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)
© 2008 Progress Software Corporation12
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.
© 2008 Progress Software Corporation13
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
© 2008 Progress Software Corporation14
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
© 2008 Progress Software Corporation15
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
© 2008 Progress Software Corporation16
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” }
]}
© 2008 Progress Software Corporation17
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
© 2008 Progress Software Corporation18
Agenda
A Walk Through Flickr’s Web 2.0 Interface REST RSS OpenEdge and Web 2.0
© 2008 Progress Software Corporation19
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
© 2008 Progress Software Corporation20
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
© 2008 Progress Software Corporation21
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)
© 2008 Progress Software Corporation22
RSS Formats
© 2008 Progress Software Corporation23
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>
© 2008 Progress Software Corporation24
rsschannel
RSS Message Format
…
item
title
link
description
title
link
description
item
title
link
description
Channel Properties
List of items
© 2008 Progress Software Corporation25
RSS 2.0 – Building a Document
<rss version="2.0">
<channel>
[…]
</channel>
</rss>
© 2008 Progress Software Corporation26
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>
© 2008 Progress Software Corporation27
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>
© 2008 Progress Software Corporation28
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
© 2008 Progress Software Corporation29
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
© 2008 Progress Software Corporation30
Other RSS Formats
© 2008 Progress Software Corporation31
Agenda
A Walk Through Flickr’s Web 2.0 Interface REST RSS OpenEdge and Web 2.0
© 2008 Progress Software Corporation32
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
© 2008 Progress Software Corporation33
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
© 2008 Progress Software Corporation34
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
© 2008 Progress Software Corporation35
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
© 2008 Progress Software Corporation36
Things We’re Thinking About…
REST adapter for OpenEdge AppServer ABL HTTP and REST objects ProDataSet to JSON serialization RSS object
© 2008 Progress Software Corporation37
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!!
© 2008 Progress Software Corporation38
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