From 860536f52e3441902634e4428da7e93ce5fb6cf4 Mon Sep 17 00:00:00 2001 From: Paul O'M Date: Tue, 9 Oct 2018 10:08:10 +0100 Subject: [PATCH] [Master] Add caveats/advisory for scope of generators (Angular/CLI) plus 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 * Add caveat about scope/extent of Angular skeleton app generator Signed-off-by: Paul O'M * Add caveat about extent/scope of the skeleton app generators (Angular and CLI) Signed-off-by: Paul O'M * Updated to pull Fabric 1.2.1 images/platform binaries Signed-off-by: Paul O'M --- packages/composer-website/jekylldocs/applications/web.md | 6 +++++- .../jekylldocs/tutorials/deploy-to-fabric-multi-org.md | 2 +- .../jekylldocs/tutorials/developer-tutorial.md | 4 +++- packages/generator-hyperledger-composer/README.md | 8 +++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/composer-website/jekylldocs/applications/web.md b/packages/composer-website/jekylldocs/applications/web.md index 5fc29d5e15..07fa8b7630 100644 --- a/packages/composer-website/jekylldocs/applications/web.md +++ b/packages/composer-website/jekylldocs/applications/web.md @@ -23,7 +23,11 @@ The flow for building an Angular application is as follows: 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** diff --git a/packages/composer-website/jekylldocs/tutorials/deploy-to-fabric-multi-org.md b/packages/composer-website/jekylldocs/tutorials/deploy-to-fabric-multi-org.md index d3a458c08b..30d7b6c0c7 100644 --- a/packages/composer-website/jekylldocs/tutorials/deploy-to-fabric-multi-org.md +++ b/packages/composer-website/jekylldocs/tutorials/deploy-to-fabric-multi-org.md @@ -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. diff --git a/packages/composer-website/jekylldocs/tutorials/developer-tutorial.md b/packages/composer-website/jekylldocs/tutorials/developer-tutorial.md index f1f01528ea..9639586d74 100644 --- a/packages/composer-website/jekylldocs/tutorials/developer-tutorial.md +++ b/packages/composer-website/jekylldocs/tutorials/developer-tutorial.md @@ -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. @@ -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 `npm start` . This will fire up an Angular 4 application running against your REST API at `http://localhost:4200` . + +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) diff --git a/packages/generator-hyperledger-composer/README.md b/packages/generator-hyperledger-composer/README.md index 40e4593a23..1ed44b6166 100755 --- a/packages/generator-hyperledger-composer/README.md +++ b/packages/generator-hyperledger-composer/README.md @@ -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 @@ -206,4 +212,4 @@ The application can be started using ``npm start``. The application can be tested using ``npm test``. ## License -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/. \ No newline at end of file +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/.