From 58593ae95a3d8f59bfc113acd424b93434128caf Mon Sep 17 00:00:00 2001 From: jyunmitch Date: Wed, 29 Nov 2023 11:14:30 -0600 Subject: [PATCH 1/2] ENDOC-771-Data-model --- .../tutorials/create/ms/update-data-model.md | 27 ++++++++++++++++--- .../tutorials/create/ms/update-data-model.md | 20 +++++++++++++- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/vuepress/docs/next/tutorials/create/ms/update-data-model.md b/vuepress/docs/next/tutorials/create/ms/update-data-model.md index 967aa525a6..349c6823a3 100644 --- a/vuepress/docs/next/tutorials/create/ms/update-data-model.md +++ b/vuepress/docs/next/tutorials/create/ms/update-data-model.md @@ -12,7 +12,7 @@ This tutorial explains how to use the [Entando Component Generator](../../../doc A [Blueprint-generated project](./generate-microservices-and-micro-frontends.md) ## Tutorial -The steps below assume you're working out of the root directory of the microservice, e.g. /microservices/conference-ms. +The steps below must be performed from the directory of the specific microservice, e.g. /microservices/conference-ms. 1. Use JHipster to extract the current application description. The resulting JHipster Domain Language (JDL) file contains your project's application configuration and entity definitions: ``` @@ -22,7 +22,7 @@ ent jhipster export-jdl export.jdl ``` entity Conference { name String -} + } ``` 3. Enhance this definition by adding fields, entities, table mappings, field validation, etc. This is easily accomplished with the [online JDL-Studio or corresponding JHipster IDE plugins/extensions](https://www.jhipster.tech/jdl/intro). For example: ``` @@ -53,9 +53,28 @@ This file content adds two fields to the Conference entity, introduces the Sessi ``` ent jhipster import-jdl conference.jdl ``` -If the default project structure has been retained, this step will update your data model, add entries to Liquibase to upgrade database schema during deployment, add service methods to your microservice, add fields to your MFEs, etc. -5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed. +If the default project structure has been retained, this step updates your data model, adds entries to Liquibase to upgrade database schema during deployment, adds service methods to your microservice, adds fields to your MFEs, etc. + - For pre-existing micro frontends, they need to be moved because they have been regenerated. From the project directory: + + ```shell + mv microservices/conference-ms/ui/widgets/conference/tableWidget/{.,}* microfrontends/conference-table + ``` + + - For new micro frontends, use the ent CLI to add them to the bundle descriptor, relocate them, and add an API claim to extablish the connection. From the project directory: + 1. Add the new MFE and move it to the `microfrontends/YOUR-NEW-MFE` folder: + ```shell + ent bundle mfe add YOUR-NEW-MFE + mv microservices/conference-ms/ui/widgets/conference/YOUR-NEW-MFE/{.,}* microfrontends/YOUR-NEW-MFE + ``` + 2. Add an API claim to connect the new MFE to the pertinent microservice. If this is an extension of the Blueprint generated project, an API claim should connect the new MFE to the `conference-ms` microservice. + + ``` + ent bundle api add YOUR-NEW-MFE conference-api --serviceName=conference-ms --serviceUrl=http://localhost:8081 + ``` + +See the [Generate Microservices and Micro Frontends](./generate-microservices-and-micro-frontends.md#configure-the-components) tutorial for step by step directions to adjust the bundle. +5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed. diff --git a/vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md b/vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md index 967aa525a6..359fc2de31 100644 --- a/vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md +++ b/vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md @@ -53,7 +53,25 @@ This file content adds two fields to the Conference entity, introduces the Sessi ``` ent jhipster import-jdl conference.jdl ``` -If the default project structure has been retained, this step will update your data model, add entries to Liquibase to upgrade database schema during deployment, add service methods to your microservice, add fields to your MFEs, etc. +If the default project structure has been retained, this step updates your data model, adds entries to Liquibase to upgrade database schema during deployment, adds service methods to your microservice, adds fields to your MFEs, etc. + - For pre-existing micro frontends, they need to be moved because they have been regenerated. From the project directory: + + ```shell + mv microservices/conference-ms/ui/widgets/conference/tableWidget/{.,}* microfrontends/conference-table + ``` + + - For new micro frontends, use the ent CLI to add them to the bundle descriptor, relocate them, and add an API claim to extablish the connection. From the project directory: + 1. Add the new MFE and move it to the `microfrontends/YOUR-NEW-MFE` folder: + ```shell + ent bundle mfe add YOUR-NEW-MFE + mv microservices/conference-ms/ui/widgets/conference/YOUR-NEW-MFE/{.,}* microfrontends/YOUR-NEW-MFE + ``` + 2. Add an API claim to connect the new MFE to the pertinent microservice. If this is an extension of the Blueprint generated project, an API claim should connect the new MFE to the `conference-ms` microservice. + + ``` + ent bundle api add YOUR-NEW-MFE conference-api --serviceName=conference-ms --serviceUrl=http://localhost:8081 + ``` +See the [Generate Microservices and Micro Frontends](./generate-microservices-and-micro-frontends.md#configure-the-components) tutorial for step by step directions to adjust the bundle. 5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed. From b74aaa0d5795860d4e7a036c007f63a9f271e5a0 Mon Sep 17 00:00:00 2001 From: jyunmitch Date: Fri, 1 Dec 2023 16:08:08 -0600 Subject: [PATCH 2/2] ENDOC-771-Data-model review edits & improvements --- .../tutorials/create/ms/update-data-model.md | 33 ++++++++-------- .../tutorials/create/ms/update-data-model.md | 38 ++++++++++--------- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/vuepress/docs/next/tutorials/create/ms/update-data-model.md b/vuepress/docs/next/tutorials/create/ms/update-data-model.md index 349c6823a3..c5e0f83633 100644 --- a/vuepress/docs/next/tutorials/create/ms/update-data-model.md +++ b/vuepress/docs/next/tutorials/create/ms/update-data-model.md @@ -3,16 +3,16 @@ sidebarDepth: 2 --- # Update the Project Data Model - -## Overview - -This tutorial explains how to use the [Entando Component Generator](../../../docs/create/component-gen-overview.md) powered by [JHipster](https://www.jhipster.tech/) to quickly update the data model for your Entando project. +This tutorial explains how to use the [Entando Component Generator](../../../docs/create/component-gen-overview.md) powered by [JHipster](https://www.jhipster.tech/) to quickly update the data model for your Entando Bundle project. ## Prerequisites -A [Blueprint-generated project](./generate-microservices-and-micro-frontends.md) + +- [A working instance of Entando](../../../docs/getting-started/) +- Verify dependencies with the [Entando CLI](../../../docs/getting-started/entando-cli.md#check-the-environment): `ent check-env develop` +- A [Blueprint-generated bundle project](./generate-microservices-and-micro-frontends.md) ## Tutorial -The steps below must be performed from the directory of the specific microservice, e.g. /microservices/conference-ms. +Steps 1 through 4 must be performed from the directory of the specific microservice, e.g. YOUR-BUNDLE-PROJECT/microservices/conference-ms. 1. Use JHipster to extract the current application description. The resulting JHipster Domain Language (JDL) file contains your project's application configuration and entity definitions: ``` @@ -24,7 +24,7 @@ entity Conference { name String } ``` -3. Enhance this definition by adding fields, entities, table mappings, field validation, etc. This is easily accomplished with the [online JDL-Studio or corresponding JHipster IDE plugins/extensions](https://www.jhipster.tech/jdl/intro). For example: +3. Enhance this definition by adding fields, entities, table mappings, field validation, etc. This can be accomplished with the [online JDL-Studio or corresponding JHipster IDE plugins/extensions](https://www.jhipster.tech/jdl/intro). For example: ``` entity Conference { name String required @@ -45,7 +45,7 @@ relationship OneToMany { Conference to Session } ``` -This file content adds two fields to the Conference entity, introduces the Session entity plus an enum, and creates a mapping between the two entities. Below is the updated data model in JDL-Studio: +This content adds two fields to the Conference entity, creates the Session entity and an enumeration, and defines the relationship between the two entities. Below is the updated data model in JDL-Studio: ![conference.jdl](./img/jhipster-jdl.png) @@ -54,26 +54,27 @@ This file content adds two fields to the Conference entity, introduces the Sessi ent jhipster import-jdl conference.jdl ``` -If the default project structure has been retained, this step updates your data model, adds entries to Liquibase to upgrade database schema during deployment, adds service methods to your microservice, adds fields to your MFEs, etc. - - For pre-existing micro frontends, they need to be moved because they have been regenerated. From the project directory: +If the default project structure has been retained, this step updates your data model, adds entries to Liquibase to upgrade the database schema during deployment, adds service methods to your microservice, adds fields to your MFEs, etc. + + - For pre-existing micro frontends, the component files need to be moved because they have been regenerated. From the bundle root directory: ```shell mv microservices/conference-ms/ui/widgets/conference/tableWidget/{.,}* microfrontends/conference-table ``` - - For new micro frontends, use the ent CLI to add them to the bundle descriptor, relocate them, and add an API claim to extablish the connection. From the project directory: + - For each new micro frontend, use the ent CLI to add it to the bundle descriptor, relocate the component files, and add an API claim to extablish the connection. From the bundle root directory: 1. Add the new MFE and move it to the `microfrontends/YOUR-NEW-MFE` folder: - ```shell - ent bundle mfe add YOUR-NEW-MFE - mv microservices/conference-ms/ui/widgets/conference/YOUR-NEW-MFE/{.,}* microfrontends/YOUR-NEW-MFE + ``` + ent bundle mfe add YOUR-NEW-MFE + mv microservices/conference-ms/ui/widgets/conference/YOUR-NEW-MFE/{.,}* microfrontends/YOUR-NEW-MFE ``` + 2. Add an API claim to connect the new MFE to the pertinent microservice. If this is an extension of the Blueprint generated project, an API claim should connect the new MFE to the `conference-ms` microservice. - ``` ent bundle api add YOUR-NEW-MFE conference-api --serviceName=conference-ms --serviceUrl=http://localhost:8081 ``` -See the [Generate Microservices and Micro Frontends](./generate-microservices-and-micro-frontends.md#configure-the-components) tutorial for step by step directions to adjust the bundle. +See the [Generate Microservices and Micro Frontends](./generate-microservices-and-micro-frontends.md#configure-the-components) tutorial for step by step instructions to adjust the bundle. 5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed. diff --git a/vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md b/vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md index 359fc2de31..c5e0f83633 100644 --- a/vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md +++ b/vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md @@ -3,16 +3,16 @@ sidebarDepth: 2 --- # Update the Project Data Model - -## Overview - -This tutorial explains how to use the [Entando Component Generator](../../../docs/create/component-gen-overview.md) powered by [JHipster](https://www.jhipster.tech/) to quickly update the data model for your Entando project. +This tutorial explains how to use the [Entando Component Generator](../../../docs/create/component-gen-overview.md) powered by [JHipster](https://www.jhipster.tech/) to quickly update the data model for your Entando Bundle project. ## Prerequisites -A [Blueprint-generated project](./generate-microservices-and-micro-frontends.md) + +- [A working instance of Entando](../../../docs/getting-started/) +- Verify dependencies with the [Entando CLI](../../../docs/getting-started/entando-cli.md#check-the-environment): `ent check-env develop` +- A [Blueprint-generated bundle project](./generate-microservices-and-micro-frontends.md) ## Tutorial -The steps below assume you're working out of the root directory of the microservice, e.g. /microservices/conference-ms. +Steps 1 through 4 must be performed from the directory of the specific microservice, e.g. YOUR-BUNDLE-PROJECT/microservices/conference-ms. 1. Use JHipster to extract the current application description. The resulting JHipster Domain Language (JDL) file contains your project's application configuration and entity definitions: ``` @@ -22,9 +22,9 @@ ent jhipster export-jdl export.jdl ``` entity Conference { name String -} + } ``` -3. Enhance this definition by adding fields, entities, table mappings, field validation, etc. This is easily accomplished with the [online JDL-Studio or corresponding JHipster IDE plugins/extensions](https://www.jhipster.tech/jdl/intro). For example: +3. Enhance this definition by adding fields, entities, table mappings, field validation, etc. This can be accomplished with the [online JDL-Studio or corresponding JHipster IDE plugins/extensions](https://www.jhipster.tech/jdl/intro). For example: ``` entity Conference { name String required @@ -45,7 +45,7 @@ relationship OneToMany { Conference to Session } ``` -This file content adds two fields to the Conference entity, introduces the Session entity plus an enum, and creates a mapping between the two entities. Below is the updated data model in JDL-Studio: +This content adds two fields to the Conference entity, creates the Session entity and an enumeration, and defines the relationship between the two entities. Below is the updated data model in JDL-Studio: ![conference.jdl](./img/jhipster-jdl.png) @@ -53,27 +53,29 @@ This file content adds two fields to the Conference entity, introduces the Sessi ``` ent jhipster import-jdl conference.jdl ``` -If the default project structure has been retained, this step updates your data model, adds entries to Liquibase to upgrade database schema during deployment, adds service methods to your microservice, adds fields to your MFEs, etc. - - For pre-existing micro frontends, they need to be moved because they have been regenerated. From the project directory: + +If the default project structure has been retained, this step updates your data model, adds entries to Liquibase to upgrade the database schema during deployment, adds service methods to your microservice, adds fields to your MFEs, etc. + + - For pre-existing micro frontends, the component files need to be moved because they have been regenerated. From the bundle root directory: ```shell mv microservices/conference-ms/ui/widgets/conference/tableWidget/{.,}* microfrontends/conference-table ``` - - For new micro frontends, use the ent CLI to add them to the bundle descriptor, relocate them, and add an API claim to extablish the connection. From the project directory: + - For each new micro frontend, use the ent CLI to add it to the bundle descriptor, relocate the component files, and add an API claim to extablish the connection. From the bundle root directory: 1. Add the new MFE and move it to the `microfrontends/YOUR-NEW-MFE` folder: - ```shell - ent bundle mfe add YOUR-NEW-MFE - mv microservices/conference-ms/ui/widgets/conference/YOUR-NEW-MFE/{.,}* microfrontends/YOUR-NEW-MFE + ``` + ent bundle mfe add YOUR-NEW-MFE + mv microservices/conference-ms/ui/widgets/conference/YOUR-NEW-MFE/{.,}* microfrontends/YOUR-NEW-MFE ``` + 2. Add an API claim to connect the new MFE to the pertinent microservice. If this is an extension of the Blueprint generated project, an API claim should connect the new MFE to the `conference-ms` microservice. - ``` ent bundle api add YOUR-NEW-MFE conference-api --serviceName=conference-ms --serviceUrl=http://localhost:8081 ``` -See the [Generate Microservices and Micro Frontends](./generate-microservices-and-micro-frontends.md#configure-the-components) tutorial for step by step directions to adjust the bundle. -5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed. +See the [Generate Microservices and Micro Frontends](./generate-microservices-and-micro-frontends.md#configure-the-components) tutorial for step by step instructions to adjust the bundle. +5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed.