Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tutorial for cobigen angular client generation #73

Conversation

suvmanda
Copy link
Contributor

commit1 tutorial for cobigen angular client generation

 commit1 tutorial for cobigen angular client generation
@github-actions
Copy link

You can view the generated tutorials of this PR on https://www.katacoda.com/devonfw-dev in a few minutes. You just have to wait for the next run of the deployment action https://github.com/devonfw-tutorials/katacoda-scenarios-dev/actions

rename to installCobiGen()
@github-actions
Copy link

Thanks for submitting your work on a (new) tutorial!

Some suggestions, which might help:

  • Title: Focus on what you want to train in a few words. Don't be too generic
  • Tutorial:
    • Address the user directly.
    • Explain why the steps are necessary.
    • Explain what are the results and why are they necessary for your next step.
    • Forward the user to more elaborate documentation on the website (deep links) for further reading

Also please find further help for creating tutorials here or more help regarding the tutorial syntax here.

You can view the generated tutorials of this PR here in a few minutes. You just have to wait for the run of the deployment action to finish.

When you think you are done writing the tutorial try the tutorial on the deveplopment area and check if you explained every step in a way someone who is trying to learn what you are teaching can understand. Ideally ask someone to have a look on what you have done and have that part double checked because this is very important.

suvmanda added 3 commits April 1, 2021 10:12
remove hyphen
Testing backendServer
@suvmanda suvmanda changed the title commit1 tutorial for cobigen angular client generation tutorial for cobigen angular client generation Apr 1, 2021
updated to backendServer/server
@suvmanda suvmanda linked an issue Apr 5, 2021 that may be closed by this pull request
tutorial for angular client generation with cobigen
@SchettlerKoehler
Copy link
Collaborator

Please fill the body of the PR with the answer to the following questions:
What will the user learn in your tutorial?
What should the user already know when starting the tutorial?

Please change the description of the tutorial to meet the following requirements:
The description must describe the prerequisites of a tutorial. It must contain a '== Prerequisites' part. The description should describe what the user will learn in the tutorial. It must contain a '== Learning goals' part.

Please make sure that your tutorial focuses on the learning goal you stated in the description. We should have many small tutorials focussing on different aspects and not only a few big tutorials. This way the user can focus on learning the stuff he needs.

added port
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tutorial description in file cobigen-angular-client-generation/index.asciidoc does not meet the desired requirements. The description must describe the prerequisites of a tutorial. It must contain a '== Prerequisites' part. The description should describe what the user will learn in the tutorial. It must contain a '== Learning goals' part.

Added port
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tutorial description in file cobigen-angular-client-generation/index.asciidoc does not meet the desired requirements. The description must describe the prerequisites of a tutorial. It must contain a '== Prerequisites' part. The description should describe what the user will learn in the tutorial. It must contain a '== Learning goals' part.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tutorial description in file cobigen-angular-client-generation/index.asciidoc does not meet the desired requirements. The description must describe the prerequisites of a tutorial. It must contain a '== Prerequisites' part. The description should describe what the user will learn in the tutorial. It must contain a '== Learning goals' part.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tutorial description in file cobigen-angular-client-generation/index.asciidoc does not meet the desired requirements. The description must describe the prerequisites of a tutorial. It must contain a '== Prerequisites' part. The description should describe what the user will learn in the tutorial. It must contain a '== Learning goals' part.

added angular client generation
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tutorial description in file cobigen-angular-client-generation/index.asciidoc does not meet the desired requirements. The description must describe the prerequisites of a tutorial. It must contain a '== Prerequisites' part. The description should describe what the user will learn in the tutorial. It must contain a '== Learning goals' part.

changed to cobigenexample
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tutorial description in file cobigen-angular-client-generation/index.asciidoc does not meet the desired requirements. The description must describe the prerequisites of a tutorial. It must contain a '== Prerequisites' part. The description should describe what the user will learn in the tutorial. It must contain a '== Learning goals' part.

added Prerequisites and  Learning goals
@derochs
Copy link
Collaborator

derochs commented Apr 15, 2021

The server running on 8081 cannot be found. Try using port 8080 instead, in index.asciidoc line 39

changed port number
CobiGen is integrated via plugin in the VS Code IDE. We will use it to generate code from one single java class based on existing templates.
[step]
--
createDevon4ngProject("cobigenexample", "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are trying to create a angular project with the name cobigenexample, but you already, created a project in the same directory with the same name

==== is missing and vscode added
removed ====
@suvmanda suvmanda requested a review from GuentherJulian April 27, 2021 14:39
createDevon4ngProject("cobigenangularexample", "")
buildNg("cobigenangularexample")
runClientNg("cobigenangularexample/angular", { "startupTime": 200, "port": 4200, "path": "" })
createFile("cobigenangularexample/core/src/main/java/com/example/application/cobigenangularexample/customermanagement/dataaccess/api/CustomerEntity.java", "files/CustomerEntity.java")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file has to be created in the java project not the angular project

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createFile("cobigenangularexample/core/src/main/java/com/example/application/cobigenangularexample/customermanagement/dataaccess/api/CustomerEntity.java", "files/CustomerEntity.java")
@GuentherJulian I am working on this..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed with @GuentherJulian its fixed with Angular client generation.

comments fixed
@suvmanda suvmanda requested a review from GuentherJulian April 28, 2021 16:39
restructuring the code
fix syntax
restoreDevonfwIde(["java", "mvn", "vscode"])
--

For this tutorial an installation of the devonfw IDE is required, which was already set up for you. The next step is to install the CobiGen CLI.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should say that this is only required the first time you use it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should say that this is only required the first time you use it

Added in the above line..

installCobiGen()
--

CobiGen uses the backend classes for generating your code used in the Angular application. So in the next steps you will create a java project, create a simple java class.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if you could explain this in more detail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if you could explain this in more detail.

More explanation is added .

--
cobiGenJava("cobigenjavaexample/api/src/main/java/com/example/application/cobigenjavaexample/customermanagement/logic/api/to/CustomerEto.java",[1])
--
your Angular client will be generated inside your devon4ng-application-template/src folder.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

corrected the line.

cobiGenJava("cobigenjavaexample/api/src/main/java/com/example/application/cobigenjavaexample/customermanagement/logic/api/to/CustomerEto.java",[1])
--
your Angular client will be generated inside your devon4ng-application-template/src folder.
====
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should explain what the user should do with the generated files. How can they be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should explain what the user should do with the generated files. How can they be used?

Added Client application for displaying your entities within minutes. Please check if any modification require.

@suvmanda suvmanda requested a review from SchettlerKoehler May 5, 2021 17:55
suvmanda added 2 commits May 10, 2021 17:08
spelling fixed
conclusion added
@suvmanda suvmanda requested a review from sujith-mn May 20, 2021 09:44
Copy link
Contributor

@sujith-mn sujith-mn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the comments

adaptTemplatesCobiGen()
cobiGenJava("cobigenjavaexample/core/src/main/java/com/example/application/cobigenjavaexample/customermanagement/dataaccess/api/CustomerEntity.java",[5])
--
The CobiGen code generator will generate some java classes for you. These contain code for Transfer object, REST service handling and data access and so on.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CobiGen code generator will generate code for Transfer object, REST service handling and data access and so on.


====
====
Now you can go through api module of your java project and use Cobigen again to generate your client.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geneate your clinet ~ generate your front end (angular code).

@SchettlerKoehler
Copy link
Collaborator

What is the state of this PR?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of your course is already used on a playbook. Please change the name.

@suvmanda suvmanda closed this Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tutorial for angular client generation with cobigen
8 participants