Information from a real-time feed, such as an RSS feed, falls into this category. Such content describes what to render into the user interface, for example, news articles. However, Java code or Spring context files are not dynamic content since they are resolved once (at compile time and during application context startup, respectfully). The server must be restarted for any changes to be picked up.
A SkyVault Surf web application architect is concerned with two kinds of dynamic content: semantic content and presentation content. These tell Surf what to render and how to render.
Semantic content
Semantic content comprises documents or files that describe business-generated content. This content is authored, approved, and published.
The following items are examples of semantic content:- An approved press release for display on the home page
- A Knowledge Base article that has been tagged and appears on several different pages of the website
- A product inventory descriptor that includes images, thumbnails, and references to product documentation
{ "author": "Pablo Neruda", "country": "Chile", "image": "pablo_neruda.jpg", "description": "Pablo Neruda is adored in South America for his romantic prose.", "popular_works": ["Cien sonetos de amor", "Confieso que he vivido"] }
This code does not contain any formatting like HTML tags or other markup, just simple data. You publish this semantic content to a website and then let the website managers display it the way they want.
Presentation content
Presentation content are documents and files that describe presentation configuration for a website. Presentation content comprises configuration that tells the Surf rendering engine how the web page or page component should look and feel.
- Which theme to use to render the website’s home page
- How many articles to display on the front page
- Which advertisement to display in a particular section of the site for the current user
Presentation content is information specific to a website user interface, and determines how to render things. A website presentation framework, such as Surf, looks to this content to figure out what to do. For example, the following XML code configures a Surf web script for rendering a biography to end users and tells the web script to render a link to the full article as well as to show the image of the author.
<component> <url>/content/display/biography</url> <properties> <link-title-to-full-article>true</link-title-to-full-article> <show-image>true</show-image> </properties> </component>
This XML tells the web script how to render the biography. The end-to-end rendering flow is illustrated in the following figure.
- SkyVault Surf receives the browser request.
- Surf asks the content delivery services for the presentation content that describes what is being requested.
- The presentation content is handed back as XML.
- Surf determines the web script to execute using the configuration specified by the XML.
- The web script calls to the content delivery services and asks for biography data.
- The biography is returned as JSON.
- The web script renders HTML markup to the end user. This HTML contains presentation output (formatting) as well as the semantic data (the biography itself).
The website user then sees the poet's content.