🌐 Web Development

Framework

Framework

The skeleton of application development. React, Django, Spring, and others. Unlike a library, it determines the control flow.

Detailed Explanation

A framework (Framework) is software that provides the skeleton for application development. Unlike a library, the framework controls the code execution flow (IoC: Inversion of Control).

"You don't call the framework; the framework calls your code" is the key difference from a library.

Code Example

// Library (jQuery) - I call it $('#btn').click(() => doSomething()); // Framework (React) - the framework calls my component function MyComponent() { return <button onClick={doSomething}>Click</button> } // React decides when to render MyComponent

Practical Conversation Example

Junior

"Is React a library or a framework?"

Senior

"Officially it's a library. But once you use Next.js, it becomes a framework. The framework decides routing, builds, and even server rendering."

Related Terms

Learn More