Problem/Motivation

The initial version of the module uses the names "Interpreter" and "Register" to define the classes the respond to entity CRUD events and write them to the audit log destination. These names don't completely represent what the classes do and are not common terminology within the Drupal or Symfony code bases.

Proposed resolution

Some possible alternative names for "Interpreter" are:

  • EventSubscriber -- Used throughout Drupal core for classes that subscribe to event notifications and do something as a result.
  • EventProcessor -- Less frequently used in Drupal core to represent something that manipulates data from an event.
  • Processor -- Shortened version of EventProcessor.
  • Normalizer -- Used by the core serialization module to represent a class that is responsible for converting an object to a standard format for processing and storage.

Some possible alternative names for "Register" are:

  • Logger -- Used throughout Drupal core to represent a class that writes a log entry to some destination.

I also suggest that we remove the "AuditLog" prefix from all of the class names as they are redundant with the module namespace name.

Remaining tasks

  • Collect feedback on naming structure to use.
  • Refactor codebase to use agreed to naming structure.

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#4 2863142-4.patch13.47 KBdagmar

Comments

shawn_smiley created an issue. See original summary.

dagmar’s picture

Thanks!

While this is not 100% a symfony event subscriber in my opinion EventSubscriber seems the more accurate term.

Regarding register, I would like to propose StorageBackend. This is used drupal already. What do you think @shawn_smiley?

shawn_smiley’s picture

I'm in agreement with using "EventSubscriber" and "StorageBackend". Thanks! :-)

dagmar’s picture

Category: Plan » Task
Status: Active » Needs review
StatusFileSize
new13.47 KB

Renamed

  • Register into StorageBackend
  • Interpreter into EventSubscriber

I also removed some AuditLog redudant names, and made shorter the tags required to discover services.

  • glbissues committed f058eb0 on 8.x-1.x authored by dagmar
    Issue #2863142 by dagmar: Discuss naming strategy for module classes
    
dagmar’s picture

Status: Needs review » Fixed

I committed this to unblock other issues like this: #2864497: Separate Storage Backends into submodules

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.