plone web services
DESCRIPTION
Sally Kleinfeldt's summary of Plone Web services discussions at the Plone Strategic Planning Summit and the 2008 Plone Conference.TRANSCRIPT
![Page 1: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/1.jpg)
Plone Web Services2008 Plone ConferenceSally Kleinfeldt, Jazkarta
![Page 2: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/2.jpg)
Background
• Plone’s current web services story is restricted to XMLRPC and RSS
• Becoming a glaring omission
• Plone Strategic Planning Summit voted it a focus area
• Support an official and complete web services API (REST)
![Page 3: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/3.jpg)
Previous Work
• CIGNEX implemented SOAP web services on Archetypes for a customer
• z3c.rest provides a framework to build REST APIs on top of Zope 3
• Grok provides REST web services support
• Vice provides Atom syndication
• Boston and Naples sprints on RESTful WS
![Page 4: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/4.jpg)
PSPS Project
• Ticket (includes link to plone-dev posts): http://dev.plone.org/plone/ticket/7842
• OpenPlans Page: http://www.openplans.org/projects/plone-web-services/project-home
![Page 5: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/5.jpg)
Proposed Approaches
• Custom XML schemas for serializing content objects (building on GenericSetup)
• Microformats
• Atom Publishing Protocol possibly with GData extensions for search
• OpenSocial for Plone (JavaScript and Atom)
• Use OAuth for authentication
![Page 6: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/6.jpg)
Recent News
• New “draft standard” announced Sept 10
• CMIS - Content Management Interoperability Services
• EMC, IBM, Microsoft, Alfresco, Open Text, Oracle, SAP, and others
• Draft specification for a web services standard for content management
![Page 7: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/7.jpg)
CMIS
• Has SOAP and REST bindings
• REST binding defined as extension to Atom but tightly coupled to data model with “protocol extensions that tunnel the Web Services interface through fake-Atom and fake-HTTP” (Roy Fielding)
• Has hype, buzz and industry support (try a Google search and see EMC, Alfresco ads)
![Page 8: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/8.jpg)
CMIS REST:Is It Any Good?
• Roy Fielding
• “I am getting tired of big companies making idiotic claims about REST and their so-called RESTful architectures. The only similarity between CMIS and REST is that they both have four-letter acronyms”
• http://roy.gbiv.com/untangled/2008/no-rest-in-cmis
![Page 9: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/9.jpg)
CMIS REST:Is It Any Good?
• Roy Fielding con’t
• “...unless you expect blogging clients and syndication feeds to be the primary application of CMIS, it would make a lot more sense to define the representations in a microformat of HTML, JSON, YAML, or whatever else best fits the data...”
![Page 10: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/10.jpg)
CMIS REST:Is It Any Good?
• Sam Ruby
• Cautiously optimistic
• Feels OASIS TC will address problems
• http://www.intertwingly.net/blog/2008/10/01/CMIS
![Page 11: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/11.jpg)
Questions
• Should Plone adopt CMIS? or CMIS REST?
• No, reconsider when/if a “standard”
• Should Plone adopt microformats instead?
• Not systematically, just a view so easy to add for specific cases
• Should Plone adopt AtomPub?
• YES!
![Page 12: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/12.jpg)
Technical Approach
• Existing Python AtomPub server packages include Amplee and FlatAtomPub
• Plone today isn't a good fit for REST style services because the Zope2 publisher ONLY does FTP, HTTP GET/POST ("browser web"), and WebDAV
![Page 13: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/13.jpg)
AtomPub WSGI App?
• Idea: Atom Publishing application living in a Repoze ecosystem
• Aggregate content from several Plone, Grok, etc. sites
• Get around the lack of PUT/DELETE in Plone - act as a middleman
• Use zgeo.atom as starting point
![Page 14: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/14.jpg)
Atom For Now
• Focus on providing read-only Atom representations
• Atom browser view that would apply to any folderish object
• Start at the root of the Plone site and discover all the Atom publishable objects by following the Atom links
![Page 15: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/15.jpg)
Syndication vs. Web Services
• Syndication view: content owners would need to explicitly declare folders as feeds
• All-inclusive view: all content should provide the AtomPub interface
![Page 16: Plone Web Services](https://reader035.vdocuments.mx/reader035/viewer/2022081907/5466acebaf795984778b4cd9/html5/thumbnails/16.jpg)
Conclusion
• Implementing RESTful web services will be a large and complex project, given the limitations of the Zope2 publisher
• Not realistic to expect it to get done in a sprint or even a series of sprints
• Most likely scenario: a customer needing support for CMIS (after all!)