What Are Frameworks And Why Do We Use Them?

"If you wish to make an apple pie from scratch, you must first invent the universe"

In the context of software development, a framework refers to a pre-established structure and set of tools that provide a foundation for building applications. They offer a standardized way to develop software by providing reusable components, libraries, and conventions, which can significantly speed up the development process and improve the quality of the final product. They are designed to solve common problems and streamline development tasks, allowing developers to focus more on implementing specific features rather than dealing with low-level technical details.

As developers, using a framework means we don’t need to reinvent the wheel for common functionalities on every project or spend time doing the monotonous groundwork every project needs. Instead, they allow us to hit the ground running straight into the client’s requirements. Using a construction company as an example, they aren’t sweating the details of milling lumber, forging nails and screws, or the intricacies of building a table saw. They are focused on using those resources and tools to build your dream home.

While programming at its core is very logical by nature, there is also a lot of subjectiveness and an opinionated take on how to accomplish any given task, much in the same way that different grandmothers can have different takes on how marinara sauce should be made, but we can’t argue that they aren’t both delicious.

Frameworks themselves are opinionated. A lot of times it’s relatively inconsequential and personal preference which of the many approaches can be utilized for a given situation, whether it’s as narrow as a specific section of code or as wide as folder organization. The framework you choose may already have guided that decision for you, eliminating that point from the planning phase and giving the team of developers a mutual understanding of an approach out of the box.

Occasionally, a framework’s opinion clashes with a project’s requirements. They often feature modular designs, enabling effortless swaps between slightly altered or entirely different implementations to better suit a specific need. Using a construction analogy again, maybe the framework had an opinion about the color of the walls in the hallway and supports electric utilities out of the box. Making the switch to natural gas and saying the hallway should be light blue, we can swap those changes without having to redesign the whole house from scratch.

Frameworks are also designed with scalability in mind. Whether your project is big, small, or growing from one to the other, they provide architecture patterns and best practices that allow applications to expand and handle increased traffic without significant restructuring.

Another significant benefit is that they are community-driven. From a developer standpoint, there are plenty of resources, tutorials, documentation, and third-party packages available, making it easier to find solutions to problems and get help when needed. From a quality standpoint, good frameworks enforce coding standards and best practices, resulting in more consistent and higher-quality code. The code itself that powers the framework has and continues to be heavily peer-reviewed, scrutinizing every piece, pointing out potential flaws, and reporting bugs and edge case scenarios they’ve run into personally. This reduces the likelihood of errors, security vulnerabilities, and maintenance challenges. Updates and improvements are released over time and often include security patches, performance enhancements, and new features, also ensuring that a project can stay up-to-date with the latest technologies and practices without requiring a complete rewrite.

At the end of the day, frameworks make us better and faster, and most importantly, they allow us to focus more of our time and efforts on the needs of our clients.

~ Dale C