Nowhere did I find a clear definition of these two concepts.

I understand the framework as a platform that is necessary for the operation of any applications. For example, a set of dynamically linked libraries for several applications is already a framework. Also, the Java Runtime Environment (including the JVM) will also fall under this definition. However, what is runtime? On the one hand, this is just a program execution phase. On the other hand, there are a lot of terms like runtime libraries, runtime system ... What Microsoft is investing in this concept is also unclear. Explain, please!

    2 answers 2

    Between the library and the framework, the difference is small, but fundamental. If your code simply uses the functions of the module, then this module is most likely a library. But if a module forces you to write code the way it wants and calls it, then this is already a framework. But the actual module is a set of source files (sometimes already compiled).

    runtime is part of the code that exists in the executable file (or in separate so / dll) and provides all sorts of "convenience". For example, find out the type of object or make the same virtual calls. It is usually added by the compiler and the normal user may not even be aware of it. Also, the word runtime is the time when the program is executed. What exactly is meant is to get past the context.

    runtime libraries are libraries that are used while the program is running. Sometimes libraries come in two forms - for development and for normal work (the latter are often optimized and have been discarded from them). A good example is bpl files delphi. For the same component there can be libraries that contain all sorts of tools for the IDE, but there are ones that are only for the operation of the code.

    JRE is not a framework, it is a runtime library. Although on the other hand it is a bytecode framework. But since only special deviants squeak on bytecode, this is not a framework programmer for an ordinary programmer. But the whole java is one continuous framework :)

      I would like to add a little to the answer given earlier.

      1. Framework vs Library . Both that, and that - a set of some utilities and functionalities, but the basic difference in Inversion Of Control . Let me explain: Imagine a console application in which you ask the user for some data, and then perform calculations and give the result. In the course of calculations, you can use, for example, a library of mathematical functions, but you CAM define the course and structure of the program, and you simply use functions from the library as needed. In frameworks, the control inversion occurs, i.e. the program flow determines the framework , and you need to fill in certain empty spaces with your code (for example, write the controller in MVC frameworks).
      2. Runtime By " runtime " most likely you mean support programs that are used when executing the main programs through a specific API. For example, the browser JS engine uses the event loop and through various APIs (for example, XMLHttpRequest) gets additional features that do not belong to JS itself. These APIs are essentially runtime, which extend the capabilities and help execute the script code. At the same time, interacting with the API, it may seem that these capabilities belong to JS itself or are calls to some library functions, although in fact they can be implemented in general differently and have nothing to do with JS.