Hello All,
We have all
heard a lot about metadata. I heard this
term for the first time on my first day at Sage, during the first day
introduction: I was told that Sage CRM is metadata driven. Huh? I must admit - I didn't have the
faintest idea what it meant. Fortunately,
it didn't take long to understand it. Over the last few years at Sage, I have noticed that
for many people this term is not fully clear — as it wasn't for me. In this
article I will try to explain what metadata is and what are the advantages of
applications that are metadata driven.
METADATA
Before going to the definition of metadata itself, I would like to compare a standard application versus a metadata driven one — on the simplistic example of an application that has one button. The following table shows typical actions that are taken when the application starts, and shows the button:
Before going to the definition of metadata itself, I would like to compare a standard application versus a metadata driven one — on the simplistic example of an application that has one button. The following table shows typical actions that are taken when the application starts, and shows the button:
Standard Application | Metadata driven application |
Start | Start |
-
|
Load metadata: load list of buttons; |
Prepare main screen: add the button to the screen; | Prepare main screen: loop: for each button defined in metadata, add button to the screen |
Show the screen | Show the screen |
As you can
see, the metadata is loaded, and the
metadata — in our example application — defines
the button(s). So what is metadata? Wikipedia says: "Metadata is loosely defined as data about
data". Having the previous example in mind, it is not hard to understand this
definition: metadata is the information how the application should work, behave,
look or feel. In our example metadata stores a list of buttons on the application
screen — it stores the information that one button should be there. But what
are the advantages? In both applications the result is the same… The answer is:
customization. To change the standard application, for example to add a button - the developer must write code, compile it
and deploy; to apply the same change in a metadata driven application — the user can change the metadata.
METADATA IN DATABASE APPLICATIONS
Most applications are "database" ones — data (for example customer information) is
stored in a database, and an application performs various operations on it: add,
modify, delete, search etc. In standard database applications, the only tables
in the database are the ones that the system is
designed to work with — customer info, company data, invoices — etc.
Typically such an application has hardcoded table and column names, as well as
most database queries. In a metadata driven application, the database may contain
additional tables that store the description of the system — for example the names of data
tables and columns, configuration of system menus, content of screens etc. In
metadata driven applications, the only hardcoded code is responsible for
loading the metadata at the application startup. The rest is generated
dynamically at runtime.
METADATA IN SAGE CRM
As I
mentioned earlier, Sage CRM is almost completely metadata driven. The metadata in
Sage CRM is stored in various tables, most of which have names that start with the word
"custom". A lot of operations performed via the Administration section of Sage CRM
alter data stored in those tables. The following table presents some of the Sage CRM
metadata tables and their main purpose:
Table Name
|
Description
|
Custom_Captions
|
Translations of
system captions, definition of items in dropdown fields
|
Custom_Tables
|
Definition of
entities
|
Custom_Edits
|
Definition of fields
within entity
|
Custom_Tabs
|
Definition of top
tabs for entity
|
Custom_ScreenObjects
|
Definition of blocks
|
Custom_Screens
|
Definition of
screens content
|
Custom_Lists
|
Definition of lists
|
As you can
see, the whole User Inteface of Sage CRM is auto generated based on metadata tables. What
it gives to Sage CRM users is the ability to customize and tailor the system so it fits
particular business model much better!