# Data Source Java Library - About This Guide

This Guide describes how to use the Google Visualization Data Source
Library to implement a data source.

This guide provides a [Getting Started](https://developers.google.com/chart/interactive/docs/dev/dsl_get_started) tutorial
section after the concepts in the [Introduction](https://developers.google.com/chart/interactive/docs/dev/dsl_intro).
This approach lets you create a simple data source and test it using a
visualization. The other tutorial sections are [Using
an External Data Store](https://developers.google.com/chart/interactive/docs/dev/dsl_csv) and [Defining
Capabilities and the Flow of Events](https://developers.google.com/chart/interactive/docs/dev/dsl_httpservlet), which cover more complex
implementations. Depending on your requirements, you might not need to
complete all three tutorials, though it is recommended that you at least
complete the [Getting Started](https://developers.google.com/chart/interactive/docs/dev/dsl_get_started) section.
The other sections of the guide help you to build on your knowledge.

## Contents

- [Audience](https://developers.google.com/chart/interactive/docs/dev/dsl_about#audience)
- [Guide Overview](https://developers.google.com/chart/interactive/docs/dev/dsl_about#overview)
- [Examples Quick Reference](https://developers.google.com/chart/interactive/docs/dev/dsl_about#quick)
- [More Information](https://developers.google.com/chart/interactive/docs/dev/dsl_about#more)

## Audience

You need to be familiar with [Java](http://www.java.com/) and [Java
servlet technology](http://java.sun.com/products/servlet/overview.html) to use the library.

You also need to understand [how to
use charts](https://developers.google.com/chart/interactive/docs), and though not essential, it is helpful to be familiar
with the Google Visualization API [wire
protocol](https://developers.google.com/chart/interactive/docs/dev/implementing_data_source#requestformat), and the [query
language](https://developers.google.com/chart/interactive/docs/querylanguage).

## Guide Overview

This guide contains the following sections:

- [Introduction](https://developers.google.com/chart/interactive/docs/dev/dsl_intro)


  Introduces the library, providing an overview of how a data source
  works.
- [Installation](https://developers.google.com/chart/interactive/docs/dev/dsl_install)


  Describes the library's prerequisites and dependencies, and how to download
  and build the source code.
- [Getting Started](https://developers.google.com/chart/interactive/docs/dev/dsl_get_started)

  Introduces `SimpleExampleServlet`. `SimpleExampleServlet` is
  the simplest example implementation that is provided with the library.
  This section also provides step-by-step instructions on how to run and
  test `SimpleExampleServlet`.
- [Using an External Data Store](https://developers.google.com/chart/interactive/docs/dev/dsl_csv)

  Introduces `CsvDataSourceServlet`. `CsvDataSourceServlet` is
  an example implementation that uses a CSV file as an external data store.
  This section also provides step-by-step instructions on how to run and
  test `CsvDataSourceServlet`.
- [Defining Capabilities and the Flow of Events](https://developers.google.com/chart/interactive/docs/dev/dsl_httpservlet)

  Introduces `AdvancedExampleServlet2`. `AdvancedExampleServlet2` is
  an example implementation that defines capabilities and flow
  of events. This section also provides step-by-step instructions on how
  to run and test `AdvancedExampleServlet2`.
- [Handling Security, Errors, Warnings,
  and Logging](https://developers.google.com/chart/interactive/docs/dev/dsl_errors_and_logging)

  Describes how to make your data source secure,
  and how to handle errors, warnings, and logging.
- [Implementation Tips](https://developers.google.com/chart/interactive/docs/dev/dsl_key_concepts)

  Provides information that will help you write more complex implementations
  of the library.
- [Library
  Packages and Key Classes](https://developers.google.com/chart/interactive/docs/dev/dsl_packages)

  Provides a high level introduction to the library's packages and key
  classes.

## Examples Quick Reference

The library is provided with six example implementations. Three of these
are described in this Guide, the others are not. The following
table will help
you find an example of the type of behavior you want to implement.

|---|---|---|---|---|
| **Example** | **Servlet extended** | **Capabilities** | **Flow of events** | **Source of data** |
| [`SimpleExampleServlet`](http://code.google.com/p/google-visualization-java/source/browse/trunk/examples/src/java/SimpleExampleServlet.java) Described in [Getting Started](https://developers.google.com/chart/interactive/docs/dev/dsl_get_started) | `DataSourceServlet` | `NONE` | Default | Within class |
| `http://code.google.com/p/google-visualization-java/source/browse/trunk/examples/src/java/CsvDataSourceServlet.java` Described in [Using an External Data Store](https://developers.google.com/chart/interactive/docs/dev/dsl_csv) | `DataSourceServlet` | `NONE` | Default | CSV file |
| [`AdvancedExampleServlet2`](http://code.google.com/p/google-visualization-java/source/browse/trunk/examples/src/java/AdvancedExampleServlet2.java) Described in [Defining Capabilities and the Flow of Events](https://developers.google.com/chart/interactive/docs/dev/dsl_httpservlet) | `HttpServlet` | `SELECT` | Custom | Within class |
| `http://code.google.com/p/google-visualization-java/source/browse/trunk/examples/src/java/SimpleExampleServlet2.java` Not described in this Guide | `HttpServlet ` | `NONE` | Custom | Within class |
| `http://code.google.com/p/google-visualization-java/source/browse/trunk/examples/src/java/AdvancedExampleServlet.java` Not described in this Guide | `DataSourceServlet` | `SELECT` | Default | Within class |
| `http://code.google.com/p/google-visualization-java/source/browse/trunk/examples/src/java/SqlDataSourceServlet.java` Not described in this Guide | `DataSourceServlet` | `SQL` | Default | SQL database |

## More Information

For information on the Data Source Library project, see the [home
page](http://code.google.com/p/google-visualization-java/).