Files
Mapo-IOB-WIN/refactoring_wip.md
T
2026-05-20 19:34:59 +02:00

1.8 KiB

WIP: Refactoring Phase 1 - Infrastructure Extraction

Status: COMPLETED

Objective

Extract infrastructure and helper components from Generic.cs to improve modularity and reduce the monolithic footprint.

Tasks

1. Communication Service Extraction (COMPLETED/REFACTORED)

  • Identify redundant callUrl and callUrlWithPayloadAsync wrappers in BaseObj.cs.
  • Instead of creating a new service, cleaned up BaseObj.cs by removing pass-through methods that merely delegated to utils.
  • Updated Generic.cs to call utils.callUrl directly, removing the unnecessary indirection layer.

2. Redis Service Extraction (COMPLETED)

  • Encapsulate all redisMan calls into a RedisService.
  • Define a clean interface for key/value and hash operations.
  • Refactored: Moved semantic key construction from RedisService to BaseObj to eliminate redundant service layer.
  • Eliminated RedisService.cs as it was absorbed by the BaseObj identity-aware implementation.

3. Data Serializer Extraction

  • Move all JsonConvert and custom string formatting (e.g., qEncodeFLog, qEncodeIN) to a DataSerializer service.
  • Centralize CultureInfo.InvariantCulture usage.

4. BaseObj Simplification (COMPLETED)

  • Analyze BaseObj responsibilities (State, Config, Messaging, Diagnostics).
  • Remove pass-through methods for utils (Network, MAC, WebClients) to reduce "noise" in the base class.
  • Cleaned up commented-out code blocks (#if false) to improve readability.

Progress Log

  • Created WIP document.
  • Analyzed Generic.cs for Phase 1 candidates.
  • Completed Redis Semantic Refactoring.
  • Completed BaseObj Cleanup (Removal of redundant wrappers and commented code).
  • Verified compilation stability after removing BaseObj wrappers.
  • Next Task: Data Serializer Extraction.