Overview of the modes

Legacy

In contrast to the standalone mode, the legacy mode utilizes both the Fiona Connector and the Fiona 7 gem. Here, the Fiona Connector takes the leading role, and the Fiona 7 gem has a subordinate role.

Accordingly, the object models are still derived from RailsConnector::BasicObj, and the CmsController is derived from RailsConnector::DefaultCmsController. Furthermore, the routes /:id/:name and /:permalink are handled by the Fiona Connector.

Adding the Fiona 7 gem in legacy mode to an existing Rails Connector or Fiona Connector application initially doesn't change the behavior of the application, allowing you to step-by-step migrate it to Fiona 7. This lets you benefit from Fiona 7 technology and gradually replace edit markers with in-place editing, for example. Additionally, the existing object classes and attributes can be edited and applied using the new technology.

Object class and attribute managment in legacy mode

Using the Fiona Connector requires all attributes and object classes to be defined in CMS Fiona, and the attributes need to be assigned to the object classes. This can be done either in advance by the system administrator or, when using Reactor, by means of migrations. With Fiona 7, this in no longer required.

Attributes of object or widget models are defined within an in_place block in the model. Once a missing attribute is stored, it is created automatically and assigned to the object class concerned. Analogously, missing object classes are created once the first instance of it is created.

in_place do
  attribute :title, :string
  attribute :widgets, :widgetlist
end
Missing attributes or object classes are created automatically as required. But they are never automatically deleted!

Attribute type mappings in legacy mode

In a pure Rails application, models can have equally named attributes, even if their type is different. With Fiona 7, this is not possible since all attributes, which are defined in models of the Rails application, are considered global by Fiona. To prevent naming conflicts and preserve the origin of the attribute it is recommended to prefix every attribute name with the name of the model to which it belongs:

class ModelOne < Obj
  in_place do
    attribute :model_one_headline, :string
  end 
end
class ModelTwo < Obj
  in_place do
    attribute :model_two_headline, :html
  end 
end

Further features and limitations

  • Wizards work without limitations in this mode.
  • Searches using the SES can still be performed and do not require an object class specification to produce results.
    Obj.where(:title, :starts_with, "News")
  • CMS Fiona attributes such as  valid_from, valid_until and suppress_export can be directly used by the application.
  • Searching an editing news channels is supported.
  • To derive a Scrivito object from a Fiona Connector object, use the scrivito_obj method.
    @obj.scrivito_obj
  • APIs such as fiona7_tag and fiona7_tag_list are available in legacy mode.

Standalone

In contrast to the legacy mode, the standalone mode is biased towards the Fiona 7 gem. Accordingly, object models are derived from Scrivito::BasicObj. Most functions provided by the Fiona Connector are disabled.

Features and restrictions

  • Attributes are automatically created using the name of the object class they are used in as a name prefix.
  • Attributes provided by Fiona such as valid_from, valid_until and suppress_export are not available within the application and can no longer be made available through object models.
  • In this mode, the Fiona GUI should no longer be used. Changes made using in-place editing may not be immediately reflected in the Fiona GUI.
  • Helpers provided by the Fiona Connector are no longer available. Only the helpers provided by Scrivito should be used, e.g. scrivito_tag or scrivito_tag_list.
  • It is still possible to search using the SES, but an object class needs to be specified for searches to produce results:
    Obj.where(:objClass, :equals, "publication").and(:title, :starts_with, "News")
  • Fiona news channels are not supported in this mode.
  • All content is stored as publications in Fiona. As a consequence, it is not possible to determine the Rails model from the object class of an object in Fiona.