jmulford-bw / Java-V2-Messaging-SDK

0 stars 1 forks source link

Add helper method to create MessageController #8

Open fuchsnj opened 5 years ago

fuchsnj commented 5 years ago

You should be able to create the messageController from the BandwidthClient. Something like

BandwidthClient client;
BandwidthMessageClient messageClient = client.createMessageClient();

I would also suggest changing the name to MessageClient. "Controller" seems odd here, especially since we already use "Client" in BandwidthClient

n-miles commented 5 years ago

Is there a reason to even have a separate message client instead of just using a single client to create all of the different types of requests? Feels weird to have to pass around multiple different clients that all interact with the same service.

fuchsnj commented 5 years ago

I think the main reason for this is to separate all of the underlying apis and allow them to be upgraded independently. Think of how the AWS SDK works, each service gets it's own "Client" and can have it's own version / updates

n-miles commented 5 years ago

You don't get instances of all of those clients from a common library though. They're all in different repos and such.

fuchsnj commented 5 years ago

I agree with @namiles here. This repo is just for the messaging SDK, so I think a single client is enough.