Chapter 4. Web Content Production with Web Forms

In the previous chapter, we learned about creation of a web project. To set up a website you must have both web forms and a web project. Web forms provide the facility to manage content through a user-friendly and technology-neutral (as much as possible) interface. It allows you to separate content from code and presentation logic. It allows non-technical content owners to manage, approve, and deploy their own web content. Static content is required for a few websites. However, for many sites, dynamic and flashy content is required. Dynamic content can be managed easily with web forms, as content can be created once and rendered in many formats. In this chapter, you will learn about basic and advanced web form concepts and the ways to extend it as per your business requirements.

By the end of this chapter, you will have learned how to:

  • Create web forms
  • Create rendition templates
  • Create FreeMarker templates
  • Create Extensible Stylesheet Language transformations
  • Associate web forms and renditions for specific or multiple projects
  • Update web forms and rendition templates
  • Create dynamic content
  • Create web publishing dashlets

Why web forms

Consider a website, say, www.cignex.com, which has some primary sections, such as news, blogs, events, trainings, and solutions. The news, blog, and training elements have to be updated every month. Let's assume that in the structure of news element there should be a title, news headline, sub headline, page content, image, image title, and news date. For each content of the news, you must have these elements. To update these sections, each time you have to create new HTML/JSP files from scratch. This becomes quite clumsy. We need a way to manage it easily. Assume the concept where the structure is in place and you have to just put in the content. The concept can be called web forms. Another important thing to focus on is the fact that web forms are always stored in XML (Extensible Markup Language) format. Using web scripts, you can extract the web content (which is in XML format) and serve external applications. Thus you can consider the user interface to be in various technologies that will enable content to be used for various purposes wherever required. Content can be transactionally deployed to static content servers or Alfresco runtime repositories, providing complete architectural flexibility for web forms.

These enhanced capabilities make it easier for authorized users to preview and edit various file types, including those with multi-language content, before publishing. The new capabilities would allow contributors to preview pages rendered with different file formats, including HTML, PDF, RTF, XML, and mobile, as well as any UTF-8 compatible foreign language formats.

Following are the benefits of web forms:

  • Easily extensible solutions: This will allow users to separate content from code and presentation logic. Thus, content contributors can easily manage the website without developer intervention.
  • You can display the content in various formats.
  • Easy integration of external systems: Web forms are stored in XML format, which gives the advantage of platform and language-independent technology, thus making the content available to any web technology (PHP, Python, J2EE, AJAX, Flash, Cold Fusion, and so on).
  • Asset reusability: Static and dynamic include of the content makes the structure simpler.
  • It provides a rapid learning curve. Developing and maintaining Alfresco web forms require basic skills in XML, XSD, XSLT, and FreeMarker.

The following diagram shows how to access content from the Alfresco repository to an external application:

Why web forms
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset