Basics of DC2F

DC2F is currently only supports a JSON Content Repository. This means that you can use a simple JSON file structure to configure DC2F and manage your content. This is obviously not very satisfactory and we are working hard on a web based editor to make things simpler.

Everything within DC2F is a Node. No matter if you are managing your content, configuring a template or setting up a new project. You are always working with Nodes. And in the current state this means writing down JSON files representing nodes.

The basic separation follows the typical MVC Pattern:

  • Model: Rich content objects, these aren't all just "Web Pages" but real object types about what your web pages will all about. This could be articles, generic content, blog entries, but also biographies, products or places, depending on what kind of content your are managing. But the important thing is, that these content types don't necessarily need to know that they are rendered in the context of a web page.
  • View (Template): Defines how each content types will be rendered, and how it looks.
  • Controller: The URL mapping and render configuration which brings together the content objects with their respective templates and serves them under an URL, or publishes it into a static file.

Content Types (Model)

Before managing your content, you first have to define the structure of your content. In DC2F you will not be managing different "Webpages" but instead smart "Content Objects". The different types of content are called NodeTypes and are themselves configured using a simple node structure.

An example for a simple content type you might use for a basic website might look like the following:

	"attributes": {
		"title": { "type": "String", },
		"body": { "type": "clob",  },
		"lastmodified": { "type": "Node", "typeofnode": "classpath:com/dc2f/nodetype/Date" },