Skip to content

DocPad Database Architecture Vision #705

@balupton

Description

@balupton

In relation to #445 (abstract all the things) and my comment here about a possible abstraction architecture #702 (comment)

I'd like to use this issue as way to implement the goal of abstracting out the DocPad architecture, while at the same time addressing our performance and memory issues, and allowing us to evolve to the demands of the future.

I've outlined the following architecture already, that being:

  • Core Experience
    • DocPad CLI Module
    • DocPad Core Module
      • DocPad Generate Module
      • DocPad Plugin Module
      • DocPad File Model & Collection Module
      • DocPad Block Model & Collection Module
    • DocPad Watching Plugin
    • DocPad Growl Plugin
  • Extra Experience
    • Renderer Plugins
    • Helper Plugins
    • Source Plugins (formerly importers)
    • Interface Plugins

Tying this together, it would look something like this:

jmmz

qltu

The parts on the right being source plugins, that serve pulling in different sources of content (formerly called importers), and keeping them up to date. The decision for the rename is that the name "importers" reflects only a one way data transfer, whereas with this new architecture, the source plugins would serve as bidirectional data transfer. Import into DocPad, and export into the original source.

The parts on the left being renderer plugins, which serve as modifying content during the generation phase.

I feel we can have a very basic file model, which event system serves as a mediator that DocPad then listens to, to perform generations and saves.

We should be able to abstract this in such a way that other static site generators, content management systems, and generic node modules can use this. As well as plugins would be written against the content database, rather than against DocPad, but with DocPad providing extra features and conventions etc to make things easier.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions