DEV Community

Cover image for Projen - The Next CDK Surprise
Philip M. Gollucci for AWS Community Builders

Posted on • Updated on

Projen - The Next CDK Surprise

State of the Union

Alt Text

Why projen

That's a really good question, isn't it? After all, there is a new templator or scaffolder practically daily.

So let's start by agreeing, that you don't want to set up your environment each time and you need to be able to make updates across several projects all at different stages. Next, you're not special. You don't need a customized to the 'T' workflow. Releasing things is pretty standard these days in all major languages. Sure you can customize it, but you don't need your own.

Web Development in 2020 "has a high bar with a tremendous amount of tools" said Elad Ben-Israel, projen's creator. Stop wasting time cutting and pasting then working for months to shake out the kinks. No, you are not crazy, this setup is NOT trivial. It took the AWS CDK team themselves MONTHS to get this right.

To quote Amazon Web Services, this is "undifferentiated heavy lifting" -- focus on your business value.

Finally, why do you want to be building and changing this underneath of the contributors causing rework? If you have it on day 1, your time-to-market is drastically decreased which leads to faster customer feedback cycles and intimacy.

What is projen

To put it simply, projen is A CDK for software projects. So now we have:

  • AWS CDK
  • Kubernetes CDK
  • Terraform CDK
  • Software CDK (projen)

I would be remiss to not point out that both the Kubernetes CDK, awslabs/cdk8s, and Terraform CDK, hashicorp/terraform-cdk both already use projen.

All CDKs are based on Amazon's Constructs, (which also uses projen). They come with a CLI and Development Kit (API). In short, you set up an Object in code and then synthesize the representation to disk. This opens up the full power of programming languages. If you are sick of the issues with terraform, CloudFormation Templates, troposphere, Azure Blue Prints, or the like then this is for you.

This does not mean you shouldn't use JSON or YAML et al, after all, they are being called the assembly language of the web. Does anyone here want to write x86 NASM or Intel-based assembly? Then don't! Work in a higher-level language like TypeScript/JavaScript, Python, C# family, Java, or soon GoLang. I'm betting Rust is next. All of these are in reach due to projen being based on JSII.

Trust me it will change your life - JOIN us in THE #TemplatesAreEvil MOVEMENT!

About the projen community today

Today, the main community hubs are the CDK.dev Slack #projen channel and the GitHub project.

Launching with this blog is projen's GitHub Awesome List. You'll want to spend a few minutes reviewing this to see what's out there.

The list itself is created by a projen external project type

which just shows how extensible projen really is. Also that both the list and project were built end-2-end in 2 days complete with CI/CD, releasing, approvals, and linting.

If I was a betting person, and I am, I would bet that the awesome-projen list represents about 10% of what's out there for projen.

There is going to be a monthly video community meeting hosted by Elad starting in January 2021. You can sign up for the invites with this Google Group. The first meeting will be Wed January 20, 2021, 12-~1p PST.

Where is projen going next

Start with the Vision. Then move onto the Roadmap:

  • Multi-language support: ideally projenrc should be in the same language as your application code.
  • External components & projects: projen new should be able to list project types from registered 3rd party modules so we can grow the ecosystem easily.
  • Components: re-think/re-factor how components and projects interact to allow more modular and composable usage.
  • Discoverability of external components/modules through the CLI
  • Support projenrc in YAML (fully declarative, if one desires)
  • projen SCRIPT: make the CLI extensible so it can become the project entry point (instead of e.g. yarn/npm, etc).
  • CLI bash & zsh completion

After that, you're going to have to look at issues or prs, but I've summed up the big-ticket items below for you

  • mkdocs component which will also host the formal docs site
  • CodeSpaces component
  • GitLabcomponent
  • Lambda Function project (touches on AWS SAM)
  • Dependency modeling
  • Built-in CDKTF project
  • AWS Codepipeline support
  • Integration tests for Applications
  • Direct deploy to AWS from GitHub Actions

How to contribute

Join the slack channel and say hello. Use it. Send a pr to extend it. But most importantly have fun and enjoy the community. Community Over Code!

Top comments (10)

Collapse
 
pgollucci profile image
Philip M. Gollucci

We are collecting discussion items for projen’s first community meeting. github.com/projen/projen/issues/457. Sign up here (free) - eventbrite.com/e/projen-community-...

Collapse
 
kayis profile image
K

I still don't understand what projen is/does. 🤔

Collapse
 
pgollucci profile image
Philip M. Gollucci

Basically, it generates your repo from TypeScript with a massive tons of bells and whistles and provides out-of-the-box capabilities for many things like AWS CDK

Collapse
 
skyrpex profile image
Cristian Pallarés

The best part is that this generated repo is actually maintained and can be updated any time.

Thread Thread
 
pgollucci profile image
Philip M. Gollucci

truth. I've probably updated projen 500+ times in December across 30+ repos. It didn't take me very long...........

Collapse
 
ndrestone profile image
André

You might want to add that although Projen was conceived with the Constructs programming model in mind, it no longer uses the Amazon's Constructs package.

Collapse
 
pgollucci profile image
Philip M. Gollucci

It will in the future, its part of the plan

Collapse
 
elyusubov_95 profile image
EL Yusubov

Thank you Phil for a detailed post!

Collapse
 
jwp profile image
John Peters

I read this article thinking CDK was talking about Material CDK. I learned a new thing today as this is about Amazon CDK which stands for Cloud Development Kit.

Thanks!

Collapse
 
pgollucci profile image
Philip M. Gollucci

So did I which is quite helpful considering I'm working on MKdocs for projen!