The Bookshelf app is a sample web app written in Java that shows how to use various Google Cloud products, including:
- App Engine standard environment
- Cloud Storage
This tutorial explores the Bookshelf sample app and discusses how each feature of the app is implemented using technologies and services that Google Cloud provides.The Bookshelf sample app is based on the javax.servlet web application framework and uses JavaServer Pages. The Bookshelf app uses servlets, but the concepts and technologies explored are applicable regardless of which framework you use.
The Bookshelf sample app stores a collection of book titles. Anyone with access to the app can modify the list. The sample app lets users:
- View the list of books.
- Add books to the list.
- Remove books from the list.
- Edit book details.
- Upload cover images for books.
- Sign in with a Google Account and view the books that they added to the list.
- Clone or download the sample app.
- Build the app and run it on your local machine.
- Deploy the app to App Engine.
- Walk through the sample code.
- Learn how the app stores structured data.
- Learn how the app stores binary data in Cloud Storage.
This tutorial uses billable components of Google Cloud.New Google Cloud users might be eligible for a free trial.
This tutorial has several steps, and each step is documented on its own page. The final page of the tutorial includes instructions for cleaning up resources so you won't continue to be billed for Google Cloud services. If you decide not to complete all the steps of the tutorial, see the cleanup instructions on the final page.
Before you begin
To set up your Google Cloud project, use the Cloud Console:
Create a Cloud project, create an
App Engine app, and then enable billing in that project.
to App Engine
When prompted, select the region where you want your App Engine app located, and then enable billing. After your Cloud project is created, the Dashboard opens.
- Enable the Cloud Storage JSON, Stackdriver Logging, and Google+ APIs.
- Create a Cloud project, create an App Engine app, and then enable billing in that project. Go to App Engine
- To deploy a Java app to App Engine, you must first set up your environment. See Using Apache Maven and the App Engine plugin for details.
Download, install, and initialize the Cloud SDK:
Download the Cloud SDK
Clone the sample repository.
git clone https://github.com/GoogleCloudPlatform/getting-started-java.git
Alternatively, you can download the sample as a zip file and extract it.
The Bookshelf tutorial has several parts that demonstrate how the sample app uses various Google Cloud services.