Skip to content

Java Getting Started (+ rewrite without "cdk init")#245

Merged
eladb merged 3 commits intomasterfrom
benisrae/java-getting-started
Jul 9, 2018
Merged

Java Getting Started (+ rewrite without "cdk init")#245
eladb merged 3 commits intomasterfrom
benisrae/java-getting-started

Conversation

@eladb
Copy link
Copy Markdown
Contributor

@eladb eladb commented Jul 8, 2018

Add getting started and welcome in Java (and JavaScript).

Rewrite "Getting Started" to detail the process of defining CDK apps
without using cdk init. This is in order to improve the understanding
of users when they onboard the CDK, which fixes #219.

  • Fix TOC to include only two layers deep which fixes "cdk docs" opens on "index" and it's not very useful #129.
  • Removed "Developing Libraries" for now to avoid confusion. We need to work on this topic a bit further. In the meantime, users who wish to contribute should look at CONTRIBUTING.

Download rendered docs for your viewing pleasure.

Add getting started and welcome in Java (and JavaScript).

Rewrite "Getting Started" to detail the process of defining CDK apps
without using `cdk init`. This is in order to improve the understanding
of users when they onboard the CDK, which fixes #219.

Fix TOC to include only two layers deep which fixes #129.
@eladb eladb requested review from Doug-AWS and rix0rrr July 8, 2018 12:50

Metric objects
--------------
## Metrics
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Haha :) I had this changed in my local copy. Thanks :P

The process of creating your AWS resources using the |cdk| is straightforward:

1. Install the |cdk| on your development machine
1. Install the |cdk| on your development machine (see setup instructions in README).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider making README a link... Or at least hint on where to find it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rephrased

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will change post-beta anyway

.. code-tab:: ts

import { App, Stack, StackProps } from '@aws-cdk/core';
import * as cdk from '@aws-cdk/core';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's some interesting discussions to be had on import * as foo from 'bar'; versus import { Foo, Baz } from 'bar';. I think we should devise some kind of a guideline...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree. I think we should move away from instructing people to import individual classes because the CDK is a huge class library and we occasionally use names that are contextual. I think codecommit.Repository and cdk.App read much better than Repository and App.

If you guys agree, I will open an issue to track converting our examples to this scheme.

@eladb eladb merged commit e4240d2 into master Jul 9, 2018
@eladb eladb deleted the benisrae/java-getting-started branch July 9, 2018 08:13
@Doug-AWS
Copy link
Copy Markdown
Contributor

Doug-AWS commented Jul 9, 2018

Quick question about cdk.json for TypeScript, which currently shows:

{
"app": "node index.js"
}

Should it be:

{
"app": "node index.ts"
}

@RomainMuller
Copy link
Copy Markdown
Contributor

RomainMuller commented Jul 9, 2018

@Doug-AWS Nope - it's the javascript (aka compiled code) that node knows how to execute.

@Doug-AWS
Copy link
Copy Markdown
Contributor

Doug-AWS commented Jul 9, 2018

Gotcha

@NGL321 NGL321 added the contribution/core This is a PR that came from AWS. label Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace "cdk init" with better getting started instructions "cdk docs" opens on "index" and it's not very useful

5 participants