Zeffon's Technical Documentation and Blog
website·Indexed 29 days ago
https://zeffon.github.ioA collection of technical guides and articles covering frontend development (CSS fundamentals, BFC, line-height, Vue, React, Vite, and TypeScript), data structures and algorithms (Segment Tree, Trie, Union-Find, and sorting), and backend technologies including Java, SpringBoot, Redis, and Node.js.
What's inside Zeffon
- CSS Grid is a two-dimensional layout system for the web, allowing content to be arranged in rows and columns. It is specifically designed for dividing a page into major regions and defining their size, position, and hierarchy. While Flexbox is ideal for one-dimensional layouts, Grid is suited for two-dimensional layouts. Key concepts include Column Tracks, Row Tracks, Gaps (spacing between tracks), Cells (single units), and Areas (merged cells).
Overview of Jackson core modules
Jackson is a high-performance Java framework for JSON serialization and deserialization, serving as the default JSON parser for Spring MVC. Its core functionality is divided into three main modules:
- jackson-core: Provides the low-level 'streaming API' for parsing and generating JSON via
JsonParserandJsonGenerator. - jackson-annotations: Provides standard annotations to control the serialization/deserialization process.
- jackson-databind: Provides the high-level 'object binding' API (via
ObjectMapper) and 'tree model' API (viaJsonNode), both of which rely on the streaming API.
- jackson-core: Provides the low-level 'streaming API' for parsing and generating JSON via
Overview of pnpm package manager
pnpm is a fast, disk-efficient package manager derived from npm and yarn. It is used by major projects like Vue3 and element-plus. Key advantages include:
- Speed: Approximately 2x faster than similar tools.
- Efficiency: All files in
node_modulesare linked from a single content-addressable store. - Monorepo Support: Built-in support for multiple packages within a single source repository.
- Strict Permissions: Uses a non-flat
node_modulesstructure, preventing code from accessing packages that are not explicitly declared as dependencies.
Overview of pnpm package manager
pnpm is a fast, disk-space efficient package manager. It is widely adopted by major projects such as Vue 3 and element-plus for dependency management.Overview of Linux crontab
crontab is a Linux utility used to schedule the periodic execution of system commands or shell scripts. It is suitable for recurring tasks such as log analysis or data backups. Time intervals can be defined using combinations of minutes, hours, days, months, and weeks.Overview of koa-web framework
koa-web is a Web development framework built on top of Koa2 and TypeScript. It is designed to provide a more "out-of-the-box" experience similar to Java's SpringBoot, addressing the fact that standard Koa2 requires significant secondary encapsulation to be used effectively for concrete business logic development. It leverages TypeScript to reduce maintenance costs and supports ESModule syntax (import/export), requiring Node.js v7.6.0+ or ES2015+ with async method support.# Source code available at: https://github.com/zeffon/koa-webOverview of Apollo Distributed Configuration Center
Apollo is a distributed configuration center developed by the Ctrip framework department. It provides centralized management of configurations across different environments and clusters for microservices. Key features include real-time configuration push to applications, standardized permission management, and process governance.Understand Trie (Prefix Tree) properties and use cases
A Trie is an ordered multi-way tree used to store associative arrays where the keys are typically strings. Unlike binary search trees, keys are not stored directly in nodes; instead, the key is determined by the node's position in the tree. All descendants of a node share the same prefix. Tries are commonly used for search suggestions (autocomplete) and finding the most similar prefix when an exact match is not found.Understand the purpose and benefits of Java Generics
Java Generics (introduced in JDK 5) provide a compile-time type safety mechanism that allows developers to detect illegal types during compilation rather than at runtime. The essence of generics is 'parameterized types,' where the data type operated on is specified as a parameter.
Generics solve two primary problems:
- Type Safety: Bugs related to incorrect types are caught during the compilation phase.
- Code Duplication: Eliminates the need to write multiple versions of the same class for different data types.
Automatic certificate renewal with acme.sh
acme.sh provides built-in automatic renewal. It checks daily if the certificate is nearing expiration and automatically renews it, eliminating the need for manual cron job setup required by tools like Certbot.Compare Swagger2 and Spring REST Docs
Choose between Swagger2 and Spring REST Docs based on your documentation needs:
- Swagger2: Best for 'Online Documentation'. It is easy to set up using annotations and allows users to test APIs directly via a UI. It runs alongside the application.
- Spring REST Docs: Best for 'Offline Documentation'. It is test-driven, requiring unit tests to generate documentation snippets. This ensures the documentation is accurate and consistent with the actual code behavior, making it more suitable for formal testing teams.
Understand GitHub Actions core concepts
GitHub Actions is a continuous integration (CI) service. Its structure consists of the following hierarchy:
- Workflow: The overall automated process that runs on GitHub.
- Job: A workflow consists of one or more jobs. A job is a set of steps that execute on the same runner.
- Step: A job consists of multiple steps that are executed in sequence.
- Action: An individual task performed within a step (can be a shell command or a reusable action).