Why It's bad to use boilerplate

Saturday, February 15, 2020 5 min read

In fact, the problem is not the boilerplates, like react-create-app or the Vue-cli, but some custom boilerplate which bundle multiple technologies like Electron + React or VuesJs + Electron.

You will have trouble, if you use an application with a package.json, you will maybe have a lot of dependencies that you will maybe never use.

Also, the architecture of the project will maybe not conform to the clean code ??

You will also see two types of documentation, some well-formed that will guide you and help you to configure the bundle and make it work well quickly.

Some others that are just weird and makes you mad, because it's not well-formed, they don't guide you, they don't really teach you how to configure the bundle.

Also, imagine, you start to use a project with a bundle boilerplate, great it's work, you're happy but now imagine there is a big breaking change because some package got a major update.

Now, you can't compile anymore your website/application, you don't know what have broken the application.

What I've Learned

The first things, that creating it and configure it will give you full control the project.

You will know everything about it and what you will use in development and in production, you will not add useless things.

Making it custom, permit you to learn about the configuration of framework/library, you will master them, making you working faster.

This will make you only install what you need to run the project, making you comfortable with the architecture.

To develop this blog, first I've used a boilerplate to use nextJs + tailwindcss, but I've made a mistake, I've never used nextjs and tailwind together

When I tried to modify the configuration of the boilerplate and I got stuck on so many problems.

I've just erased what I've started and created the project from scratch starting to install React with his own create-react-app, got initialize the nextJs, and install tailwind properly by myself.

I learned so much about how nextjs work that now I can just create another project without trouble.

I'm just glad to say, that you should never use a boilerplate from someone else, it will break your motivation down, reading, again and again, just to make it work properly will make you suffer, so thinks about, it's better to learn the tool /framework rather than learn a starting project.

This is why now I'm always working from scratch or with my custom boilerplate, that makes me more comfortable to create a website or an application and I don't suffer about understanding what I'm doing on it.

What you should do?

Regarding my experience, you should never use a boilerplate to start a project with a many framework or library, those boilerplate configurations will struggle to modify a single thing inside of it.

You should start a project from scratch and configure it as you want.

If you don't want to start from scratch all the time the same type of project, you should just create a custom boilerplate, the difference is you know everything about it.

No more trouble with documentation of how to use the boilerplate.

No more trouble with the configuration.

So from now, do you prefer to start with a boilerplate or from scratch?

@2021 Mickael Croquet. All Rights Reserved.