The last week, after I finished my first article (here is a link to go) I started a simple project just for implement some stuff that I read and learned in some articles here and in the wide world of the internet. Once I took in mind what stuff I will implement in the project, I searched in google (just for curious) for generators to start the project (like express-generator for Expressjs).
I found a great one called rest using yeoman. Once I installed and ran the generator, I took a look at the folder structure and the files, looking how it works all the stuff. When I finished understanding how it works, I took the time to think and make me one question: It's a good idea for a Junior Dev the use scaffolding?
To answer that question I decided to write this article, so I want to explain my point of view about scaffolding.
If we take a look how Yeoman describes itself, we can have an idea: "Is basically a plugin that can run a command to scaffold complete projects or useful parts".
In other words, it's a helpful command to create an entire project or partial project to get started.
Like yeoman, we can find other scaffolding tools to create skeletons for applications for various frameworks. We can find it in form of Ruby gems for Ruby on Rails, a NPM Package for Nodejs and much more.
The use scaffolding it's a good way to start a project. The creators of this tools research in books, internet, and other ways; giving to you the best of design patterns and best practices that they can find. They took his time to give you an approach of how you should structure your code and files to get a good and readable project.
This tools are made or should be made, with a module architecture. Giving to you the skeleton of an app that can grow in an intelligent and a readable way. This means that you have a support to build and grow your actual product.
Scaffolding is a very useful time-saver, giving to you a quick code that it works. This is an opportunity for saving time starting a project from scratch and giving to you the way to implement the things that you need with less stress. More of the generators implements tools that can take you a long time to implement by yourself, more if you don't have experience with that. It's a good way to know how the tools work and with an extra by the way, getting implemented in our project.
Well, if you are new in development or a Junior Dev like me, a lot I guess.
Most of the scaffolding that we can find outputs of some generic code. Some of them maintain that generic code up to date, others are up to date if you live in 2014. We can get the same if we talk about some packages or tools that have preinstalled or implemented.
With that generic code comes the customitation. Some of the generators are prepared just for bootstrapped quickly and have a hard way to modify to your needs. Obviously, depends on the level of the scaffolding. Some come with a scaffolding only in the structure of your code and files, and use of some tools, another come even with a pre-migrated ORM's, etcetera. Just making more unflexible for the developers to customize by what they need.
The scaffolding and the use of generators is a good way to begin and understand design patterns and best practices, only if we are careful in how we use and what we use. The way to get the best experience with the use of scaffolding is always getting to understand how it works, not only what command make it run. Going deeper in how it works, how each file communicates with each other, how the tools are working and how are configurated it's the best practice to get experience and prevent get problems with the use of generators.
The point is to always be curious. With the curiosity comes the experience and the knowledge.