Framework, Library... - Benefits and Drawbacks!

  • 0

  • 0

  • 0

Framework, Library... - Benefits and Drawbacks!

Framework, Library… - Benefits and Drawbacks!

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.

Did you find this article helpful?
  • No

  • Neutral

  • Yes

Comments
DMCA.com Protection Status