DEV Community

Cover image for Is the use of scaffolding a good idea for a junior dev?
Carlos Fuentes
Carlos Fuentes

Posted on • Edited on

Is the use of scaffolding a good idea for a junior dev?

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.

First, What is a Scaffolding (Generator)?

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.

Yeoman

Beyond good and evil

What is the good if I use it?

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.

So, what is wrong if I use it?

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.

Conclusion

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.

Top comments (13)

Collapse
 
bgadrian profile image
Adrian B.G.

AHH so you mean bootstrapping.

Last week a spent 3h building what react-create-app does in 5seconds, because I wanted to learn webpack. I have many yes of full stack web development,as a context.

My answer is not related to the Devs experience or knowledge,but instead of the purpose.

Are you building a product that needs to be online by tomorrow,and you want bulletproof setup because you are getting paid? OR you already did the bootstrapping job many times. Yes, use it.

Are you building a project to learn? Then learn,open an empty file and start learning and building. Answer is no. For learning projects.

Collapse
 
metcoder profile image
Carlos Fuentes

haha, yeah, I searched in google for the name of these plugins or how can I name it and only find Scaffolding and Generators.

So true, I agree with you. A great time saver when you need it and if you have a good understanding of how it works. Thanks for the comment :)!

Collapse
 
thomaswdmelville profile image
Thomas Melville

Great post, thanks.
I'm reminded of some tips in the book, the pragmatic programmer.
"Don't program by coincidence" and "beware evil wizards"
Both advise understanding the code and tools you use.

Collapse
 
metcoder profile image
Carlos Fuentes

A lot of truth in those words. Thanks! :)

Collapse
 
z0al profile image
z0al • Edited

Hi,

You've some broken links here:

start the project (like express-generator for Expressjs).

And here too:

I found a great one called rest using yeoman.

I guess you've written the markup like this:

I found a great one called [rest]((https://github.com/diegohaz/rest)) using [yeoman]((http://yeoman.io))

The double parentheses caused the links to render like:

<a href="(https://github.com/diegohaz/rest)">rest</a>
<a href="(http://yeoman.io)">yeoman</a>

Kindly, remove the additional parentheses to correct the output.

OK, my comment is totally unrelated to the topic of your post. Good post btw, keep it up ;)

Collapse
 
metcoder profile image
Carlos Fuentes

My mistake, an apology. Already solved and thank you very much. Regards! :)!

Collapse
 
martyonthefly profile image
Sylvain Marty

Hi Carlos,

When I start to use a new tech, I always try to avoid the "starter kits" because they often use a lot of advanced concept that I don't understand yet. But when you have experimented some of these concepts, starter kits are more efficient.

Moreover, I think scaffolding is a good way to focus on business logic more than non-fonctional logic.

Great article, keep it up! :)

Collapse
 
metcoder profile image
Carlos Fuentes

Hi and thank you very much!
I agree with you.
I do the same in the same situation. I always try to avoid them, this to focus on know how it works and the workflow that the tech has. That makes me take fully understanding of the tech.

Adding to your comment, I think scaffolding gives to you the opportunity to, once you understand the tech, know how more tools of the tech work and get some idea of how you can implement in your project, and in the way, how bootstrapping in an efficient way.

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Maybe good for learning, but scaffolding is the ultimate form of redundant coding and carries all the problems of copying-and-pasting.

The unfortunate world of boilerplate code

Collapse
 
liaudanskis2 profile image
BLukas Liaudna

I was reading articles on this site for a while now and I have never seen such a poor quality article yet... No offense but you are not experienced enough to teach others, also stop trying to sound clever by using words you don't fully understand. Furthermore, PLEASE CHECK YOUR GRAMMAR before posting...

Collapse
 
seyiogunjuyigbe profile image
Oluwaseyi Ogunjuyigbe

This was highly unnecessary to be honest. You could have just passed your comment constructively without sounding condescending. The author clearly stated their inexperience and wasn't appearing to sound like a know-it-all.

Collapse
 
metcoder profile image
Carlos Fuentes

Thanks for your comment, I fully understand what are you saying. I'm starting on this and I just trying to share my point of view about this, I never try to teach anything. And, about my grammar, thanks for your feedback. In the next article, I will be more careful with that, wrote an article is a way to practice my English, is not my native language. Again, thanks for your feedback :)

Collapse
 
sambenskin profile image
Sam Benskin

I think for learning you really need to start with the basics and get your hands dirty.

Reading about a concept is very different to building it. You'll take in and retain more of that information if you actually build the solution.

Once you've built it and understand the subtleties of how it works, then next time you can reuse what you've built or learnt, or use a scaffold to get started so you can move onto learning to build something else.