Skip to content

Commit

Permalink
docs: remove references to 'Headless BI'
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed Jan 23, 2023
1 parent d2307a8 commit 8d798c4
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 91 deletions.
48 changes: 36 additions & 12 deletions docs/content/Cube.js-Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,48 @@ redirect_from:
- /cubejs-introduction
---

**Cube is the headless business intelligence platform.** It helps data engineers and application developers access data from modern data stores, organize it into consistent definitions, and deliver it to every application.
**Cube is the Semantic Layer for building data apps.** It helps data engineers
and application developers access data from modern data stores, organize it into
consistent definitions, and deliver it to every application.

<img
src="https://raw.githubusercontent.com/cube-js/cube.js/master/docs/content/cube-scheme.png"
style="border: none"
width="100%"
/>

Cube was designed to work with all SQL-enabled data sources, including cloud data warehouses like Snowflake or Google BigQuery, query engines like Presto or Amazon Athena, and application databases like Postgres. Cube has a built-in caching engine to provide sub-second latency and high concurrency for API requests.
Cube was designed to work with all SQL-enabled data sources, including cloud
data warehouses like Snowflake or Google BigQuery, query engines like Presto or
Amazon Athena, and application databases like Postgres. Cube has a built-in
caching engine to provide sub-second latency and high concurrency for API
requests.

With Cube, you can build a data model, manage access control and caching, and expose your data to every application via REST, GraphQL, and SQL APIs.
Cube is headless, API-first, and decoupled from visualizations. You can use any charting library to build custom UI, or connect existing dashboarding and reporting tools to Cube.
With Cube, you can build a data model, manage access control and caching, and
expose your data to every application via REST, GraphQL, and SQL APIs. Cube is
headless, API-first, and decoupled from visualizations. You can use any charting
library to build custom UI, or connect existing dashboarding and reporting tools
to Cube.

## Why Cube?

If you are building a data application—such as a business intelligence tool or a customer-facing analytics feature—you’ll probably face the following problems:
If you are building a data application—such as a business intelligence tool or a
customer-facing analytics feature—you’ll probably face the following problems:

1. __SQL code organization.__ Sooner or later, modeling even a dozen metrics with a dozen dimensions using pure SQL queries becomes a maintenance nightmare, which leads to building a modeling framework.
2. __Performance.__ Most of the time and effort in modern analytics software development is spent providing adequate time to insight. In a world where every company’s data is big data, writing just SQL queries to get insight isn’t enough anymore.
3. __Access Control.__ It is important to secure and govern access to data for all downstream data consuming applications.
1. **SQL code organization.** Sooner or later, modeling even a dozen metrics
with a dozen dimensions using pure SQL queries becomes a maintenance
nightmare, which leads to building a modeling framework.
2. **Performance.** Most of the time and effort in modern analytics software
development is spent providing adequate time to insight. In a world where
every company’s data is big data, writing just SQL queries to get insight
isn’t enough anymore.
3. **Access Control.** It is important to secure and govern access to data for
all downstream data consuming applications.

Cube has the necessary infrastructure and features to implement efficient data modeling, access control, and performance optimizations so that every application can access consistent data via REST, SQL, and GraphQL APIs. Achieve insights from raw data within minutes, and get an API with sub-second response times on up to a trillion data points.
Cube has the necessary infrastructure and features to implement efficient data
modeling, access control, and performance optimizations so that every
application can access consistent data via REST, SQL, and GraphQL APIs. Achieve
insights from raw data within minutes, and get an API with sub-second response
times on up to a trillion data points.

<div
style="text-align: center"
Expand All @@ -41,10 +61,14 @@ Cube has the necessary infrastructure and features to implement efficient data m

## Architecture

**Cube acts as a data access layer**, translating API requests into SQL, managing caching, queuing, and database connection.
**Cube acts as a data access layer**, translating API requests into SQL,
managing caching, queuing, and database connection.

The Cube accepts queries via REST, GraphQL or SQL interfaces. Based on the data model and an incoming query, Cube generates
a SQL query and executes it in your database. Cube fully manages query orchestration, database connections, as well as caching and access control layers. The result is then sent back to the client.
Cube accepts queries via REST, GraphQL or SQL interfaces. Based on the data
model and an incoming query, Cube generates a SQL query and executes it in your
database. Cube fully manages query orchestration, database connections, as well
as caching and access control layers. The result is then sent back to the
client.

<div
style="text-align: center"
Expand Down
78 changes: 58 additions & 20 deletions docs/content/Frontend-Integrations/Introduction-angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,84 @@ permalink: /frontend-introduction/angular
category: Frontend Integrations
---

Cube.js is headless business intelligence for building data applications. Cube.js is visualization-agnostic, so you can build any user interface for your application.
Cube is visualization-agnostic, so you can build any user interface for your
application.

You can directly query Cube.js Backend using JSON [Query Format](https://cube.dev/docs/query-format) via [HTTP API](https://cube.dev/docs/rest-api) or [WebSockets](https://cube.dev/docs/real-time-data-fetch#web-sockets) and visualize analytical data with tools of your choice. However, it’s much easier to use the Cube.js JavaScript client and bindings for popular frameworks such as React, Angular, and Vue.
You can directly query Cube Backend using
JSON [Query Format](https://cube.dev/docs/query-format) via [HTTP API](https://cube.dev/docs/rest-api)
or [WebSockets](https://cube.dev/docs/real-time-data-fetch#web-sockets) and
visualize analytical data with tools of your choice. However, it’s much easier
to use the Cube JavaScript client and bindings for popular frameworks such as
React, Angular, and Vue.

The client has methods to communicate with the Cube.js API Gateway, and retrieve and process data. It is designed to work with existing charting libraries including Chart.js, D3.js, and more.
The client has methods to communicate with the Cube API Gateway, and retrieve
and process data. It is designed to work with existing charting libraries
including Chart.js, D3.js, and more.

## Cube.js JavaScript Client
## Cube JavaScript Client

The client provides methods to solve common tasks:

**Abstract from the transport and query data.** You can [fetch data](https://cube.dev/docs/@cubejs-client-core#load) from Cube.js Backend or subscribe to [real-time updates](https://cube.dev/docs/real-time-data-fetch) regardless of the protocol, be it HTTP or WebSockets.
**Abstract from the transport and query data.** You can
[fetch data](https://cube.dev/docs/@cubejs-client-core#load) from Cube Backend
or subscribe to [real-time updates](https://cube.dev/docs/real-time-data-fetch)
regardless of the protocol, be it HTTP or WebSockets.

**Transform data for visualization.** You can [pivot](https://cube.dev/docs/@cubejs-client-core#pivot) the result set to display as a [chart](https://cube.dev/docs/@cubejs-client-core#chart-pivot) or as a [table](https://cube.dev/docs/@cubejs-client-core#table-pivot), split into [series](https://cube.dev/docs/@cubejs-client-core#series) or [table columns](https://cube.dev/docs/@cubejs-client-core#table-columns).
**Transform data for visualization.** You can
[pivot](https://cube.dev/docs/@cubejs-client-core#pivot) the result set to
display as a [chart](https://cube.dev/docs/@cubejs-client-core#chart-pivot) or
as a [table](https://cube.dev/docs/@cubejs-client-core#table-pivot), split into
[series](https://cube.dev/docs/@cubejs-client-core#series) or
[table columns](https://cube.dev/docs/@cubejs-client-core#table-columns).

**Simplify work with complex query types.** You can build [Drill Down](https://cube.dev/docs/@cubejs-client-core#drill-down) queries and [decompose](https://cube.dev/docs/@cubejs-client-core#decompose) the results of [compareDateRange](https://cube.dev/docs/query-format#time-dimensions-format) or [Data Blending](https://cube.dev/docs/recipes/data-blending) queries.
**Simplify work with complex query types.** You can build
[Drill Down](https://cube.dev/docs/@cubejs-client-core#drill-down) queries and
[decompose](https://cube.dev/docs/@cubejs-client-core#decompose) the results of
[compareDateRange](https://cube.dev/docs/query-format#time-dimensions-format) or
[Data Blending](https://cube.dev/docs/recipes/data-blending) queries.

[Learn more](https://cube.dev/docs/@cubejs-client-core) in the documentation for the `@cubejs-client/core` package.
[Learn more](https://cube.dev/docs/@cubejs-client-core) in the documentation for
the `@cubejs-client/core` package.

## Cube.js Angular Package
## Cube Angular Package

The package provides convenient tools to work with Cube.js in Angular:
The package provides convenient tools to work with Cube in Angular:

**Modules.** Inject [CubejsClientModule](https://cube.dev/docs/@cubejs-client-vue#query-builder) and [CubejsClient](https://cube.dev/docs/@cubejs-client-vue#query-renderer) into your components and services to get access to `@cubejs-client/core` API.
**Modules.** Inject
[CubejsClientModule](https://cube.dev/docs/@cubejs-client-vue#query-builder) and
[CubejsClient](https://cube.dev/docs/@cubejs-client-vue#query-renderer) into
your components and services to get access to `@cubejs-client/core` API.

**Subjects.** Use [RxJS Subject](https://cube.dev/docs/@cubejs-client-ngx#api) and query to watch changes.
**Subjects.** Use [RxJS Subject](https://cube.dev/docs/@cubejs-client-ngx#api)
and query to watch changes.

## Example Usage

Here are the typical steps to query and visualize analytical data in Angular:

- **Import `@cubejs-client/core` and `@cubejs-client/ngx` packages.** These packages provide all the necessary methods and convenient Angular tools.
- **Create an instance of Cube.js JavaScript Client.** The client is initialized with Cube.js API URL. In development mode, the default URL is [http://localhost:4000/cubejs-api/v1](http://localhost:4000/cubejs-api/v1). The client is also initialized with an [API token](https://cube.dev/docs/security), but it takes effect only in [production](https://cube.dev/docs/deployment/production-checklist).
- **Query data from Cube.js Backend and Transform data for visualization.** Use [CubejsClient](https://cube.dev/docs/@cubejs-client-ngx#api) to load data. The client accepts a query, which is a plain JavaScript object. See [Query Format](https://cube.dev/docs/query-format) for details.
- **Visualize the data.** Use tools of your choice to draw charts and create visualizations.

See an example of using Cube.js with Angular and Chart.js library. Note that you can always use a different charting library that suits your needs:
- **Import `@cubejs-client/core` and `@cubejs-client/ngx` packages.** These
packages provide all the necessary methods and convenient Angular tools.
- **Create an instance of Cube JavaScript Client.** The client is initialized
with Cube API URL. In development mode, the default URL is
[http://localhost:4000/cubejs-api/v1](http://localhost:4000/cubejs-api/v1).
The client is also initialized with an
[API token](https://cube.dev/docs/security), but it takes effect only in
[production](https://cube.dev/docs/deployment/production-checklist).
- **Query data from Cube Backend and Transform data for visualization.** Use