Xinlu Knowledge Base
website·Indexed 32 days ago
https://xinlu.inkA collection of technical guides and notes covering Web reconstruction (architecture, semantics, and grid layout), SSH configuration and key management, Git fundamentals and hosting services, Windows system configuration, and Windows batch scripting for file automation.
What's inside Xinlu
- Git hosting services provide more than just code and content storage; they typically offer integrated research and development management features including project collaboration, test management, artifact repositories, and CI/CD pipelines. Because Git is a distributed version control system, it can function as a standalone server, but managed services provide centralized public or private storage for team collaboration.
Overview of SSH and OpenSSH
SSH (Secure Shell) is an encrypted network transmission protocol used to create secure tunnels between a client and a server over insecure networks. OpenSSH is the most widely used open-source implementation of this protocol and is a default component in most operating systems. It encrypts all traffic to prevent eavesdropping, connection hijacking, and other attacks.Overview of Git Hosting Services
Git Hosting Services provide more than just code and content hosting; they typically offer integrated research and development management features, including project collaboration, test management, artifact repositories, and CI/CD pipelines. Because Git is a distributed version control system, it can function as a standalone server, but managed services provide centralized public or private storage for team collaboration.Overview of SSH and OpenSSH
SSH (Secure Shell) is an encrypted network transmission protocol used to create secure tunnels between a client and a server over insecure networks. OpenSSH is the most widely used open-source implementation of this protocol and is a default component in most operating systems. It encrypts all traffic to prevent eavesdropping, connection hijacking, and other attacks.Understand Git's remote and versioning mechanisms
Beyond the local environment, Git utilizes specific mechanisms for collaboration and history management:
- Remote (Server): A remote repository area used for distributed collaboration between different users.
- Branches: Provide spatial isolation, allowing different lines of development to exist independently.
- Tags: Provide temporal markers to identify and label specific important points in the project's history.
Implement layered architecture in Vue to reduce component bloat
To avoid the 'Smart UI Anti-Pattern' where business logic is heavily embedded in components, developers should treat.vuefiles as thin orchestration layers. The goal is to separate stable domain logic from volatile UI requirements by extracting data models and behaviors into external services, then importing them into the component. This approach mirrors patterns found in Angular (Model, View, Controller, Service) and DDD (Domain-Driven Design).Understand Git's local storage areas
Git logically divides a single physical folder on a computer into five distinct, invisible storage areas. Understanding these areas is essential for using Git commands to move content between different states:
- Untracked Area: Files that are not yet tracked by Git.
- Working Directory: The actual files you are currently editing on your disk.
- Staging Area (Index): A preparation area where changes are gathered before being committed.
- Repository (Local Repo): The permanent storage where the project history (commits) is kept.
- Stash: A temporary storage area for saving uncommitted changes to switch contexts without committing.
Understand the purpose of Version Control Systems
Version control is used to record and display changes to documents over time. It tracks who made a change, when it was made, why it was made, and exactly what the differences are. This allows developers to manage document evolution, trace history, and merge information from different timelines, avoiding the need to manually create multiple file copies (e.g.,file_v1.bak,file_v2.bak) for backup or comparison.Implement separation of concerns for Web structure, style, and behavior
To achieve a decoupled architecture in Web development, clearly define the responsibilities of the three core technologies: HTML for logical content, CSS for visual presentation, and JavaScript for control, driving, and interaction. To maintain this separation, follow these constraints:
- Do not use inline styles on HTML structural tags.
- Do not define DOM Level 0 event handlers (e.g.,
onclick) directly on HTML tags. - Do not use JavaScript to manipulate the
styleattribute of tags to control styling.
Understand the purpose and benefits of Version Control Systems
Version Control Systems (VCS) are used to record and display the evolution of documents. They track who made a change, when it happened, why it was made, and exactly what was altered. This allows developers to trace differences between versions, revert to previous states ("time travel"), and merge information from different timelines, effectively providing a historical record of data evolution that mimics the traceability of physical paper documents.Understand Git's core concepts and advantages
Git is a distributed version control system that acts as a 'time machine' for digital content. Unlike centralized systems that store file change lists and rely on remote servers for diffing, Git manages files as a whole using content-addressable storage. It records snapshots of the project state, allowing users to view additions, modifications, and deletions across different time periods and calculate differences locally for higher speed and efficiency. Key features include 'branching' for collaborative work and merging capabilities with conflict detection.Apply a Service-oriented layered architecture in Vue
To optimize code structure and maintainability, adopt a layered approach where business logic is extracted into 'Services' based on domains and scopes. This separates the framework/library (Vue, Vuex) from the business logic.
Benefits include:
- Clear boundaries between framework code and business logic.
- Easier localization of bugs (e.g., data errors are found in the service layer, process errors in the organization layer).
- Simplified technology migrations by replacing implementations within a specific layer without affecting others.