Pattern for data types that are related yet fundamentally different in utility

  softwareengineering

Background

I’m currently working on a codebase for what is to become a forthcoming website’s content “engine”, where it will take in different types of standardized data (implemented with XML), parse it, and then generate content dynamically and accordingly.

The data itself also includes a list of context clues or helper objects for searching, comparing, analyzing, etc., which is being developed concurrently into a group as a data interaction layer and it is completely separate from the engine.

Each generated content will emit some embedded “signatures” that can be sniffed by the interaction layer for post-processing (possibly with few generated hidden input values).

The Problem

Nonetheless, the immediate problem that I’m facing is that although those list of hidden signatures are related to the content that is generated, it is essentially not needed by the engine to let the browser know how content should be presented initially.

Logically speaking, is it usually the engine’s job to parse all data no matter what type of data it is given so that the interaction layer can simply manipulate it later? Or, since that data type acts as a helper for data manipulation, should the interaction layer step in and act as the parent for that data type specifically, so that the engine can just focus on content?

The root of the problem is that I started separating things to its specialized components for better maintainability in the future but I’m not exactly sure where to stop separating chunks to its essentials. Should I treat data as simply data? That can’t possibly be right.

3

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT