I have a system structured out. It works exactly as I want it to work, but I'm curious if I'm using the right naming conventions for the structures involved.
Base classes:
Reportclasses: Encapsulates criteria for querying data from the database. Also uses the database connection to fetch its base data.Documentclass: Represents a file (Excel, PDF, etc.) with filesystem, filename/url, etc.ReportDocumentclass: Extension ofDocumentcontextualized for aReportDocumentFactoryclass: Creates the appropriateDocumentbased on need.
Structural classes:
DocumentStrategyclasses: Handles the actual saving mechanism while being worked on (saving to temp based on needs defined by whatever library handles the saving) and informs theDocumentwhere it's located in the temporary filesystem.ReportHydratorclasses: Specific Hydrators for specific Reports and Strategies with a definedhydratemethod that receives some kind of handle from the Strategy, which the Hydrator uses to do more specific processing (i.e. an Excel strategy establishes a base spreadsheet, but the Hydrator writes specific data to specific cells)
Is there a better way of naming these structures? Should I move around responsibilities of these at all?
Aucun commentaire:
Enregistrer un commentaire