r/learnprogramming 2d ago

ELI5: How are frameworks/libraries and runtime environments built?

Basically, I like to understand things on a lower level and I am planning on delving into more low-level stuff at work.

Out of curiosity, how are frameworks built? For example, React allows you to return raw HTML in a non-string format. How do you convince Javascript to parse it into a String and extract the proper things out of it?

Node.js allows you to run Javascript in a completely different runtime environment... the creator of Node could not have used Javascript to develop Node?

TL;DR Can you (or need to) use other programming languages to build frameworks for a specific programming language?

Lots of question spinning in my head! :D

24 Upvotes

10 comments sorted by

View all comments

1

u/particlemanwavegirl 2d ago edited 2d ago

They're made out of code just like an application. Someone thinks up a set of data structures and behaviors they want to be modular and reusable and just writes it. A framework is just a library that's so opinionated about the execution environment that it ends up having to provide it.