Re: State of Plone web api
"David Glick (Plone)" <david.glick-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
On 1/15/14, 6:13 PM, Dylan Jay wrote: > <rant> > Plone's web api sucks. > For example setting custom field values on objects via web calls. > For archetypes > - you can't use the .update method Zope traversal doesn't parse *kwargs type method definitions > - you can use setFIELDNAME accessors created AT via XMLRPC or normal url. Except that it doesn't work with archetypes.schemaextender fields > - you can't use XMLRPC for any method that requires keyword args. So accessors that use keywords args can't use XMLRPC > WebDAV > - doesn't support propfind propset propget for any schema based fields. Only standard fields like Title and creationDate > - RFC822Marshaller is used for most types so you can upload all the content + custom fields via a PUT request. Except this isn't used for files or images so there is > no way via webdav to set custom fields > Dexterity > Can't be done for dexterity objects at all that I've worked out. Maybe via RFC822Marshaller and PUT but as above, is unlikely to work for File or Images. > > So if you want to set schemaextender or dexterity fields or some kind of consistent api for setting... it just isn't there :( > Possibly the only way I can think of doing it with out-of-the-box Plone would be to upload a PythonScript that does the setting for me. > > </rant> > Dexterity does its own rfc822 marshalling using plone.rfc822, and plone.namedfile extends that to handle files and images. Anyway, the reason Plone doesn't have a web-accessible API (I'd consider most of the above to be non-web APIs that happen to be semi-accessible via HTTP) is because no one's built a good one and seen it through the process of getting it added to core. What sort of API *should* we have? ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk