Framework
A ready-made skeleton for an app: it sets the structure and calls your code.
A framework is a large body of ready-made code that gives an application its basic structure, so programmers only write the parts that are unique to their product. A web framework, for example, already knows how to receive requests, read forms, talk to a database and send pages back; you fill in what your pages show and what your rules are.
The key difference with a software library is who is in charge. You call a library when you need it, like grabbing a tool from a drawer. A framework calls you: it runs the main loop and invokes your code at the right moments, such as "when someone opens this page, run this function". Engineers call this inversion of control.
Well-known examples include Angular and Vue for building user interfaces in the browser, Django and Ruby on Rails for web backends, and Spring for business software in Java. Choosing one is a big decision, because it shapes how the whole project is organized and is hard to swap later. In exchange, teams get a lot done fast and follow conventions that new members already know.
Keep in mind
- Provides the structure of an app; you fill in the specific parts.
- It calls your code, unlike a library, which you call.
- Examples: Angular, Vue, Django, Ruby on Rails, Spring.
- Saves a lot of work, but is hard to replace once chosen.