Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
[Master] Add caveats/advisory for scope of generators (Angular/CLI) p…
Browse files Browse the repository at this point in the history
…lus Multi-Org Fabric v1.2.1 update (#4451)

* Add a gentle caveat, describing the extent of the Angular generator, with ref link to writing web apps doc

Signed-off-by: Paul O'M <[email protected]>

* Add caveat about scope/extent of Angular skeleton app generator 

Signed-off-by: Paul O'M <[email protected]>

* Add caveat about extent/scope of the skeleton app generators (Angular and CLI)

Signed-off-by: Paul O'M <[email protected]>

* Updated to pull Fabric 1.2.1 images/platform binaries

Signed-off-by: Paul O'M <[email protected]>
  • Loading branch information
Paul O'M authored Oct 9, 2018
1 parent 5e2abe2 commit 860536f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion packages/composer-website/jekylldocs/applications/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ The flow for building an Angular application is as follows:

<img src="../assets/img/Angular.svg" style="border: none;" alt="Angular Generator Flow">

If you already have a Business Network Archive and would like to build a skeleton Angular application, use the following reference instructions, if you would like to fully understand how to develop a BNA from scratch and build an application from there please see the [Developer Tutorial](../tutorials/developer-tutorial.html).
If you already have a Business Network Archive and would like to build a skeleton Angular application (see note below), use the following reference instructions, if you would like to fully understand how to develop a BNA from scratch and build an application from there please see the [Developer Tutorial](../tutorials/developer-tutorial.html).

Note:

The Yo Angular application generator only supports simple, basic business network model definitions - it is a simple application generator. The generated application (including the web forms it produces) will not support more complex types or field expressions - eg. concepts do not work, and other more complex modeled types or expressions too - you should check errors upon generation, or when using the skeleton app (eg. internal errors posted in the Angular application), and check for exceptions/validation errors in the REST server logging where the REST server was started. Note that concepts (an abstract class in the modeling language) if defined, are ignored if present in your model file, so as to complete generation of the skeleton application. It applies whether you connect to an existing business network, or generate an Angular skeleton from a business network archive (BNA) file. Complex field definitions (concepts is an example) or expressions will not appear in the generated HTML forms, and won't do, unless you choose to go on and customise the skeleton web application yourself.

**Prerequisites**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ In order to follow this tutorial, you must start up a fresh {{site.data.conrefs.

2. Download the platform binaries, including cryptogen using this command (three parameters needed for the bash command):

curl -sSL http://bit.ly/2ysbOFE | bash -s 1.2.0 1.2.0 0.4.10
curl -sSL http://bit.ly/2ysbOFE | bash -s 1.2.1 1.2.1 0.4.10

Verify the list of docker images downloaded without issues.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Deploying a business network to the {{site.data.conrefs.hlf_full}} requires the

The generated API is connected to the deployed blockchain and business network.

## Step Six: Generating an application
## Step Six: Generating a skeleton Angular application

{{site.data.conrefs.composer_full}} can also generate an Angular 4 application running against the REST API.

Expand All @@ -262,3 +262,5 @@ The generated API is connected to the deployed blockchain and business network.
8. Select **Namespaces are not used**

The Angular generator will then create the scaffolding for the project and install all dependencies. To run the application, navigate to your angular project directory and run <code-block type="commands" sub-type="npm" identifier="start-app" > `npm start` </code-block>. This will fire up an Angular 4 application running against your REST API at <code-block type="arguments" sub-type="request" identifier="app-url" > `http://localhost:4200` </code-block>.

Note: The Yo Angular application generator is aimed at generating skeleton web applications, based on simple and basic business network model definitions (such as the `trade-network` network model here). See more the Angular generator at [Writing Web Applications](../applications/web.html)
8 changes: 7 additions & 1 deletion packages/generator-hyperledger-composer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ We're going to assume that you've been through the Getting Started section and w

To help getting started with this, there's a [Yeoman](http://yeoman.io/) generator that creates a suitable directory structure and helps bring in the required model and network modules.

Note:

The Yo Angular application generator only supports simple, basic business network model definitions - it is a simple application generator. The generated application (including the web forms it produces) will not support more complex types or field expressions - eg. concepts do not work, and other more complex modeled types or expressions too - you should check errors upon generation, or when using the skeleton app (eg. internal errors posted in the Angular application), and check for exceptions/validation errors in the REST server logging where the REST server was started. Note that concepts (an abstract class in the modeling language) if defined, are ignored if present in your model file, so as to complete generation of the skeleton application. It applies whether you connect to an existing business network, or generate an Angular skeleton from a business network archive (BNA) file. Complex field definitions (concepts is an example) or expressions will not appear in the generated HTML forms, and won't do, unless you choose to go on and customise the skeleton web application yourself.

Please note the same advisory applies to the CLI generator and generated app (ie `yo hyperledger-composer:cli` below ) - the simple node JS application will not show complex types or field expressions in any sample asset listings, and again may show exceptions etc. etc.

## Yeoman

If you don't already have it, install Yeoman
Expand Down Expand Up @@ -206,4 +212,4 @@ The application can be started using ``npm start``.
The application can be tested using ``npm test``.

## License <a name="license"></a>
Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Hyperledger Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.
Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Hyperledger Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.

0 comments on commit 860536f

Please sign in to comment.