There is a paradigm shift going on in the coding world and it involves programming frameworks. Once a framework is chosen for a development project, it is near impossible to change the programming language that the framework is built from.
It is obvious that frameworks help speed up development and promote rapid prototyping. Companies such as Pinterest and Spotify used frameworks to bring their ideas to market faster. Instead of brainstorming for months, they successfully implemented a complete working prototype in just 4 months.
With Pinterest and Spotify’s success, other companies have adopted a framework to build their web applications with. Companies that we are all familiar with and love including Instagram, YouTube, Dropbox, EventBrite and BitBucket all rely on a framework to build their web applications with.
The benefits are stacking up for using a framework and it is evident that frameworks are winning over traditional methods in coding but what do frameworks do for the coding community? Some say it promotes laziness by encouraging coders to skip over the fundamentals while others say is promotes. Who’s right or who’s wrong?
Before we dive into this controversial debate, we ask for a framework definition?
What is a Framework?
A framework is a collection of libraries and tools that when used with a programming language will accelerate coding an application. You can think of a framework as a library of code templates that are written by expert coders, tested against every condition and proven to work in every situation. Frameworks are like a blank application that awaits customization and business rules. It has its own structure and architecture. Once installed and configured, it serves as a development environment. In some cases, it even comes with a built-in database, development server, template engine and a web server.
With the way of the world, there are new frameworks added almost every month. At present, there is no scarcity of frameworks available. There are practically hundreds of frameworks to choose from and there is at least one framework for every programming language out there.
How does a Framework accelerate development? Basically there are two reasons:
Abstraction
One of the most important concepts in Object-Oriented Programming (OOP) and a key element in software design is the use of abstraction. Coders of frameworks uses encapsulation to hide the implementation details and only expose the behavior of objects. Framework users rely on a well documented functions to perform an action without needing to look under the hood.
A framework contains an extensive library of components that are specialized to perform a specific unit of work. These highly specialized components serve as the building blocks to any web application.
Pros and Cons of Frameworks
There are pros and cons to how frameworks are perceived in the coding community. Take abstraction for instance. Most frameworks implement a data abstraction layer to provide an application with access to a persistent data store such as a database. By adding a layer between the actual data store and an application, coders do not need to familiarize themselves with any proprietary knowledge of databases or how data is stored. The abstraction allows the database to be changed or replaced with another database without any changes to the code.
Using Databases within a Framework
According to the coding community, this causes coders to be lazy because in the past, coders had to learn the specifics of the database in terms of storage and access. If a relational database was used, coders had to learn SQL and database design in order to know how data were stored in tables. With a data abstraction layer, coders now familiarize themselves with data objects and a common set of functions to get data, change or replace data and save changes. Instead of writing SQL statements and testing it against the database server, framework coders rely on the data abstraction layer to access data via these data objects.
With data abstraction, the art of data modeling and logical database design becomes obsolete. Primary keys which consist of one or more fields were used to identify individual records. To allow a framework to implement retrieval of records, some frameworks will create an auto-increment identifier field to use internally instead of using the primary key that the database administrator (DBA) had defined. Most DBA’s creating database tables that are used by web applications are not creating primary keys or utilizing any referential integrity rules.
Frameworks Promote Good Software Design
Aside from rapid prototyping, frameworks promote good software design. Most frameworks implement the Model-View-Controller (MVC) design pattern that is widely accepted and highly recommended. By working with a framework that implements MVC, coders become more knowledgeable and comfortable in practicing good software design. If anything, the MVC design pattern allows a team of coders to work together. One coder can work on the Model while others work on the View. This promotes teamwork and communication which coders often overlooks.
Frameworks Are Bloated
Another perception that frowns upon frameworks is the overloading of components that are included in every framework. Take the components used in authenticating a user for login or signing in purposes. A simple interface to prompt for a user and a password would use the same component as a complex interface that uses captcha or two code authentication. The extra code that comes with these components will add to the complexity of code to be maintained but there is no way to strip the extra code even if the coder does not utilize it. The extra code is considered extra baggage that may hinder performance and cause the application to slow down.
Summary
Yes, it may appear that coders become lazy when they work with a framework but learning to work with one often comes with a very steep learning curve. It is like learning a new programming language. At first, you memorize the data types and how to work with them. After some experience, you learn how to combine simple steps to complex lines of code. This is the same with a framework.
To become a better coder, read the source code that comes with a framework. Read up on concepts you do not understand. Then look at how a framework implements it. Knowing how it is structured will help you code better.
Disclosure of Material Connection: Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.