puoygae
puoygae

Reputation: 573

What is a client library in relation to Cloud Endpoints?

I am 13 years old learning Google App Engine.

What is the relationship between a 'client library' when it comes to Google Cloud Endpoints?

As far as I understand it, a client library is a 'smaller thing' that is part of Google Cloud Endpoints that the client (the user) is able to incorporate into his app to then be able to communicate with Cloud Endpoints.

Thank you.

Upvotes: 1

Views: 72

Answers (1)

Matt Goodrich
Matt Goodrich

Reputation: 5095

Client Libraries

Client libraries are bundles of code written by Google, which you can use to easily call Google Cloud endpoints. If you look at the list here, you will find client libraries for the following languages:

  1. Go
  2. Java
  3. Node.js
  4. Python
  5. Ruby
  6. PHP
  7. C#

Each of these client libraries have a library reference to help you understand how to use them to reach the endpoints. Note it would be possible to use any language with networking capabilities, but much more difficult without a client library.

Google's Definition

The Google Cloud Client Library for Java calls itself

an idiomatic, intuitive, and natural way for Java developers to integrate with Google Cloud Platform services, like Cloud Datastore and Cloud Storage

Remove Java above for a strong definition of client libraries.

Functional Overview

You will come across the concept of wrapping code as you gain experience. This is how these client libraries help you. For an example of wrapping code, you could write a method

void createStackOverflowPost(title, body) {
   goToStackOverflow();
   setTitle(title);
   setBody(body);
   authenticate();
   confirmPost();
}

Then, in this hypothetical code, you could call createStackOverflowPost("What is a client library", "Your post body here...") instead of calling each step (goToStackOverflow()...). The client libraries hold methods with the complicated code of hitting Google Cloud endpoints (the guts of createStackOverflowPost above), and instead let you pass only the important contents, like the title and body in our example.

There are also other helpful features, such as objects modeling components of Cloud.

Upvotes: 1

Related Questions