Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to Contentful

Intro to Contentful

Contentful Webinars

March 20, 2020
Tweet

More Decks by Contentful Webinars

Other Decks in Technology

Transcript

  1. Training Delivery Manager Jim Ambras ❏ Led the development of

    software products in Silicon Valley in companies ranging from 2 person startups to Fortune 50 companies. ❏ Been working with Drupal since 2007 and was the founding VP of Product Development at Zip2, an early SaaS CMS startup used by over 220 media companies before being acquired by Compaq/AltaVista. Previous to Contentful Ambras was a Pre-Sales Solutions Architect at Acquia. ❏ A lifelong music lover, he also contributes to the Volumio open source audiophile music player, developing its Spotify plugin in Node.js and Angular. ❏ B.S. degree in Computer Science from Syracuse University and did graduate study in computer science at Stanford University's School of Engineering.
  2. Please raise your hand if you have previous experience with…

    ✔ Drupal/ Acquia ✔ Wordpress ✔ AEM ✔ Sitecore ✔ CoreMedia ✔ Typo3 ✔ Other
  3. What is your experience with Contentful? I’ve used it and

    am loving it! I have some experience with it. What is Contentful?
  4. Our big platform bet: stacks beat suites Innovative companies will

    assemble their DXP, with a content platform at the center DX Suite DX Stack vs. Monolithic Marketing Suite
  5. Contentful lets you build digital products, fast APIs JSON Structured

    content Reuse and repurpose content, independent of channel or language Composable stack, connected to other platforms, at cloud scale Integrate with digital delivery workflows for launch & optimization Decoupled architecture Agile workflows
  6. Enterprises are replatforming on Contentful TELUS transformed from slow and

    repetitive content updates to agile product releases for 12M customers Before Siloed content Slow to market Technical debt 7 content sources across 5 business units, powering 30+ digital products/properties After Fast time-to-value: reference architecture Low risk: more experiments & iteration Improved agility: 11 deploys per day One content infrastructure to rule them all, across business units and digital products 4x faster
  7. Proven results across multiple solutions Teams can launch, iterate, and

    experiment with new digital products more rapidly 5x faster to launch new customer touch points Modern stack Websites 3x faster to launch new event and campaign microsites Personalized experiences 14% increase in conversion rate with personalization integrations Agile eCommerce 66% decrease in unit cost of new digital products across business teams Digital delivery platforms
  8. 12x faster to create and launch new landing pages Faster

    launches BeautyCounter dramatically speeds up the time it takes to publish new content
  9. 78% reduction in page load time Leading to: 31% reduction

    in bounce rate 11% increase in conversion rate “Site speed gains helped us become more competitive in search engine rankings.” Speedier sites & apps TUI Nordic achieves significant site speed gains by moving to a modern tech stack
  10. 14% increase in conversion rate Plus: 4x faster to market

    30% increase in page load speed 4x improvement in YoY digital sales Higher conversion rates TELUS integrates personalization and testing tools with Contentful for better results
  11. 4 Days From brief to going live Faster launches Tribal/DBB

    built a new microsite for New Zealand Trade & Enterprise for Covid-19 info
  12. Any channel, anywhere No matter where your customers are: mobile

    or web, online or onsite, all around the world Mobile Apps 2x quicker app load times Cross-Channel Experiences 4x faster to launch new onsite/offline and online experiences 98% reduction in time to launch new pages across multiple geographies Global Localization
  13. Create reusable content Reuse the same content across pages, properties,

    and channels JSON output Rendered view Rich text editor view
  14. Content at scale Independent editorial and development workflows Using environments

    for agile development Refactoring content models Content intended to be used for multi-channel delivery
  15. Content Management API Read/Write Create, edit, publish, unpublish, archive, and

    delete content and content model Content Preview API Read-only Retrieve draft and updated content in addition to published content Content Delivery API Read-only Retrieve published content to display in an app or website Images API Read-only Retrieve and apply transformations to images stored in Contentful Contentful core REST APIs
  16. Contentful is a content platform Content Creator Content Delivery API

    CLI Web App Content Management API SDK SDK SDK Apps & Websites Conversational & Wearables Apps & AR/VR Powerful CLI and tooling to integrate into existing developer workflows or to help define brand new workflows The APIs, webhooks and SDK’s developers need to power content in any digital product Content Preview API Customizable web app for marketers and publishers to collaborate and create content Developer Images API
  17. Contentful terminology Organizations Top most parent object, connects users to

    a company. Users A User can have access to all or limited access to certain spaces based on roles & permissions. Spaces A child entity of an organization. A container for content, assets and UI extensions. Environments Are entities belonging to a space, they contain an isolated copy of content and assets. Implications for content modeling
  18. Security & compliance Application security Compliance ISO 27001 certification TLS

    v1.2 for content delivery and mgmt AES-256 encryption Secure headers using HSTS CMA/CDA separation Web application firewall (Incapsula) Automated vulnerability testing Scanning & security penetration testing AWS Identity and Access Management Continuous monitoring (Librato, New Relic) All content changes require explicit authentication Full entry history recorded in log files PCI compliant, external scan every three months
  19. Performance CDN Application Integrated CDN offering (Fastly for JSON; Cloudfront

    for images / assets) Capable of caching API data, purgeable within 150 milliseconds Optimized to serve binary assets and long-tail content Enforces application logic on the network edge Actively filters requests and restricts external access to origin servers Multi-layer setup to eliminate latency penalties Multi-region availability Compressed JSON response payloads Auto-scaling of computing resources during traffic spikes Sync API limits data transfer to updated entries/assets Automatic image optimization for individual platforms
  20. Contentful’s “API-first” approach 1. Fast 2. Flexible 3. Modern Architecture

    2. Build any user experience for any device (anywhere) ‐ A large collection of SDKs ‐ Flexible content models ‐ Designed for easy localization 3. Take advantage of the “modern stack” architecture - Combine industry-leading, single purpose apps (microservices) - Built-in integrations with popular platforms - Connect platforms easily using webhooks and UI extensions 1. Fast implementation, fast performance - Cloud-native SaaS with CDN - Use the development tools you know - Fast, scalable content migration and transformation using code
  21. Content delivery architectures 1 2 3 Dynamic on Server Static

    Site Generator Dynamic on Device A client-side app using the Contentful SDKs requests content from the Contentful APIs and renders the content on the device. A server-side app receives a request from an end user, retrieves content from Contentful (and possibly other data sources), renders the content, and sends it back in response. A static site generator fetches content from Contentful at timed intervals or on content change webhook then builds the rendered HTML pages and stores them on a static web host.
  22. Pros • Lots of languages & framework options • Reactive

    – no stale data • Easier SEO • Secure secrets (API tokens not exposed to end-users) Cons • Server-related scalability ($$$) • Higher page latency • Requires external caching or CDN • Potential single point of failure Dynamic on server
  23. Pros • Simple • Reactive – no stale data •

    Fully leverages the Contentful CDN Cons • SEO support requires more effort • Possible browser compatibility issues Dynamic on device
  24. 1. Code or content changes trigger webhook to generate static

    site -OR- Generation triggered on set interval (hourly, daily, etc.) BUILD TIME REQUEST TIME Static site generator
  25. Pros • Easier SEO • Offline capability • Static HTML

    is fast and simple to serve • Secure secrets (API tokens not exposed to end-users) Cons • No immediate preview/potential for stale data • Web page-centric • Generation time can be problematic for frequent content changes • Requires external hosting, caching, and CDN Static site generator
  26. Delivery models: pros & cons Dynamic on Server Static Site

    Generator Dynamic on Device Dynamic content • • • Page latency • • • App server load • • • SEO • • • Secure Secrets • • • Contentful CDN • • • Availability • • •
  27. Dynamic hybrid with Node.js 1 2 Dynamic on Server Dynamic

    on Device JavaScript framework takes over user interaction and hydrates page Page initially built server-side on Node.js with JavaScript framework that supports isomorphic execution (e.g. React)
  28. Content Management API Read/Write Create, edit, publish, unpublish, archive, and

    delete content and content model Content Preview API Read-only Retrieve draft and updated content in addition to published content Content Delivery API Read-only Retrieve published content to display in an app or website Images API Read-only Retrieve and apply transformations to images stored in Contentful Contentful core REST APIs
  29. Contentful is a content platform Content Creator Content Delivery API

    CLI Web App Content Management API SDK SDK SDK Apps & Websites Conversational & Wearables Apps & AR/VR Powerful CLI and tooling to integrate into existing developer workflows or to help define brand new workflows The APIs, webhooks and SDK’s developers need to power content in any digital product Content Preview API Customizable web app for marketers and publishers to collaborate and create content Developer Images API
  30. GraphQL It is an open-source data query and manipulation language

    for APIs, and a runtime for fulfilling queries with existing data It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server, therefore preventing excessively large amounts of data from being returned GraphQL schemas are strongly typed - reliably know what type of data is where
  31. GraphQL Content API It provides a GraphQL interface to the

    content from Contentful. Each space has a GraphQL schema based on its content model. The schema is generated at request time so it is always current. You can use this API to consume both published and unpublished content. There is query complexity limit currently set to allow retrieval of 11,000 entities in one request. This API supports schema stitching which allows two or more GraphQL APIs to be combined into a single schema that can be presented to a client application.
  32. Small GraphQL vs. Big REST Rest API call: curl -X

    GET --header "Accept: application/json" --header "Authorization: Bearer ..." "https://api.deutschebahn.com/fasta/v2/stations/1866" GraphQL API call: curl -X POST --header "Content-Type: application/json" --header "Authorization: Bearer ..." -d '{"query": "{stationWithStationNumber(stationNumber: 1866){facilities{type description} }}"}' https://bahnql.herokuapp.com/graphql query{ stationWithStationNumber(stationNumber: 1866){ facilities{ type description } } }
  33. Small GraphQL vs. Big REST Rest API Response: { "stationnumber":

    1866, "name": "Frankfurt (Main) Hbf", "facilities": [ { "equipmentnumber": 10313104, "type": "ESCALATOR", "description": "zu Gleis 103/104 (S-Bahn)", "geocoordX": 8.66231455, "geocoordY": 50.10727055, "state": "INACTIVE", "stateExplanation": "under construction", "stationnumber": 1866 }, { "equipmentnumber": 10313109, "type": "ESCALATOR", "description": "zu Gleis 101/102 (S-Bahn)", "geocoordX": 8.66341625, "geocoordY": 50.1074703, "state": "INACTIVE", "stateExplanation": "under construction", "stationnumber": 1866 }, GraphQL API Response: { "data": { "stationWithEvaId": { "facilities": [ { "type": "ESCALATOR", "description": "zu Gleis 103/104 (S-Bahn)" }, { "type": "ESCALATOR", "description": "zu Gleis 101/102 (S-Bahn)" },
  34. Early stakeholder involvement is key Create a Pool of Sample

    Designs • Conduct an audit of existing content • Create prototypes of future content • Assemble screen shots into a slide deck Create a draft model based on visible fields • Create a list of visible fields from instances of each content type • Reconcile similar fields to create a master list • Group fields into content types of appropriate size & define relationships Revise model for functionality & best practices • Add invisible “meta” fields (for queries, workflow, webhooks, etc.) • Optimize for content creators • Optimize for developers • Implement naming conventions QA: Validate with actual content • Try to “break” the content model by using it to build diverse instances or real world content Test with Content Creators • Watch authors use the content model (usability test) • Create documentation, help and job aids Test with Developers • Have developers QA the model against front-end, migration scripts, etc. Test with Designers • Have designers test the content model by creating a variety of designs Assemble key stakeholders to define strategy • Clarify business objectives • Agree on required functionality • Make strategic content architecture decisions STEP 1 STEP 2 STEP 3 STEP 4 STEP 5 STEP 6 STEP 7 STEP 8
  35. What should you store in Contentful? Content • Text •

    Images • Audio/Video • Geo location Micro-Copy • Field labels • Button text • Navigation Localized Content • Localization strategies • Translation permissions/workflows Content Metadata • SEO & Social Media • Images as content types • Tags for navigating the content model Process Metadata • Site functionality (sort, search, etc.) • Editorial workflow • Webhooks Content Components (“Assemblies”) • Atomic design – chunks not blobs • Giving content creators control over layout • Visual design systems
  36. Topics are reusable content components ✔ Individually authorable ✔ Pure

    content ✔ No presentation options ✔ Building block for assemblies
  37. Assemblies are reusable visual components ✔ Not individually authorable ✔

    Contains topics ✔ Includes presentation options ✔ Assemblies can contain assemblies
  38. Content types can use inheritance Product Name Manufacturer Color Product

    Type (reference) Shoe Size Sole type Heel type Pants Waist Length Type (formal, casual) Shirt Sleeve length Collar Fabric weight You can add or change fields that apply to every product without duplicating the change for every product type
  39. Content types can use composition Press Release Title Body SEO

    Content Contact Info Location Info SEO Content Page title Meta description OG tags Location Info Name Geo coordinates Contact Info Name Title Email address Adapted from Deane Barker’s “Real World Content Modeling”
  40. Field level localization vs. entry level localization Title Text (FR)

    Field Level Localization Entry Level Localization using Localization Objects Title Slug Text (EN) Text (FR) ... Title Slug Ref 1 Ref 2 ... Title Text (EN)
  41. The field Localized is an array that contains an entry

    for each locale Entry level localization - two content types 1 2
  42. Viewing content puts user into segment by category Works for

    anonymous as well as known users Personalization Related Content Easy to create a “You also may like…” links Navigation Menus can point to content of various categories Analytics Analytics tools can show site viewing behavior by categories Why categorize your content?
  43. Integrating the Contentful way Enable integrations where the journey of

    the practitioner overlaps Monolithic, inflexible, opinionated Lean integrations of industry-leading services, modular, custom tailored Deployment Translation SEO Search Productivity Marketing Editorial Ecommerce Deployment Translation SEO Search Productivity Marketing Editorial Ecommerce ✔
  44. Taking the Contentful Optimizely app as an example Multi-platform Take

    your content and experiments to any platform Structured content Control in a structured and API-first environment Integrated No need to ship new code to run an experiment High performance Render times under < 200ms
  45. Hero Featured CTA Page Title: “Homepage” Slug: “home” Component: []

    Enabling experimentation using the App CTA (control) CTA (variation) Variation container
  46. import contentfulSdk from 'contentful'; const optimizelyClient = new Optimizely({ dataFile

    }); const user = getUser(); const variationEntry = await contentfulSdk.getEntry(entryId); const variation = optimizelyClient.activate( variationEntry.experimentKey, user.userId ); const variationEntryId = variationEntry.meta[variation]; const variationContent = await contentfulSdk.getEntry(variationEntryId); Experimentation layer Contentful SDK Optimizely SDK Experimentation layer Contentful SDK Optimizely SDK
  47. Contentful Content variations Map content to experiments Optimizely Experiments Audiences

    / targeting Analytics Customer’s Code API stitching Tracking Separation of concerns Who does what?
  48. Results RESULTS: 9.2% Increase in prospect cart start rate 18.5%

    Decrease in bounce rate New phone research experience for customers & prospects
  49. So, what’s in it for content authors? Reusable content change

    content in one place and it changes everywhere Customizable workflow build the approval process you need Independence add or change content instantly without the assistance of technical teams Version control see earlier versions of content and roll back instantly Flexible localization easily manage country-specific or audience-specific text and images
  50. Public Apps Turn-key apps featured on our marketplace, accessible via

    contentful.com & in the web app • Launch apps • Illustrate common use cases • Source code available on Github Private Apps Roll out your own custom integrations to connect off-the-shelf or proprietary software • Orgs & agencies can create app catalog • Customize integrations to your needs & use cases Production-ready framework Customize and integrate with a seamless UX in less time with our design system, SDKs & developer tools • Consistent UX • Faster development • Open source Forma 36 What is the App framework?
  51. It’s a superset of UI extensions that bundles UI extensions

    and webhooks into a package It empowers users to integrate third-party services, build extraordinary workflows and customize the functionality of the Contentful web app Every app has access to the SDK, which makes it possible to read and write most of the data in a Contentful space. What is an App?
  52. Experimentation Apps that allow editors to access, select or edit

    media Examples: Cloudinary, Bynder, Dropbox, Image Focal Point, Frontify Apps that allow marketers to run A/B experiments and obtain better insights Example: Optimizely Digital Asset Management Translation Apps that enable you to automate, manage, and professionally translate content Example: Smartling, Transperfect, Lingotek Apps use cases
  53. Assemble DXPs with content at the core Content Platform Commerce

    Marketing Translation Collaboration Analytics Optimization & Personalization Developer & Editor Productivity Digital Asset Management Deployment & Delivery Artificial Intelligence Public apps
  54. Our global solutions partners help customers build compelling digital experiences

    Leverage the App Framework: • Technology solution consulting on assembling DXS • Strategic vision on integrated stack • Change management from traditional way of working to headless, micros-services • Setup, implementation and frontend services
  55. “Global brands such as Bang & Olufsen need to maintain

    a luxury digital experience across numerous channels, which is only possible with a content platform that’s extensible and modular. We recommend Contentful to our clients because it easily integrates with commerce solutions, digital displays or any future customer touchpoint.”
  56. Spotify editors can search for artists or songs and embed

    them into new content instantly (no fussing with multiple browser tabs, copy and paste, or human errors). Custom UI for Spotify Artists content creators
  57. What is a webhook? HTTP POST request whenever something happens

    to your content 18 Pre-built webhooks Customizable JSON payloads Triggers can be filtered by action, content type, environment
  58. Independent editorial and development workflows Content Creator Content Delivery API

    CLI Web App Content Management API SDK SDK SDK Apps & Websites Conversational & Wearables Apps & AR/VR Powerful CLI and tooling to integrate into existing developer workflows or to help define brand new workflows The APIs, webhooks and SDK’s developers need to power content in any digital product. Content Preview API Customizable web app for marketers and publishers to collaborate and create content. Developer Images API
  59. CLI tools support DevOps automation Contentful's command line interface tools

    let you use Contentful features straight from your CLI, providing the basis for DevOps automation. • login- Start new CLI session • logout - End CLI session • boilerplate - Kickstart an example project with one of our 9 SDK's • guide - Getting started with Contentful • config - Config related commands • space - Space related commands • organization - Organization related commands • content-type - Content Type related commands • extension - UI Extension related commands
  60. Contentful domain model Organizations Top most parent object, connects users

    to a company. Users A User can have access to all or limited access to certain spaces based on roles & permissions. Spaces A child entity of an organization. A container for content, assets and UI extensions. Environments Are entities belonging to a space, they contain an isolated copy of content and assets.
  61. Tips for getting the most out of spaces Use spaces

    to separate content that has different teams or different use cases unless they need to share content For large scale implementations, consider putting global shared content, team shared content and project-specific content in separate spaces Roles are specific to a space—use separate spaces if the same users need different permissions
  62. One space to rule them all Space 1 Used for

    microservice 1 all projects at org Project Spaces Content consists of Assemblies, Topics, and Media Best pattern for use cases where all of the following are true: ✔ Content types and/or content entries are reusable across projects. ✔ Projects all have the same localization needs. ✔ Roles & Permissions provide sufficient access controls across all projects. ✔ Content is intended to be used for multi-channel delivery. ✔ Multiple teams or business units want to collaborate together across projects.
  63. Separate space per project Space 1 Used for microservice 1

    specific content Space 2 Used for microservice 2 specific content Space N Used for microservice N specific content ... Project Spaces Content consists of Assemblies, Topics, and Media Best pattern for use cases where one or more of the following is true: ✔ Content types are not reusable across projects. ✔ Projects have different localization needs. ✔ Roles & permissions cannot be effectively used to create granular access controls. ✔ Business units have a regulatory or legal requirement to keep their project and content separate.
  64. Multi-tier space pattern Space 1 Used for microservice 1 specific

    content Space 2 Used for microservice 2 specific content Space N Used for microservice N specific content ... Shared Space Used for highly reusable content across org Global Shared Spaces Project Spaces Shared Space 1 Used for reusable content for line of business 1 BU/Team Shared Spaces Shared Space K Used for reusable content for line of business K ... Content consists of Assemblies, Topics, and Media Requires UI Extension for cross space referencing
  65. Determining best space pattern Will governance rules (i.e. user roles

    and access permissions) be the same or different among the teams and projects? Will content types be the same and/or shared across projects? Will projects have the same localization requirements? Same or different set of locales? Is there a legal or regulatory requirement for projects and their content to be isolated?
  66. Use microservice spaces strategy instead of monolithic ones Microservice Spaces

    could be defined based on: ◦ Business Units ◦ Business Functions ◦ Projects ◦ Content/Dev Teams Goals: ◦ Reduce dependencies and time-to-market ◦ Improve release/publish lifecycle Space planning strategy
  67. Environment Aliases Environment aliases Convert master environment into an environment

    alias A promotion or rollback is achieved by retargeting the alias to another environment – which happens instantly Production content is served from unscoped/master API routes through the master alias Currently only master can be an environment alias
  68. Enabling risk free releases and instant rollbacks master is no

    longer a stand-alone environment but acts as an alias targeting another environment Production content is served from release-1 environment Execute migration scripts Production content is now served from release-2 environment Release 2 release-1 release-2 Environment aliases Change master alias to target release-2 environment master Release 3 release-3 Optional: Delete release-1 environment Production content is now served from release-3 environment Change master alias to target release-3 environment
  69. Minimize downtime and allow instant rollback master is no longer

    a stand-alone environment but acts as an alias targeting another environment Production content is served from release-1 environment Execute migration scripts Change master alias to target release-2 environment Production content is now served from release-2 environment Promote Problem discovered! Rollback is required Rollback Rollback master to target release-1 environment release-1 release-2 Use case: promote an environment to master master
  70. master is no longer a stand-alone environment but acts as

    an alias targeting another environment Content is served from prod environment Run migration scripts Restore by changing master alias to target prod-backup environment Backup Problem discovered! Rollback is required Restore prod prod-backup master Optional: Delete prod environment prod Optional: Recreate prod from prod-backup Change master alias to target prod environment Better safe than sorry Use case: Backup and restore
  71. Using migration scripts 5 steps to use migration scripts to

    accomplish managing content with code 1 Create the environments you need for CI/CD 2 Experiment with a content model in the web app where you can see JSON output 3 Create a script to programmatically build the full content model 4 Create migration scripts to evolve your content model and content 5 After testing, propagate your changes into the production environment by switching the master environment alias
  72. Explore what content types, fields, validations etc. look like as

    JSON. Use the JSON preview model to help write your initial script to programmatically build your content model. Browse content types in the web app 2
  73. Create a script to build the content model Invoke with

    Contentful CLI against your development environment: contentful space migration --space-id zvrkepvkvv5z --environment-id 'r3-fall-promo' 01-add-author-content-type.js 3
  74. Create a migration script to update model Programmatically update an

    existing content model. Execute the new script on your development environment: contentful space migration --space-id zvrkepvkvv5z --environment-id 'r3-fall-promo' 02-author-link.js Note when you execute a content migration, both the content type and all content entries (records) based on that content type are updated! 4
  75. Propagate your changes to production After you have thoroughly tested

    and verified your changes in your development environment, you can now “push” your changes to production by switching your master environment to point to your development environment. Should you discover a problem you can always roll back master to your previous environment (r2 in this example). 5
  76. Migrations: “expand” phase Content entries such that the changes do

    not prevent the currently released version of the software from running New fields and content types By leaving the existing content in place, while augmenting the content types and content such the new version of the software can also run. The content model can now support both the current version and the new version of your software in parallel. Add Transform
  77. Once all users are successfully using your new version, the

    “contract” phase of the migration is to run to remove unneeded content types, fields and content. Remove Migrations: “contract” phase
  78. So what’s next? Keep learning Contentful Learning Center (a growing

    catalog of online courses) Developer Certification Program Documentation Developer Portal Join our Meetups & Webinars (Gatsby,..) Keep track of new things Changelog What’s New
  79. The leading content infrastructure for digital teams Customers Partners Investors

    ($78M) >240 employees in Berlin and San Francisco Team +1,000 other customers Technology Partners