Skip to main content

Posts

Showing posts from June, 2016

Toolkit - Examples

This post if part of a series about the  File System Toolkit  - a custom content delivery API for SDL Tridion. This post describes a few examples of Toolkit API. Model Factory The following example retrieves a Page model and a Component model. ModelFactory modelFactory = ModelFactory . INSTANCE ; TcmUri tcmUri = new TcmUri ( 6 , 1225 , 64 ); PageMeta model = modelFactory . getModel ( tcmUri ); tcmUri = new TcmUri ( 6 , 52 ); ComponentMeta componentMeta = modelFactory . getModel ( tcmUri ); Link Resolving The following examples resolve Binary, Component and Page links. LinkFactory linkFactory = LinkFactory . INSTANCE ; Link link = linkFactory . getBinaryLink ( 6 , 84 ); if ( link . isResolved ()) { String url = link . getUrl (); } // link to a Component link = linkFactory . getComponentLink ( 6 , 52 ); // link to a Component from a Page link = linkFactory . getComponentLink ( 6 , 1138 , 1118 ); // link to a Page link = linkFa

Toolkit - Installation and Configuration

This post if part of a series about the  File System Toolkit  - a custom content delivery API for SDL Tridion. The File System Toolkit consists of two parts: a Deployer extension and the Content Delivery API itself. This post describes installing and configuring both. Toolkit JARs are available under the GitHub repository of the File System Toolkit project, in folder /distributable . Alternatively, you can build your JARs using the sources available on GitHub. Toolkit Deployer Installation This deployer extension handles the creation of JSON files on the file system. The Toolkit CD API then reads these JSON files and creates model objects from them. In order to obtain these JSON files, a deployer extension must be installed on top of a functional Tridion Content Delivery Deployer. The Toolkit deployer extension works for both file system-based or database-based Tridion Deployers. 1. In the Tridion Deployer /lib folder, copy files: toolkit-api.jar toolkit-deployer.jar t

Toolkit - Performance

This post if part of a series about the File System Toolkit  - a custom content delivery API for SDL Tridion. This post presents performance data that was captured for each major functionality with and without caching Linking, CP Assembler, Component Presentation Factory, Dynamic Content Queries, Model Factory. The data was captured on a 2014 Macbook Pro 15", 16 GB RAM, 2.6 GHz Intel Core i7 running OS X El Capitan. Test methodology: each test was run for 3 minutes and the total number of successful Toolkit API calls was measured. Then the number of calls per second was computed 'with cache' and 'without cache' test runs. Then a cache boost factor was calculated by diving (the number of API calls with cache) / (number of API calls without cache). Each cache test was executed 3 times, with different cache time-to-live values of 1 second, 5 seconds and 0 seconds (eternal cache, no expiration). The rationale is to see what impact different cache expiration/evi

Toolkit - A Tridion File System Broker

In the following series of posts, I am describing a custom file system storage, called the Toolkit, that mimics the behaviour of the Tridion File System Broker. There are a couple of noticeable differences from the File System Broker in that it: stores items as JSON files on the file system; provides dynamic queries functionality; The Toolkit offers the following functionality: Dynamic linking (Component, Page and Binary) Component Presentation Factory Component Presentation Assembler Custom Tags execution during Component Presentation assembling Dynamic Content Queries based on CustomMeta criteria , sorting, and pagination Backing the Toolkit implementation are the following: Model Factory offering CRUD operations on models backed by a cache for model objects and a file system provider acting as data layer abstraction; File System Provider acting as Data Abstraction Layer that offers CRUD operations between model objects, JSON de-/serializer, JSON files, and