Files
Mapo-IOB-WIN/refactoring_wip.md
T

1.7 KiB

WIP: Refactoring Phase 1 - Infrastructure Extraction

Status: IN_PROGRESS

Objective

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

Tasks

1. Communication Service Extraction

  • Extract REST/HTTP logic (currently using utils.callUrl, callUrlWithPayloadAsync, etc.).
  • Implement a singleton/service-based CommunicationService using HttpClient.
  • Italian Commenting Requirement: All new/modified code comments must be in Italian.

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.

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 (NEW)

  • Analyze BaseObj responsibilities (State, Config, Messaging, Diagnostics).
  • Identify candidates for extraction into specialized services (e.g., QueueManager, ConfigService, DiagnosticService).
  • Implement extraction of identified components.

Progress Log

  • Created WIP document.
  • Analyzed Generic.cs for Phase 1 candidates.
  • Completed Redis Semantic Refactoring:
    • Moved key construction logic from RedisService to BaseObj.
    • Refactored Generic.cs to use BaseObj semantic methods.
    • Eliminated redundant RedisService.cs.
  • Started Analysis of BaseObj to identify extraction candidates.