DEV Community


Framework vs Scratch code

adroitcoder profile image John Samuel Obinna ・2 min read

"I prefer using framework ", "Frameworks sucks! ",  "I just need something lite with less code and file" e.t.c. Often I've heard code newbies argue about using framework or scratch coding. Well, myself is not an exemption; i argue more often why scratch code makes you a better developer till I found these few secrets.

  • Time.
  • Tested and trusted.
  • Who cares?
  • Code Less.

  • Time

Time still remains a priority to every project. I still don't see a reason why anyone would want to build anything from scratch; when they can just grap a piece of code that works, and apply it to their project.

  • Tested and Trusted

Every popular framework out there has gone through a lot of testing before being pushed out for public consumption. It's bug free, and constantly going through some form of upgrade or maintenance.

  • Who Cares?

Many developers expecially "Freelancers" say these words: "Who cares what i build with, if the project is working then it's Ok"  Wrong,  most client these days really cares what you're actually building with. Nobody wants to hire a developer whose code can't be managed on maintained by someone else.

  • Code Less

Just like the first point, time still remains a priority. I can't imagine anyone who would want to build an SPA(Single  Page Application) from scratch. Framework can do a lot of cool stuffs for you... but don't forget, you have to understand the raw code to an extent before venturing into using any framework.

  • Conclusion

I'm not trying to paint "Scratch Code" bad, but in production and delivery perspective scratch code is not really the best option for me. Let me know your own opinion below.

Discussion (4)

Editor guide
tojacob profile image
Jacob Samuel G.

As with almost everything in development, it depends.

Developing without a framework is possible, but it does not make much sense to do it, unless the frameworks that exist do not meet your needs.

The open source framworks grow as we all contribute, some simply contribute using them and reporting their issues and others get their hands dirty and solve those issues. That teamwork is worth appreciating, there are few professions where you see that.

In any case, sometimes it is necessary to write from scratch. It happened to me when I do not feel comfortable with the "settings" chosen in a library.

Also, I have read here, that writing without frameworks from time to time helps you grow as a developer and I think it is true; in my case, working natively with javascript on the client, I discovered great things that can be done.

In general, I use the frameworks to work and the code from scratch to learn.

adroitcoder profile image
kspeakman profile image
Kasey Speakman • Edited

If only comparing frameworks to something scratch built, frameworks do compare favorably. However, there is a 3rd choice that is typically even better: libraries. Take React for example. One of the reasons for its popularity is its virtual DOM rendering. Most people are on about the (frameworky) components, but the rendering library can be used in a lot of different scenarios. For example Microsoft's SAFE stack. The last two letters stand for Fable Elmish (which does not use components), and that actually uses the React rendering library for front end UI. Whenever you see things like React + Vue, it probably means the React rendering library is being used to solve the rendering problem.

Side note: one of your post tags is "scratchcoed". A simple misspelling, but it made me chuckle. I imagine someone who goes around scratching college students. :)

adroitcoder profile image
John Samuel Obinna Author • Edited

Lol😃😃😃 I will fix it. Thanks