Storage Adapters and Node instantiation - Jackalope2/jackalope GitHub Wiki

The transport should be more modular. One idea:

class StorageAdapter
{
    /**
     * Get the adapter for read operations.
     *
     * @return Read
     */
    public function getRead()
    {
        return $this->read;
    }
}

That way, each chapter of the spec can be run with a specific adapter. The StorageAdapter is a container for the adapters. Maybe we could even inject just the adapters that are needed into each jackalope class - that would be very explicit, but might be a bit cumbersome when many parts are needed.

Creating nodes and properties

The nodes should be created by the storage adapter. Creating property objects should actually be delayed to when they are requested. See also https://github.com/jackalope/jackalope/issues/271 for problems with the current implementation

See also https://github.com/jackalope/jackalope/issues/271

Event dispatcher

Should the base transport have an event dispatcher or should this be implementation specific?

  • FinishSave()
  • StoreNodes()
  • etc.

Flexibility

The storage adapters should make it simple to plug in different clients where that makes sense, e.g. https://github.com/jackalope/jackalope-jackrabbit/issues/29