It's common to make this distinction:
- A Library is a reusable set of types/functions you can use from a wide variety of applications. The application code initiates communication with the library and invokes it.
- A Framework consists of one or more libraries, but the difference is that Inversion of Control applies. The application registers with the framework (often by implementing one or more interfaces), and the framework calls into the application, which may call back into the framework. A framework often exists to address a particular general-purpose Domain (such as web applications, or workflows, etc.).
- Architecture consists of the guiding principles behind a given application. It is not strongly tied to a particular framework or library.