Main

🧩 Library = Reusable Tetris blocks — you choose when and how to use them
🧩 Framework = A Tetris board with cutouts — you must fit the blocks into the given structure

FeatureLibraryFramework
Control FlowYou call the libraryFramework calls your code
FlexibilityHigh - use what you needLower (you follow it’s rules)
Use caseAdd a feature (e.g., HTTP request, math functions)Build entire applications (web, mobile, etc.)
AnalogyThe building’s frame, mold structure

Example

LanguageLibraryFramework
PythonPandas, NumpyDjango, Flask
JavaScriptAxiosReact, Next.js
☕JavaApache CommonsSpring Framework, Collections Framework
C#Math.NETUnity
  • When choosing a framework/library to learn, you need to choose carefully what you will learn because you will most likely take lots of time into learning

Library

  • 내가 필요한 기능을 직접 호출해서 쓰는 코드 모음
  • Libraries are usually specific to certain programming languages (Python - Pandas)
  • You bring code that you want (which someone else wrote) and add it to your project
  • Use when you need to add specific functionality

Framework

Framework in programming generally provides a specific mold or structure for programming

  • 기본 구조와 흐름이 정해져 있고, 내 코드가 프레임워크에 의해 호출됨
  • Use when you want to build structured application with less boilerplate
  • Advantage
    • It includes features that I might not have thought of
    • Reduces development time.
    • Standardized nature allows for an expected level of quality.
    • Easier maintenance.
  • Disadvantages
    • over-reliance can diminish a dev’s abilities
    • learning curve per framework

Types of Frameworks

CategoryDescriptionExamples
Persistence FrameworkFrameworks that provide classes and configuration files as libraries for handling data storage, retrieval, modification, and deletion.- Mybatis
- Hibernate
Java FrameworkFrameworks that modularize and provide necessary elements, focusing on web application development through Java EE.- Spring Framework
- Struts
UI Implementation FrameworkFrameworks that provide a structure to facilitate easier front-end implementation.- Bootstrap
- Foundation
- MDL
Function & Support FrameworkFrameworks that offer features to assist with specific functionalities or task execution.- Log4j
- JUnit
- ANT