KBP 1 — launching ‘know it all’ project starters
To continue #ericmonthlywriting on Twitter and #ericmonthlywriting on LinkedIn, I am starting a series of articles with code samples to share and discuss how we can make reusable project starters for you/your team.
PS: KBP — Kirby Best Practice
Why Project Starter
As a programmer, we are always asked to DRY, therefore the very first step of a project, we must make sure it’s reusable.
If you started programming in the wave of Django/Ruby on Rails, scaffolding like the above is not new to you. Not mentioning about yoman which leads this approach into an extend. If you are a Spring Boot fan, you must have bookmarked Spring Initializr.
Is it good enough for you? Would you like to find out how to create a customized project starter for yourself/your team? Please read on to find out more.
Basic Elements Of Project Starter
project default configuration
Is there a time you and your teammates are arguing about space/tab to use?
You need a .editorconfig file to help you.
Is there a time you or your teammate accidentally commit some unwanted files (e.g. .DS_Store or Desktop.ini) into the git repository?
You need a .gitignore file to help you.
You are using Lombok to save you time from dealing with Plain Old Java Object (POJO)?
You need a lombok.config to help you.
The default configuration is the agreement for your team to make sure the code in the repo looks like from the same team.
project helper scripts
You must have a set of scripts be it bash or bat or makefile, to help every team member to clean up, test and build the project without hassle. This is also the foundation if you want your project to be CICD ready.
Below is the list of scripts I find useful:
- clean up script
- test script
- build artifact script
project documentation
As a minimal, the project must have a README file to tell users why the project exists and how to use it.
If you are hosting the project on Github, considering adding the followings to allow others to understand more on how to collaborate with you:
Next month Preview
In this article, we have cleaned the reason why we need project starter and the basics of a project starter, next month, we will start with Spring Boot + Gradle to build our first starter together.