Skip to content

Commit

Permalink
Replace quickstart with new getting started guide (digital-asset#5392)
Browse files Browse the repository at this point in the history
* Move quickstart to java bindings section

* Change title of quickstart to Getting Started with ...

* Move GSG to Getting Started (and rename in index)

* Rewrite a bunch of references to quickstart

* Update reference and give more specific name

changelog_begin
- [Docs] Replace IOU quickstart with full stack Getting Started Guide
changelog_end

* Replace daml-ledger link

* Use getting started guide in redirects
  • Loading branch information
rohanjr authored Apr 3, 2020
1 parent e3c9bf9 commit 3895c2d
Show file tree
Hide file tree
Showing 34 changed files with 61 additions and 62 deletions.
36 changes: 18 additions & 18 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,11 @@ genrule(
filegroup(
name = "daml-assistant-iou-setup",
srcs = glob(
["source/getting-started/quickstart/template-root/*"],
["source/app-dev/bindings-java/quickstart/template-root/*"],
# excluding quickstart-java stuff
exclude = [
"source/getting-started/quickstart/template-root/src",
"source/getting-started/quickstart/template-root/pom.xml",
"source/app-dev/bindings-java/quickstart/template-root/src",
"source/app-dev/bindings-java/quickstart/template-root/pom.xml",
],
exclude_directories = 0,
),
Expand All @@ -493,11 +493,11 @@ filegroup(

genrule(
name = "quickstart-java",
srcs = glob(["source/getting-started/quickstart/template-root/**"]),
srcs = glob(["source/app-dev/bindings-java/quickstart/template-root/**"]),
outs = ["quickstart-java.tar.gz"],
cmd = """
mkdir -p quickstart-java
cp -rL docs/source/getting-started/quickstart/template-root/* quickstart-java/
cp -rL docs/source/app-dev/bindings-java/quickstart/template-root/* quickstart-java/
sed -i "s/__VERSION__/{mvn}/" quickstart-java/pom.xml
tar c quickstart-java \
--owner=0 --group=0 --numeric-owner --mtime=2000-01-01\ 00:00Z --sort=name \
Expand All @@ -511,21 +511,21 @@ load("//language-support/java/codegen:codegen.bzl", "dar_to_java")
genrule(
name = "quickstart-model",
srcs = [
"//docs:source/getting-started/quickstart/template-root/daml/Main.daml",
"//docs:source/getting-started/quickstart/template-root/daml/Iou.daml",
"//docs:source/getting-started/quickstart/template-root/daml/IouTrade.daml",
"//docs:source/getting-started/quickstart/template-root/daml/Setup.daml",
"//docs:source/app-dev/bindings-java/quickstart/template-root/daml/Main.daml",
"//docs:source/app-dev/bindings-java/quickstart/template-root/daml/Iou.daml",
"//docs:source/app-dev/bindings-java/quickstart/template-root/daml/IouTrade.daml",
"//docs:source/app-dev/bindings-java/quickstart/template-root/daml/Setup.daml",
"//daml-script/daml:daml-script.dar",
],
outs = ["quickstart-model.dar"],
cmd = """
set -eou pipefail
TMP_DIR=$$(mktemp -d)
mkdir -p $$TMP_DIR/daml
cp -R -L $(location //docs:source/getting-started/quickstart/template-root/daml/Main.daml) $$TMP_DIR/daml/
cp -R -L $(location //docs:source/getting-started/quickstart/template-root/daml/Iou.daml) $$TMP_DIR/daml/
cp -R -L $(location //docs:source/getting-started/quickstart/template-root/daml/IouTrade.daml) $$TMP_DIR/daml/
cp -R -L $(location //docs:source/getting-started/quickstart/template-root/daml/Setup.daml) $$TMP_DIR/daml/
cp -R -L $(location //docs:source/app-dev/bindings-java/quickstart/template-root/daml/Main.daml) $$TMP_DIR/daml/
cp -R -L $(location //docs:source/app-dev/bindings-java/quickstart/template-root/daml/Iou.daml) $$TMP_DIR/daml/
cp -R -L $(location //docs:source/app-dev/bindings-java/quickstart/template-root/daml/IouTrade.daml) $$TMP_DIR/daml/
cp -R -L $(location //docs:source/app-dev/bindings-java/quickstart/template-root/daml/Setup.daml) $$TMP_DIR/daml/
cp -L $(location //daml-script/daml:daml-script.dar) $$TMP_DIR/
cat << EOF > $$TMP_DIR/daml.yaml
sdk-version: {sdk}
Expand Down Expand Up @@ -553,7 +553,7 @@ dar_to_java(

java_binary(
name = "quickstart-java-lib",
srcs = glob(["source/getting-started/quickstart/template-root/src/main/java/**/*.java"]) + [":quickstart-model-srcjar"],
srcs = glob(["source/app-dev/bindings-java/quickstart/template-root/src/main/java/**/*.java"]) + [":quickstart-model-srcjar"],
main_class = "com.digitalasset.quickstart.iou.IouMain",
deps = [
"//daml-lf/archive:daml_lf_dev_archive_java_proto",
Expand Down Expand Up @@ -610,10 +610,10 @@ daml_test(
daml_test(
name = "quickstart-daml-test",
srcs = glob(
include = ["source/getting-started/quickstart/template-root/daml/**/*.daml"],
include = ["source/app-dev/bindings-java/quickstart/template-root/daml/**/*.daml"],
# excluding Setup.daml, because it doesn't contain any scenarios,
# and we cannot conveniently add daml-script as a dependency for daml_test
exclude = ["source/getting-started/quickstart/template-root/daml/Setup.daml"],
exclude = ["source/app-dev/bindings-java/quickstart/template-root/daml/Setup.daml"],
),
)

Expand Down Expand Up @@ -657,8 +657,8 @@ filegroup(
["source/daml/intro/daml/1_Token/**/*"],
# excluding quickstart-java stuff
exclude = [
"source/getting-started/quickstart/template-root/src",
"source/getting-started/quickstart/template-root/pom.xml",
"source/app-dev/bindings-java/quickstart/template-root/src",
"source/app-dev/bindings-java/quickstart/template-root/pom.xml",
],
exclude_directories = 0,
),
Expand Down
2 changes: 1 addition & 1 deletion docs/configs/pdf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Getting started
:maxdepth: 2

Installing the SDK <getting-started/installation>
getting-started/index
Building Your App <getting-started/index>
getting-started/testing

Writing DAML
Expand Down
6 changes: 3 additions & 3 deletions docs/redirects.map
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ daml/anti-patterns.html
daml/models-versus-application.html
daml/stdlib/base.html -> daml/reference/base.html
concepts.html -> /concepts/ledger-model/index.html
getting-started.html -> /getting-started/quickstart.html
getting-started.html -> /getting-started/index.html
packages/da-docs-example-upgrade/index.html -> /examples/upgrade/index.html
packages/sdk-docs-installation/index.html -> /getting-started/installation.html
packages/da-docs-example-bond-trading/daml-implementation.html -> /examples/bond-trading/daml-implementation.html
Expand Down Expand Up @@ -45,14 +45,14 @@ packages/daml-manual/reference/data-types.html -> /daml/reference/data-types.htm
packages/daml-manual/reference/updates.html -> /daml/reference/updates.html
packages/daml-manual/reference/file-structure.html -> /daml/reference/file-structure.html
packages/daml-manual/reference/expressions.html -> /daml/reference/expressions.html
packages/sdk-docs-introduction/index.html -> /getting-started/introduction.html
packages/sdk-docs-introduction/index.html -> /getting-started/index.html
packages/da-docs-example-collateral/index.html -> /examples/collateral/index.html
packages/navigator-docs/index.html -> /tools/navigator/index.html
packages/navigator-docs/database.html -> /tools/navigator/database.html
packages/navigator-docs/backend-licenses.html -> /
packages/navigator-docs/console.html -> /tools/navigator/console.html
packages/navigator-docs/frontend-licenses.html -> /
packages/quickstart/index.html -> /getting-started/quickstart.html
packages/quickstart/index.html -> /getting-started/index.html
packages/da-docs-ledger-model/ledger-integrity.html -> /concepts/ledger-model/ledger-integrity.html
packages/da-docs-ledger-model/index.html -> /concepts/ledger-model/index.html
packages/da-docs-ledger-model/ledger-structure.html -> /concepts/ledger-model/ledger-structure.html
Expand Down
2 changes: 1 addition & 1 deletion docs/source/app-dev/bindings-java/codegen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ While we currently don’t provide direct integration with Maven, Groovy, SBT, e

The following snippet is an excerpt from the ``pom.xml`` that is part of the :ref:`quickstart` guide.

.. literalinclude:: ../../getting-started/quickstart/template-root/pom.xml
.. literalinclude:: quickstart/template-root/pom.xml
:language: xml
:lines: 47-78,94-95
:dedent: 12
Expand Down
20 changes: 10 additions & 10 deletions docs/source/app-dev/bindings-java/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Java bindings

codegen
Ping Pong Example <example>
Iou Quickstart </getting-started/quickstart>
Iou Quickstart Tutorial <quickstart>

The Java bindings is a client implementation of the *Ledger API*
based on `RxJava <https://github.com/ReactiveX/RxJava>`_, a library for composing asynchronous and event-based programs using observable sequences for the Java VM. It provides an idiomatic way to write DAML Ledger applications.
Expand All @@ -32,7 +32,7 @@ The Java bindings library is composed of:
- The Reactive Layer
A thin layer built on top of the Ledger API services generated classes.

For each Ledger API service, there is a reactive counterpart with a
For each Ledger API service, there is a reactive counterpart with a
matching name. For instance, the reactive counterpart of ``ActiveContractsServiceGrpc``
is ``ActiveContractsClient``.

Expand All @@ -42,9 +42,9 @@ The Java bindings library is composed of:

Can be found in the java package ``com.daml.ledger.rxjava``.
- The Reactive Components
A set of optional components you can use to assemble DAML Ledger applications.
A set of optional components you can use to assemble DAML Ledger applications.

The most important components are:
The most important components are:

- the ``LedgerView``, which provides a local view of the Ledger
- the ``Bot``, which provides utility methods to assemble automation logic for the Ledger
Expand All @@ -70,15 +70,15 @@ This class provides access to the ledgerId, and all clients that give access to
Accessing data on the ledger: LedgerView
========================================

The ``LedgerView`` of an application is the "copy" of the ledger that the application has locally. You can query it to obtain the contracts that are active on the Ledger and not pending.
The ``LedgerView`` of an application is the "copy" of the ledger that the application has locally. You can query it to obtain the contracts that are active on the Ledger and not pending.

.. note::

- A contract is *active* if it exists in the Ledger and has not yet been archived.
- A contract is *pending* if the application has sent a consuming command to the Ledger and has yet
to receive an completion for the command (that is, if the command has succeeded or not).

The ``LedgerView`` is updated every time:
The ``LedgerView`` is updated every time:

- a new event is received from the Ledger
- new commands are sent to the Ledger
Expand All @@ -91,10 +91,10 @@ Writing automations: Bot
========================

The ``Bot`` is an abstraction used to write automation for a DAML Ledger. It is conceptually
defined by two aspects:
defined by two aspects:

- the ``LedgerView``
- the logic that produces commands, given a ``LedgerView``
- the logic that produces commands, given a ``LedgerView``

When the ``LedgerView`` is updated, to see if the bot has new commands to submit based on the
updated view, the logic of the bot is run.
Expand All @@ -120,15 +120,15 @@ In the above:

- ``applicationId``
The id used by the Ledger to identify all the queries from the same application.
- ``ledgerClient``
- ``ledgerClient``
The connection to the Ledger.
- ``transactionFilter``
The server-side filter to the incoming transactions. Used to reduce the traffic between
Ledger and application and make an application more efficient.
- ``bot``
The logic of the application,
- ``transform``
The function that, given a new contract, returns which information for
The function that, given a new contract, returns which information for
that contracts are useful for the application. Can be used to reduce space used
by discarding all the info not required by the application. The input to the function
contains the ``templateId``, the arguments of the contract created and the context of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
.. _quickstart:

Quickstart guide
################
IOU Quickstart Tutorial
#######################

In this guide, you will learn about the SDK tools and DAML applications by:

Expand All @@ -14,7 +14,7 @@ In this guide, you will learn about the SDK tools and DAML applications by:
Prerequisites:

- You understand what an IOU is. If you are not sure, read the :ref:`IOU tutorial overview<tutorials-iou-overview>`.
- You have installed the DAML SDK. See :doc:`installation`.
- You have installed the DAML SDK. See :doc:`installation </getting-started/installation>`.

On this page:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/app-dev/bindings-scala/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Example code

In this section we will demonstrate how to use the Scala bindings library.

This section refers to the IOU DAML example from the :doc:`Quickstart guide </getting-started/quickstart>` and
This section refers to the IOU DAML example from the :doc:`Quickstart guide </app-dev/bindings-java/quickstart>` and
`quickstart-scala example <https://github.com/digital-asset/daml/tree/master/language-support/scala/examples/quickstart-scala>`_ that we already mentioned above.

Please keep in mind that **quickstart-scala example** compiles with ``-Xsource:2.13`` **scalac** option, this is to activate the fix for a Scala bug that forced users to add extra imports for implicits that should not be needed.
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions docs/source/app-dev/bindings-x-lang/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ No matter what approach you take, either manually building commands or writing a
Create Command
--------------

Let's recall an **IOU** example from the :doc:`Quickstart guide </getting-started/quickstart>`, where `Iou` template is defined like this:
Let's recall an **IOU** example from the :doc:`Quickstart guide </app-dev/bindings-java/quickstart>`, where `Iou` template is defined like this:

.. literalinclude:: ./code-snippets/quickstart/template-root/daml/Iou.daml
.. literalinclude:: /app-dev/bindings-java/quickstart/template-root/daml/Iou.daml
:language: daml
:lines: 9-15

Expand All @@ -58,7 +58,7 @@ Exercise Command

To build :ref:`com.digitalasset.ledger.api.v1.ExerciseCommand` for `Iou_Transfer`:

.. literalinclude:: ./code-snippets/quickstart/template-root/daml/Iou.daml
.. literalinclude:: /app-dev/bindings-java/quickstart/template-root/daml/Iou.daml
:language: daml
:lines: 23, 52-55

Expand Down
2 changes: 1 addition & 1 deletion docs/source/daml-integration-kit/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Before you can decide on an appropriate architecture and implement your own
server and validator, you need a significant amount of context about DAML.
To acquire this context, you should:

1. Complete the :doc:`/getting-started/quickstart`.
1. Complete the :doc:`/app-dev/bindings-java/quickstart`.
2. Get an in-depth understanding of the :doc:`/concepts/ledger-model/index`.
3. Build a mental model of how the :doc:`Ledger API </app-dev/ledger-api>`
is used to :doc:`build DAML Applications </app-dev/app-arch>`.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/daml/intro/6_Parties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,4 @@ Therefore, the consequences of ``TryA`` are only authorized by Alice. Bob's auth
Next up
-------

In :doc:`7_Composing` you will finally put everything you have learned together to build a simple asset holding and trading model akin to that in the :doc:`/getting-started/quickstart`. In that context you'll learn a bit more about the ``Update`` action and how to use it to compose transactions, as well as about privacy on DAML ledgers.
In :doc:`7_Composing` you will finally put everything you have learned together to build a simple asset holding and trading model akin to that in the :doc:`/app-dev/bindings-java/quickstart`. In that context you'll learn a bit more about the ``Update`` action and how to use it to compose transactions, as well as about privacy on DAML ledgers.
2 changes: 1 addition & 1 deletion docs/source/daml/intro/7_Composing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
7 Composing choices
===================

It's time to put everything you've learnt so far together into a complete and secure DAML model for asset issuance, management, transfer, and trading. This application will have capabilities similar to the one in :doc:`/getting-started/quickstart`. In the process you will learn about a few more concepts:
It's time to put everything you've learnt so far together into a complete and secure DAML model for asset issuance, management, transfer, and trading. This application will have capabilities similar to the one in :doc:`/app-dev/bindings-java/quickstart`. In the process you will learn about a few more concepts:

- DAML projects, packages and modules
- Composition of transactions
Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting-started/app-architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,4 @@ You'll see this more as you develop :doc:`your first feature <first-feature>` fo

.. rubric:: Footnotes

.. [#f1] FYI Behind the scenes the DAML React hooks library uses the `DAML Ledger TypeScript library <https://www.npmjs.com/package/@daml/ledger>`_ to communicate with a ledger implementation via the :doc:`HTTP JSON API </json-api/index>`.
.. [#f1] FYI Behind the scenes the DAML React hooks library uses the `DAML Ledger TypeScript library </app-dev/bindings-ts/daml-ledger/index>`_ to communicate with a ledger implementation via the :doc:`HTTP JSON API </json-api/index>`.
2 changes: 1 addition & 1 deletion docs/source/getting-started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ We support running the SDK on Windows 10. To install the SDK on Windows, downloa
Next steps
**********

- Follow the :doc:`quickstart guide <quickstart>`.
- Follow the :doc:`getting started guide </getting-started/index>`.
- Use ``daml --help`` to see all the commands that the DAML assistant (``daml``) provides.
- If you run into any problems, :doc:`use the support page </support/support>` to get in touch with us.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DAML SDK documentation
:caption: Getting started

Installing the SDK <getting-started/installation>
getting-started/index
Building Your App <getting-started/index>
getting-started/testing

.. toctree::
Expand Down
8 changes: 4 additions & 4 deletions docs/source/json-api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Alternatively, here are two tokens you can use for testing:

- ``{"https://daml.com/ledger-api": {"ledgerId": "MyLedger", "applicationId": "foobar", "actAs": ["Bob"]}}``
``eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwczovL2RhbWwuY29tL2xlZGdlci1hcGkiOnsibGVkZ2VySWQiOiJNeUxlZGdlciIsImFwcGxpY2F0aW9uSWQiOiJmb29iYXIiLCJhY3RBcyI6WyJCb2IiXX19.zU-iMSFG90na8IHacrS25xho3u6AKnSlTKbvpkaSyYw``

For production use, we have a tool in development for generating proper
RSA-encrypted tokens locally, which will arrive when the service also
supports such tokens.
Expand Down Expand Up @@ -326,9 +326,9 @@ Examples
Create a new Contract
*********************

See the request documentation below on how to create an instance of ``Iou`` contract from the :doc:`Quickstart guide </getting-started/quickstart>`:
See the request documentation below on how to create an instance of ``Iou`` contract from the :doc:`Quickstart guide </app-dev/bindings-java/quickstart>`:

.. literalinclude:: ../getting-started/quickstart/template-root/daml/Iou.daml
.. literalinclude:: ../app-dev/bindings-java/quickstart/template-root/daml/Iou.daml
:language: daml
:lines: 9-15

Expand Down Expand Up @@ -431,7 +431,7 @@ Exercise by Contract ID

The JSON command below, demonstrates how to exercise ``Iou_Transfer`` choice on ``Iou`` contract:

.. literalinclude:: ../getting-started/quickstart/template-root/daml/Iou.daml
.. literalinclude:: ../app-dev/bindings-java/quickstart/template-root/daml/Iou.daml
:language: daml
:lines: 23, 52-55

Expand Down
2 changes: 1 addition & 1 deletion docs/source/support/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3197,7 +3197,7 @@ No user-facing changes.
-------------------
- **Documentation**: :doc:`DAML documentation </daml/reference/index>` and :doc:`examples </examples/examples>` now use DAML 1.2.
- **Documentation**: Added a comprehensive :doc:`quickstart guide </getting-started/quickstart>` that replaces the old "My first project" example.
- **Documentation**: Added a comprehensive :doc:`quickstart guide </app-dev/bindings-java/quickstart>` that replaces the old "My first project" example.
As part of this, removed the My first project, IOU and PvP examples.
- **Documentation**: Added a :doc:`guide to building applications against a DAML ledger </app-dev/app-arch>`.
Expand Down
Loading

0 comments on commit 3895c2d

Please sign in to comment.