Posts Tagged ‘Basic Assets’

When to Use the Basic Asset Model in Fatwire?

When the data for an asset type can be imagined before the creation, as a simple flat table where each asset of that type is a single record and every record has the same columns, that asset type should use the BASIC ASSET MODEL.

The structure in the database is as follows for the Basic Asset:

  • Each basic asset has a database table.
  • Each attribute has a field in the table.

The Basic Asset Model is the choice of developers, when the data has the following characteristics:

  • FIXED / PREDICTABLE ATTRIBUTES: This means that we know that the data has a fixed number of attributes, and in future, there is no necessity to add new attributes to the data type.
  • HOMOGENEOUS: This means that all the assets are of the same type, where all the assets have the same set of attributes.
  • MODERATE ATTRIBUTES: There are a very few attributes to the asset.
  • USE STATIC PUBLISHING MODEL: There are very rare cases, where the Flex model uses the Static publishing.
  • NAVIGATION: Visitors of the site browse your site by navigating through the links, and not automatically driven through their selected options.

Basic Assets

Xcelerate provides some built-in assets such as page, template, collection, etc. However, since content server has a rich and flexible type system, you can define your own assets.

The Basic Assets Model helps us in the creation of User Defined Assets. For this, we need to know about the ASSET DESCRIPTOR FILES (ADF). An ADF is nothing but an XML file ( A Descriptor File), which describes the asset type, its properties (otherwise known as attributes), their storage location, how to display them, data types of the properties, etc.

Defining a new Basic Asset with AssetMaker:

A very simple example of a Basic Asset descriptor looks like this:

<ASSET NAME="NewBasicAsset" DESCRIPTION="A New Basic Asset"  PROCESSOR="4.0"
Description of Fields:
The NAME field in ASSET tag specifies the name that will be stored in the database.
The DESCRIPTION field in ASSET tag specifies the description.
The DEFDIR field in ASSET tag specifies the location where the URL fields need to be stored.
The PROPERTIES tag specifies the group of properties that belong to this asset.
The PROPERTY tag specifies the name of the property and its description.
The STORAGE tag specifies the data type and length
The INPUTFORM tag specifies the width, length, type that should be displayed in the UI.
The SEARCH tag specifies the name, etc that should be displayed in search screen.
How AssetMaker Works:

Using AssetMaker to create a new basic asset type involves four general steps:

  1. Code the asset descriptor file.
  2. Upload the file.
  3. Create the table.
  4. Register the elements.
Creation of Assets with Asset Maker Utility:
  1. Double click on the ASSET MAKER in the tree in the Advanced UI. Click on “ADD NEW ASSETMAKER ASSET TYPE”. Enter the name as entered in ADF file, and upload the file.
  2. In the next screen, Click on “CREATE ASSET TABLE” and then on “REGISTER ASSET ELEMENTS”
  3. Now, enable the newly created assets for the site. The newly created assets are ready to be used by the site.