What does it mean to use a CMS based on structured data?
A core value of Perch is that the CMS is based on structured data, and on the use of semantic markup. What does this mean and what benefits does this approach bring to designers and developers using it?
How do Perch templates work?
When you create a Perch template, you describe both the admin UI and the front-end markup. Templates are HTML fragments that also include Perch tags. In the Perch admin these tags become fields for content editors to complete – adding text, dates, images or even adding a location and selecting a position on a Google Map.
Once the editor saves their work, their content is compiled with the markup you added in your template to become the output sent to the browser, and of course this is all cached at edit time, we don’t do any expensive and slow processing at runtime.
This means that you have full control of the markup. Perch just looks after the content.
A separation of concerns
This separation of concerns – templates taking care of how things are marked up and the content stored separately – is really important. By storing the content independently of the markup it makes it simple to reuse that content with a different template. Or just display part of it somewhere else. You don’t get that flexibility if your content is tag soup generated from a WYSIWYG editor hijacking a text area.
If you know what markup you need, you can create a Perch template for it
We often get presales queries along the lines of, “Can I use Perch with Bootstrap?” or “Will Perch work with Foundation?” yet the fact is that Perch will generate pretty much any front-end code you need for whatever it is you are working on. Take a look at our example templates for the picture element and for using Microdata to create rich snippets for SEO for examples of how detailed template creation can be.
Therefore, if you are a fan of OOCSS and need to be able to add classes to your markup? Perch has you covered.
That jQuery Gallery you really love? You can create a Perch template to generate the specific markup it requires.
Want to use tables for layout? Please don’t, but if you really wanted to, you could.
In fact, template creation doesn’t even just need to be for HTML. You could use Perch to create XML, JSON, YAML or anything else you might need. If it’s text based Perch can generate it.
Structured content makes life easier for content editors
Structured content is great for designers, but something we find time and time again is that this approach to content is much simpler for clients and content editors. They don’t need to make decisions about how the content should look or how it should be marked up. They just enter their events, or contact details, or image gallery assets in a custom form – a form that can have help text that you have provided to guide the tone of that content. In this way Perch helps to promote and maintain the content strategy for the site, helping busy people keep their site up to date without worrying they might be about to make a mess of things.
So that’s why structured content is at the heart of Perch. We don’t think that our software should dictate how you design websites or force you to make front-end compromises, and everything we add to Perch is tested against this core value.