This module appears to duplicate some of the functionality of https://drupal.org/project/clients.

It might be an idea to explain the differences on the project page.

Alternatively, might it be possible to merge the two projects?

Comments

Horroshow’s picture

From what I learned so far, Clients module (aka wsclient) is lacking the ability to send custom header with content-type and api-key from the UI. If you're merging modules please do include such a feature.

mhrabovcin’s picture

Hello,

I had a QUICK look at clients module so I apologize if I missed details. Services Client has submodule called Services Client Connection (SCC) which overlaps with clients module. Similary you can configure exportable connections to remote sites with different properties. SCC is mirroring structure of Services resources and provides calls for manipulating these resources i.e.

$connection->relationship('resource', 10, 'resource2');
$connection->action('resource', 'action'),
$connection->get('node', 1);
$connection->update('node', 1, $data);
$connection->targetAction('node', 1, 'publish');

I think that clients module is more flexible than that and that comes with some DX drawbacks. SCC has server plugins which can be for example XML-RPC and REST. You're still calling same method names and these plugins are formatting requests.

Clients module is limited to session authentication while SCC provides option to add Auth plugin, where you can set Session, Basic or OAuth authentication. There is Guzzle library which is addeed to D8 core which solves this problem even better and you can add multiple authentication methods. Right now SCC can't handle for example Basic + Session auth (You can write plugin but its not a clean solution).

I like how are credentials handled in Clients module, which is big weakness of services client as creds are stored in plaintext.

From architecture standpoint Clients module is trying to solve extensibility by whole connection inheritance which gives developers more flexibility, while SCC is trying to solve same problem with plugins inheritance/new plugins which brings some limitations.

Let me know please if this answers your questions, or if there is anything that needs to be explained more.

Ideally in D8 I'd like to see single client module which would be built on top of Guzzle with UI configuration of Guzzle plugins.

Martin

colan’s picture

Issue summary: View changes

Another duplicate module is Web Service Client. I created an issue in that queue over at #2292635: Duplicate of Web Service Clients module and started a comparison page: Comparison of Web-service client modules.

mhrabovcin’s picture

Thanks for creating this comparison page. Let me know if you have any questions about services_client module.