SOA41 Enabling Your Open Edge Application With Web
SOA-41: Enabling Your Open. Edge® Application With Web 2. 0 Ken Wilner VP of Technology
Web 1. 0 - Very Little Content Sharing Content Consumers Content Producer Internet Web-based Services Users Very little content creation or sharing 2 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Web 2. 0 - Content Flows in All Directions Content Prosumers Users Web-based Services 3 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 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/tsw 0701 b. pdf 4 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Web 2. 0 Mashups- Impact on an Open. Edge Application § Mashup Web 2. 0 services with your application • Use Flickr™, You. Tube, Google® Maps, Amazon Flexible Payment Service, etc. § Make your application mashable • Follow the “openness principle” • Easy to access in lots of ways 5 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Agenda § A Walk Through Flickr’s Web 2. 0 Interface § Web 2. 0 Mashup Technologies § Open. Edge and Web 2. 0 6 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Demo - Walk Through Flickr’s Web 2. 0 Interface 7 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 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 8 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Agenda § A Walk Through Flickr’s Web 2. 0 Interface § Web 2. 0 Mashup Technologies § Open. Edge and Web 2. 0 9 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Web 2. 0 Mashup Technologies § REST § RSS 10 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 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) 11 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 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. 12 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 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 13 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
REST - Methods HTTP Method Meaning GET Read PUT/POST 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 14 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 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 15 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Representation - Example GET http: //www. domain. com/employees? limit=3 <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> 16 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 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 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS – Really Simple Syndication § Used to publish frequently updated 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 18 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS Concepts Aggregate 4 3 GET http: //www. mysite. com Read RSS Reader www. mysite. com Web Server Response (RSS file) Syndicate 2 Subscribe www. mysite. com Application Subscriptions: RSS www. mysite. com Cache www. cnn. com 1 RSS File Syndication – publishing something – dynamically or statically Subscription – saying what you are interested in Aggregation – fetching what you are interested in 19 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Syndication - Readers § Browser-based § Web-based • Firefox – Live Bookmarks – Wizz RSS add-on • Internet Explorer – V 7 § Desktop • Bloglines (http: //www. bloglines. com) • Google (http: //www. google. com/reader) § Multiple formats • Newsgator • info. RSS (http: //www. newsgator. com) (http: //inforss. mozdev. org) • Newz. Crawler (http: //www. newzcrawler. com) § http: //www. allrss. com • Good info on the various readers § E-mail client • Outlook 2008 20 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS Formats RSS 2. 0 • Userland • http: //blogs. law. harvard. edu/tech/rss • Released in 2003 • Also, RSS 0. 91(2000) and 0. 92 (2000) Atom 1. 0 • IETF Standard • http: //tools. ietf. org/html/rfc 4287 • Released in 2005 RSS 1. 0 • RSS-DEV • http: //web. resource. org/rss/1. 0/spec • Released in 2000 21 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 <? xml version="1. 0" encoding="UTF-8"? > <rss version="2. 0"> <channel> <title>My First RSS Feed</title> <link>http: //localhost</link> <description>This is a test feed to show simple RSS… </description> <item> <title>Inventory Management</title> <link>http: //localhost/getstatus. p? getpackage =73492</link> <description>Your package has shipped!! </description> </item> <title>Nashua News</title> <link>http: //www. nashuatelegraph. com/</link> <description>All the news that Nashua has to offer </description> </item> <title>Progress News</title> <link>http: //newsroom. progress. com/phoenix. zhtml ? . . . </link> <description>All the news you need to know about Progress </description> </item> </channel> </rss> 22 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS Message Format rss channel title link Channel Properties description item title link description … List of items item title link description 23 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 – Building a Document <rss version="2. 0"> <channel> […] </channel> </rss> 24 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 Channel Attributes <rss version="2. 0"> <channel> <title>My First RSS Feed</title> <link>http: //localhost</link> <description>This is a test feed to…</description> […] </channel> </rss> 25 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 Items <rss version="2. 0"> <channel> <title>My First RSS Feed</title> <link>http: //localhost</link> <description>This is a test feed to…</description> <item> <title>Inventory Management</title> <link>http: //localhost/scripts/cgiip. exe/ WService=wsbroker 1? getpackage=73492</link> <description>Your package has shipped!!</description> </item> … </channel> </rss> 26 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 – Channel Property Elements Selected 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 pub. Date Publication date for feed skip. Days of week when the feed is not expected to be updated last. Build. Date The last time the content of the channel changed. ttl Indication of how often to check for content * Required 27 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 – Item Elements Selected Elements – All Theoretically Optional 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. mp 3 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 pub. 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 28 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 - Extensions § A mechanism for adding additional application specific information § Use a namespace § Readers • Process namespaces they understand • Ignore ones they don’t § Allows feed to be repurposed for specialized readers, e. g. • ITunes http: //www. apple. com/itunes/store/podcaststechspecs. html • Flickr http: //search. yahoo. com/mrss 29 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 – ITune Extension […] <rss version="2. 0" xmlns: npr="http: //www. npr. org/rss/" xmlns: itunes="http: //www. itunes. com/dtds/podcast-1. 0. dtd" … > <channel> <title>NPR: 10 AM ET News Summary Podcast</title> <link>http: //www. npr. org/templates/topic. php? topic. Id=1001</link> <description>A five-minute NPR News summary you can take with you. </description> […] <itunes: summary> A five-minute NPR News summary you can take with you. </itunes: summary> <itunes: subtitle> NPR News Summary. More NPR podcasts at NPR. org/podcasts. </itunes: subtitle> <itunes: author>National Public Radio</itunes: author> <itunes: keywords> NPR, National Public Radio, Morning Newscast 10 AM ET, Morning Edition, All Things Considered, Fresh Air </itunes: keywords> […] 30 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
RSS 2. 0 – ITune Extension […] <image> <url>http: //[…]/npr_newscast_10 am_image_75. jpg</url> <title>10 AM ET News Summary Podcast</title> <link>http: //www. npr. org/templates/topic. php? topic. Id=1001</link> </image> <itunes: category text="News & Politics"/> […] <itunes: image href="http: //[. . . ]/npr_newscast_10 am_image_300. jpg"/> <item> <title>NPR News: 04 -13 -2008 10 AM ET</title> <description>NPR News: 04 -13 -2008 10 AM ET</description> […] <itunes: summary>NPR News: 04 -13 -2008 10 AM ET</itunes: summary> <itunes: keywords> NPR, National Public Radio, NPR News 04 13 2008 10 AM ET, </itunes: keywords> <enclosure url="http: //[. . . ]/npr_89599901. mp 3" length="100000" type="audio/mpeg"/> </item> </channel> </rss> 31 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Other RSS Formats Atom 1. 0 • Functionally similar to RSS 2. 0 • Puts everything in a namespace • Cleans up ambiguous aspects, e. g. use of • • text, HTML, XHTML Standardizes certain formats, e. g. date Includes a REST-style publishing protocol RSS 1. 0 • A specialization of RDF • Functionally similar to RSS 2. 0 32 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Agenda § A Walk Through Flickr’s Web 2. 0 Interface § Web 2. 0 Mashup Technologies § Open. Edge and Web 2. 0 33 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Web 2. 0 and Your Open. Edge Mashup REST and RSS services § Use sockets to connect to HTTP service § XML-based service • De-serialize using Pro. Data. Sets • DOM • SAX § JSON-based service • Pass-through to browser using Web. Speed® 34 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Web 2. 0 and Your Open. Edge Expose Your Application as a Mashable Service § Use App. Server™ with Web services § Use Web. Speed for REST and RSS • REST – for simplified access – Design with simple well-defined URLs – Manipulate resources using HTTP verbs – Consider supporting XML and JSON • RSS – a powerful notification mechanism – Use Pro. Data. Sets to build RSS document – Use REST principles to point back to key resources 35 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 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 36 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 Leap ahead of the competition!! © 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, Mc. Graw 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/3 0/what-is-web-20. html • Programmable. Web http: //www. programmableweb. com/ 37 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
? Questions 38 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
Thank You 39 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
40 SOA-41: Enabling Your Open. Edge Application with Web 2. 0 © 2008 Progress Software Corporation
- Slides: 40