Global Directory
Global Directory
EXPLORE OUR SITES
London Stock Exchange Group
LSEG Data & Analytics
MyAccount
LSEG Perspectives
London Stock Exchange
FTSE Russell
LCH
Contact Us
Home
TR Internal
How is product specific static content used in Cobalt?
Samuel Slotsky
Product specific static content is kept in a different location than Platform static content, but products still use the Platform stuff. For any given product, how are these two sets merged in deployed environments? How are they merged locally?
Find more posts tagged with
static-data
refinitiv-internal
Accepted answers
Andrew Gerber
As you said, each product has their own folder in the StaticContent project. Beneath this folder, products have to follow a very specific directory structure to ensure that their static content is deployed correctly. At deploy time, an Ant script is invoked which merges the Platform and product static content files. A couple of tasks are performed during the merge process:
- Product javascript and images are copied over into the Platform folder (collisions between products are avoided because of the strict directory structure)
- Product CSS files are appended to the end of the platform CSS files and are copied back into the product file
- Some JavaScript files are concatenated together into one file, depending on the entries in the Ant script.
- All JavaScript and CSS files are minified.
When working locally, there is a Powershell script for each product which does much of the same thing as the Ant deployment script does... This should be used for merging/deploying a product's static content locally. CM also has a developer Ant script which is meant to be used locally and can be used if preferred, however I'm not sure how many use this script locally.
When deployed, the static content web application will serve up the correct product file based on the product being requested.
[Here is a good document][1] describing the build/deploy process as well as what happens when a request hits the Static Content server.
[1]:
http://tfsnpt.int.thomson.com/Cobalt Platform/Documents/On boarding/Modules (AKA verticals)/Static Content Module/Cobalt Platform Static Content.docx
All comments
Andrew Gerber
As you said, each product has their own folder in the StaticContent project. Beneath this folder, products have to follow a very specific directory structure to ensure that their static content is deployed correctly. At deploy time, an Ant script is invoked which merges the Platform and product static content files. A couple of tasks are performed during the merge process:
- Product javascript and images are copied over into the Platform folder (collisions between products are avoided because of the strict directory structure)
- Product CSS files are appended to the end of the platform CSS files and are copied back into the product file
- Some JavaScript files are concatenated together into one file, depending on the entries in the Ant script.
- All JavaScript and CSS files are minified.
When working locally, there is a Powershell script for each product which does much of the same thing as the Ant deployment script does... This should be used for merging/deploying a product's static content locally. CM also has a developer Ant script which is meant to be used locally and can be used if preferred, however I'm not sure how many use this script locally.
When deployed, the static content web application will serve up the correct product file based on the product being requested.
[Here is a good document][1] describing the build/deploy process as well as what happens when a request hits the Static Content server.
[1]:
http://tfsnpt.int.thomson.com/Cobalt Platform/Documents/On boarding/Modules (AKA verticals)/Static Content Module/Cobalt Platform Static Content.docx
Quick Links
All Forums
Recent Questions
Terms of use
Privacy & Cookie Statement
Cookies settings
Do not sell my info
Whistleblowing
UK Bribery Act
Modern Slavery Act