Framework, Library... - Benefits and Drawbacks!

Framework, Library... - Benefits and Drawbacks!

Daily short news for you
  • Privacy Guides is a non-profit project aimed at providing users with insights into privacy rights, while also recommending best practices or tools to help reclaim privacy in the world of the Internet.

    There are many great articles here, and I will take the example of three concepts that are often confused or misrepresented: Privacy, Security, and Anonymity. While many people who oppose privacy argue that a person does not need privacy if they have 'nothing to hide.' 'This is a dangerous misconception, as it creates the impression that those who demand privacy must be deviant, criminal, or wrongdoers.' - Why Privacy Matters.

    » Read more
  • There is a wonderful place to learn, or if you're stuck in the thought that there's nothing left to learn, then the comments over at Hacker News are just for you.

    Y Combinator - the company behind Hacker News focuses on venture capital investments for startups in Silicon Valley, so it’s no surprise that there are many brilliant minds commenting here. But their casual discussions provide us with keywords that can open up many new insights.

    Don't believe it? Just scroll a bit, click on a post that matches your interests, check out the comments, and don’t forget to grab a cup of coffee next to you ☕️

    » Read more
  • Just got played by my buddy Turso. The server suddenly crashed, and checking the logs revealed a lot of errors:

    Operation was blocked LibsqlError: PROXY_ERROR: error executing a request on the primary

    Suspicious, I went to the Turso admin panel and saw the statistics showing that I had executed over 500 million write commands!? At that moment, I was like, "What the heck? Am I being DDoSed? But there's no way I could have written 500 million."

    Turso offers users free monthly limits of 1 billion read requests and 25 million write requests, yet I had written over 500 million. Does that seem unreasonable to everyone? 😆. But the server was down, and should I really spend money to get it back online? Roughly calculating, 500M would cost about $500.

    After that, I went to the Discord channel seeking help, and very quickly someone came in to assist me, and just a few minutes later they informed me that the error was on their side and had restored the service for me. Truly, in the midst of misfortune, there’s good fortune; what I love most about this service is the quick support like this 🙏

    » 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...