Top Banner
Digital Product Studio
35

Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Jul 16, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Digital Product Studio

Page 2: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Architech's strategy to modern dotCMS developmentGoing headless and other things

Page 3: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Problems Encountered

Page 4: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Separation of Code and Content

• Frontend assets live in the site browser

• Confusing responsibility

• “Code” assets subjected to same handling as other content assets

Page 5: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Velocity Templates

• Unpopular

• Limited debuggability

• Unit testing challenges

Page 6: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Complex Custom Tooling

• Task runners for processing and deploying VTLs, CSS, and Javascript through WebDAV can be time consuming to develop and maintain

• CI/CD scripts such as Jenkinsfiles and Gradle to deploy static and dynamic plugins have to be customized to deploy all of the artifact types to dotCMS

• Upgrade automation is a challenge

Page 7: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Disruptive of a normal development/deployment workflow

• Changes done through the UI can’t be gated and reviewed in a Pull Request

• Extra work re-producing local work in shared environments

• Long guides to recreate a local environment

• Push publishing for “Application” deployment

Page 8: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Plugins Hurdles

• OSGi is a science

• Upgrading plugins for new dotCMS versions can be delicate

Page 9: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Ideal State for dotCMS development

• Clear separation of code and content

• Modern web development without specialized adaptations

• The state of the solution in dotCMS can be deployed automatically and repeatedly

• Changes are subject to code reviews and gating

• Building and deploying is standard and simple

• Upgrades are easier

Page 10: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Go Headless

Strategy #1

Page 11: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

What is “Headless”

• Removing the responsibility of rendering HTML from the CMS

• Implement the web layer using first class web tools

Page 12: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Why go “Headless”

• Remove the Velocity Templating lock-in

• Opens up options go with “thick client” apps

• Application is a separately deployable package

• Provides a clear separation of code from content for your front-end

• Supports best of breed, highly productive development/deployment workflow

Page 13: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Advantages of a Single Page Application

• A single language to render your application

• Faster site navigation

• Server work offloaded to browser

• Currently there’s only three top choices for SPAs: Angular, React, and Vue

• Clear separation of roles

Page 14: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Options to go “Headless”

• Content as a Service

• Hybrid Layout as a Service

• Pure Layout as a Service

Page 15: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Content as a Service

• Authors only author content instances from defined types

• All of the Information Architecture of the site lives outside of dotCMS

• Simply just retrieving contentlets from dotCMS

• Use an API aggregation layer

Page 16: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Hybrid Layout as a Service

• Authors still have the ability to dynamically layout pages

• Pages still exist in dotCMS’ site browser and are presented in the SPA

• Pages still have templates, templates still have containers, and containers still have rendering Velocity Templating logic

• The SPA has built-in knowledge of the template and knows how to render its layout

• Rendering of the container’s html is still done in dotCMS in Velocity, which is what makes this the hybrid approach

• Currently supported out of the box in dotCMS via the ‘page’ REST api

Page 17: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Pure Layout as a Service

• Similar to Hybrid Layout where pages still exist in dotCMS’ site browser. Page layout is still authorable

• The SPA has built-in knowledge of specific templates, containers, widgets and how to render them

• Requires an API that can retrieve the template, containers, and contentletsinside those containers

Page 18: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Navigation as a Service

• Combine with Layout as a Service

• dotCMS’ `nav` REST API to generate menus

Page 19: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Caveats

• Page Authoring needs to be adapted for LaaS

• Sitemap XML generation may need update

• Sitesearch may need update

• CaaS can circumvent some expected out of the box dotCMS features

Page 20: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Automate Creation of Solution Elements

Strategy #2

Page 21: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

What gets created through Automation

• Content Types

• Templates

• Containers

• Widgets

• Etc. (Anything a Content Author is not responsible for)

Page 22: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

How to Automate

• As a plugin!

• Run on startup

• Use JSON definitions

• Treat it like a migration

• Use predictable Identifiers

Page 23: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Caveats

• Some automation needs may not be supported out of the box

Page 24: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Containerization

Strategy #3

Page 25: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

What’s In?

• dotCMS!

• Java JVM

• Dynamic Plugins

• Static Plugins

• Velocity Templates and other static code assets

Page 26: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

What’s Out?

• ElasticSearch Indices

• The Assets folder

Page 27: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

What does containerization get us?

• A standard build and deploy process

• Simplified CI/CD

• An easy way to get dotCMS up and running

• Easier upgrades

• A fully contained custom dotCMS

• dotCMS no longer an “Application server”

Page 28: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Running Containerized dotCMS

Page 29: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Microservices for Custom Logic

Strategy #4

Page 30: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Why separate logic into external Microservices?

• Reduce OSGi and other classloader complications

• Easier tracking, monitoring and isolation

• Choose the right tool for the job

• Meet separate scalability and uptime needs

• Reusable business value not isolated to dotCMS

• Separate features over multiple teams

Page 31: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

What to separate into external Microservices?

• Reusable business value

• Meets needs of separate scalability and uptime

• Need for tools that can be a difficult integration into dotCMS

• Can be relatively easy to separate from dotCMS

Page 32: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Conclusion

Page 33: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

Strategies to get to the ideal modern state of dotCMS development

• Go Headless

• Automate the creation of fixed structures and mainstays

• Containerize dotCMS

• Externalize customizations into microservices

Page 34: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

A&Q

Page 35: Digital Product Studio - DotCMS · •Push publishing for “Application” deployment. ... Ideal State for dotCMSdevelopment •Clear separation of code and content •Modern web

70 Bond St., Suite 400Toronto, ON, CanadaM5B 1XB

P: 416.607.5618F: 416.352.1768www.architech.ca

©2018 Architech. All Rights Reserved.