Framework, Library... - Benefits and Drawbacks!

Framework, Library... - Benefits and Drawbacks!

Daily short news for you
  • Morning news, does everyone remember the lawsuit of Ryan Dahl - or more accurately, the Deno group against Oracle over the name JavaScript?

    Oracle has responded that they are not giving up the name JavaScript 🫣

    https://x.com/deno_land/status/1876728474666217739

    » Read more
  • Are people taking their Tet holidays early or what? Traffic has dropped significantly this whole week 😳. It's a bit sad to talk to myself, so if anyone passes by and reads this, please drop a "comment" for some fun at home. You can say anything since it's anonymous 😇🔥

    » Read more
  • Someone asked me where I get my news so quickly, or how I find so many tools and projects... where do I get all of that? Well, there’s a source far on the horizon but close right in front of you, and that is the Github Trending page.

    This page tracks the repositories that have the most "stars" according to day/week/month. It also allows you to filter by programming language, and each language represents a kind of theme. For example, Python is buzzing about AI, LLMs..., Rust has all the super powerful tools, and Go is... just a continuous plaything 😁. Meanwhile, JavaScript 🫣😑

    » Read more

The Issue

Modern programming is somewhat different from the past; we have more choices in terms of technology and programming tools. Part of this is due to the growing community, which creates powerful tools to solve problems, ultimately reducing development time and optimizing repetitive work. Nowadays, when facing a problem, the first thing I often do is search on Google to see if there's a tool that can solve it for me. Sometimes, even when I know how to solve it, I still search to see if there's a better way.

In recent years, JavaScript has been rapidly evolving, even though it was originally created to run in web browsers. It has extended its reach to various other platforms like servers, mobile devices, and command-line tools. This increased interest in JavaScript has led to the creation of many tools, with libraries (libs) and frameworks being the most common. Some humorously say that before they finish researching one thing, another one has already popped up :D.

Because of the multitude of choices, sometimes we find ourselves constantly chasing after them. We learn one thing after another but forget the fundamentals of the language. It's worth mentioning that many frameworks hide the complexity of code very well, making us focus only on the structure. We rarely think about the compilation and execution of code at the lower levels. We only start asking basic questions when we encounter problems that require delving into the lower layers.

Frameworks can be thought of as an "interface" for programming languages, and languages are the "interface" for computer systems. This analogy helps us understand that frameworks hide the complexity of programming languages. That's why working with frameworks feels highly optimized, but in essence, it can be hard to understand without further exploration.

Lately, the CTO at my workplace has expressed concerns about interviewing many candidates, most of whom have a background in frameworks but struggle when asked about lower-level details. This reflects a prevailing trend: quick learning, quick work, and reluctance to explore deeply.

I'm not here to criticize frameworks or their users. I, myself, use many frameworks to optimize my work. However, a new approach is something we should discuss.

The purpose of today's article is to analyze the benefits and drawbacks of using frameworks and propose an approach that strikes a balance between harnessing the power of frameworks and fundamental knowledge.

Benefits and Drawbacks

Using frameworks can have both benefits and drawbacks for a software project and the developers involved.

Some of the benefits include:

  • Increased Development Speed: Frameworks provide pre-built features and components, reducing the effort and time needed to implement an application from scratch. This can accelerate development and minimize repetitive tasks. Moreover, the architecture of frameworks is often optimized by many people, both in terms of security and reliability.

  • Time and Resource Savings: Instead of building basic features like database connections, CRUD operations, error handling, and more from scratch, you can activate them with a few lines of code or simple configurations. This saves development time.

  • Community Support: Popular frameworks usually have a large community and abundant documentation for research and learning purposes. You can benefit from community support, including knowledge sharing, debugging assistance, and the development of extensions.

However, frameworks also have their downsides:

  • Dependency on Third-Party: Using a framework means depending on it. This creates a risk because if the framework or its libraries are no longer maintained, it can cause difficulties in maintaining and upgrading your application.

  • Dependency on Available Features: As mentioned earlier, some developers can become too reliant on the features provided by the framework without understanding how they work internally. When problems arise, it can be challenging to understand and fix them.

  • Increased Complexity: Working with a framework often means adhering to its structure, which can add complexity to the development process. Making deep changes or interventions at lower levels can be more challenging than usual, requiring more time and effort.

So, How Should We Approach Frameworks?

First and foremost, take the time to learn the basics of the programming language before delving into frameworks. Read the documentation to understand the language's concepts, strengths, weaknesses, and prominent features. After all, a framework can only support what the language can do. Knowing all the language features allows you to understand the issues and sometimes even the lower-level workings of a particular feature.

Learn about the platform you are developing for. For example, if you're into web development, understand the browser: why can it run websites or why your website runs well on some browsers but not all? Similarly, if you write server-side code, understand why the server can run your code. Go deeper into computer architecture and the operating system.

Finally, optimize your development time by learning about the frameworks widely used by others. Spend time reading documentation to understand what they can do and think about which language features they rely on. This way, when problems arise, you can identify the causes and find solutions.

Take the famous library axios as an example. It is "based" on the XMLHttpRequest API of web browsers and can only exploit what XMLHttpRequest provides.

Conclusion

Frameworks are excellent programming tools that can significantly reduce development time and are optimized and tested by many users. However, if overused without delving into the underlying aspects, we may face difficulties in maintenance later on. So, take the time to explore the foundational aspects of your language before diving into frameworks.

Premium
Hello

Me & the desire to "play with words"

Have you tried writing? And then failed or not satisfied? At 2coffee.dev we have had a hard time with writing. Don't be discouraged, because now we have a way to help you. Click to become a member now!

Have you tried writing? And then failed or not satisfied? At 2coffee.dev we have had a hard time with writing. Don't be discouraged, because now we have a way to help you. Click to become a member now!

View all

Subscribe to receive new article notifications

or
* The summary newsletter is sent every 1-2 weeks, cancel anytime.

Comments (0)

Leave a comment...
Scroll or click to go to the next page