On Saturday 22 November 2008 02:49:57 Aaron J. Seigo wrote: > something else i just remembered: > > we're going to want to think about the full round trip "experience": > > use case: widget wants to use a web service > > * it says "give me this web service" -> that should be a one liner with no > jargon in it, just the URL of the service and return a Plasma::Service > ready to go
That's not possible in all cases with our current API, because web services have quirks and quirks require protocol parameters to be passed to Jolie (there are always quirks not automatically deducible by the interpreter). In our company development process we defer this problem to a Jolie script, making the solution a one liner for the interface and introducing kind of a "Jolie service adapter". We could add this feature to Plasma::Service::load, so that Jolie scripts are automatically loaded via MetaService through the loadEmbeddedJolieService operation. Pros: - access to full Jolie capabilities if someone needs a complex service backend (service orchestration); - more separation between the service problems and the interface; - you can decide the interface and then make adapters to services that provide the same thing with different interfaces (operation names, protocol quirks, etc.); - if a quirk or even the interface (operation names, etc.) of the external web service changes you don't need to recompile the plasmoid, just update the Jolie script. Cons: - you need to write some more LOCs (the desktop entry? how does plasma find the service plugins?), but they're damn easy. Making an adapter is straightforward and doesn't require to really know the Jolie language, just a simple tutorial (you need always the same 4 keywords and the pattern never changes..). _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel