How to start with JavaScript library development | Bornfight | Blog

How to start with JavaScript library development | Bornfight | Blog

Software development is about solving problems. Sometimes the problems are tightly coupled with the domain and other times they are generic, not related to a specific business or field.

To avoid repetition in solving problems, we as developers have the ability to abstract & extract our solutions to self-contained modules, most often called libraries or packages.

JavaScript is no exception to this, and therefore we currently have a plethora of options available.

Despite the fact that there are currently more than a million packages available on NPM, there is still potential and value in creating your own.

What makes a good library?

There are different kinds of libraries in terms of size and purpose. Whole frameworks could fall into an umbrella term of software libraries, but there are also one-liner functions wrapped in packages that are by definition, also considered libraries. Their context is often different, but some common rules can be applied to all of them.

  • solves a specific problem
  • has good documentation
  • easily extendable
  • well tested
Why even bother making a library when you can copy and paste?

Abstracting a problem has its own costs. Sometimes, making an abstraction too early or without a defined plan can lead to accidental complexity or incorrect implementation. Therefore, using good old copy and paste strategy is oftentimes preferred solution, until we know the problem deeper.

*But, if the code is copied too much, it can become difficult to maintain and upgrade. *The reason behind this is often because the copied code relies on repeating some patterns in a certain way and if we don’t repeat the same structure, bugs can occur.

Knowing the right timing for abstraction is an art of its own, but a general rule of thumb is that a piece of code is a good candidate of abstraction after being copied for two or three times.

bornfight javascript library

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top 5 JavaScript Libraries to Create an Organizational Chart

Take a look at these recommendations for five application with varying levels of customization and capabilities that can help you build your organizational chart.In this article, we’ll review five JavaScript libraries that allow you to create online organizational charts. To make this info useful for different categories of readers, we’ve gathered together libraries with different functionality and pricing policy.

JavaScript Shopping Cart - Javascript Project for Beginners

JavaScript Shopping Cart - javascript shopping cart tutorial for beginnersBuy me a coffee 🍺 https://www.paypal.com/paypalme/ziddahSource Code: https://bit....

The essential JavaScript concepts that you should understand

The essential JavaScript concepts that you should understand - For successful developing and to pass a work interview

How to Build a JavaScript Library

If you’re a developer it’s almost certain that you’ve used Code Libraries. In simple terms, a Code Library is a collection of reusable code that you can use in your program.

Top 3 JavaScript Machine Learning Libraries

Ranking based on community support and personal experience. It can be argued that Python is the one and only language for Machine Learning. While it is true to a certain extent, it has become difficult to ignore the rising popularity of JavaScript(JS) in this field. After experimenting with a few of those libraries I have decided to publish a list of the most promising and functional machine and deep learning libraries for JavaScript. Top 3 JavaScript Machine Learning Libraries