In software, what’s the difference between a Framework, a Library, an Environment etc?

412 viewsOtherTechnology

I understand what a language is, stuff like Python, Java, Javascript, Swift etc. And I understand what an IDE is, it’s basically an advanced text editor tailored to helping you with writing code.

But I’m lost after that. I’ve heard that react is a framework? Is that because it’s kind of an add-on to JavaScript? If so, how is that different to a package or a Library? Or is a framework a type of library? Where do things like Spring, or Gradle or Flutter fit into this as well? Until recently, I thought Flutter was a language, but now I’m learning that the language might be Dart?

I’ve finished a full degree in Computer Science, and have been in Software Development for over a year now, but this has become no less clear to me.

In: Technology

10 Answers

Anonymous 0 Comments

Since you have a degree, I’ll step it up to ELI16 at least.

A library provides a bunch of functionality in the form of functions. For example, the String library in C++ allows you to write strings instead of just arrays of chars. So the library gave you the datatype “string” and comes with a bunch of functions and attributes involving that string.

A framework builds upon the idea of a library and is basically “a new way of developing/thinking.” Instead of just handling strings, why don’t we (the creators of the library) just handle the input/output of strings as well, maybe even conversion of strings. Maybe they can just create entire huge datastrictures to render a string in a graphical way.
Maybe we can just handle the networking to send this graphics to someone. Maybe we have such a huge package of stuff that we can send you an install file because we have 5000 packaged files used in different locations.

The line between framework and library isn’t always clear, and it’s mainly when you’re not thinking in the native programming language anymore, but you’re thinking in the language of the framework. Different people will have different opinions regarding if something is a library or framework.

An environment is a specific configuration of external settings, aka the way your computer is set up to allow you to work. If you work in IT, the IT support group will most likely have configured your environment for you to some degree. This can include installing software (IDE), adding your account to access groups, etc.

Certain software and frameworks will require specific configuration and libraries and linkers to function. These software/frameworks can come with their own environment, called a runtime environment, which makes sure the correct computer state is set when launching the software and restored after the software finishes.

Sometimes, certain projects require different environments, for example, if you have different versions of a framework. For example, you’re in a project running a certain version of an installed framework, using a certain configuration, but you want to make another project on the side, using a new version of the framework.

Now, we can use a third party software to keep track of the different configurations. We can just download both versions of the framework, and the virtual environment manager points the computer to different versions of the framework. When we “activate” an environment, you tell the software to tell the computer to use a certain configuration.

Sometimes, it’s not enough to keep track of what versions of certain frameworks and libraries we’re using, and we might need an entire copy of the configuration for the OS. At these times, we can use something like docker (third party software) to create images/copies of the entire computer configuration.

Docker images are used when you want to guarantee that everyone is developing against the same computer configuration but provides a bit of computational overhead in exchange.

You are viewing 1 out of 10 answers, click here to view all answers.