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
Feature | Library | Framework |
---|---|---|
Control Flow | You call the library | Framework calls your code |
Flexibility | High - use what you need | Lower (you follow it’s rules) |
Use case | Add a feature (e.g., HTTP request, math functions) | Build entire applications (web, mobile, etc.) |
Analogy | The building’s frame, mold structure |
Example
Language | Library | Framework |
---|---|---|
Python | Pandas, Numpy | Django, Flask |
JavaScript | Axios | React, Next.js |
☕Java | Apache Commons | Spring Framework, Collections Framework |
C# | Math.NET | Unity |
- 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
Category | Description | Examples |
---|---|---|
Persistence Framework | Frameworks that provide classes and configuration files as libraries for handling data storage, retrieval, modification, and deletion. | - Mybatis - Hibernate |
Java Framework | Frameworks that modularize and provide necessary elements, focusing on web application development through Java EE. | - Spring Framework - Struts |
UI Implementation Framework | Frameworks that provide a structure to facilitate easier front-end implementation. | - Bootstrap - Foundation - MDL |
Function & Support Framework | Frameworks that offer features to assist with specific functionalities or task execution. | - Log4j - JUnit - ANT |