Cristian
Cristian

Reputation: 200080

What design pattern to implement in order to use a REST API?

I'm starting a new project that will require use an external REST API that basically returns JSON and XML files. It's similar to the StackExchange API and I see every wrapper that has be done for that API has a different approach; for instance, stackoverflow-java-sdk uses the Adapter Pattern.

So, in order to make sure every new API feature will be included easyly... what would be the best design pattern?

Upvotes: 6

Views: 10268

Answers (1)

Dave
Dave

Reputation: 5173

The Bridge pattern can be used to encapsulate two interfaces so they can vary independently. Sounds like what you're interested in.

Upvotes: 5

Related Questions