Search code examples
liferay

Liferay - What Asset framework is useful for?


I am studying Liferay and I came across Asset Framework.

I can see that every enetity in Liferay can be an Asset, and this is useful to link entities without having the need to create complex relations.

Is this framework following the "low coupling and high cohesion" priciple?

Is it this the reason why Liferay people decided to use such a thing?


Solution

  • The Asset Framework denotes the commonalities of publishable content. Those can be Web Content Articles, Blog Articles, Message Board Posts, Documents and others. They all have certain properties in common (no assumption of completeness in this list):

    • It's all publishable content - e.g. something that has a visual representation
    • can be searched for (via search index) - either in textual content or metadata
    • can be categorized and tagged
    • typically supports multiple ways to display the content (e.g. abbreviated, full) that can be scripted
    • Can be subject to workflow approval before being published

    The power of Assets can be utilized with - for example - the Asset Publisher on the frontend, where you can automatically publish certain content (Assets) based on certain criteria (typically: Metadata, like tags, categories, content types).

    Having such an abstraction over various content types enables the whole system to handle all assets uniformly, but still get details about the actual asset's type when necessary: Think of this: Workflow doesn't need to be written for each content type, just for assets. But in the process of pushing content through workflow, you still are able to edit all the assets with their native editor, despite the workflow system having no idea about the actual content type.