Migrating Legacy.com Migrating a top 50 most visited site in the - - PowerPoint PPT Presentation

migrating legacy com
SMART_READER_LITE
LIVE PREVIEW

Migrating Legacy.com Migrating a top 50 most visited site in the - - PowerPoint PPT Presentation

Migrating Legacy.com Migrating a top 50 most visited site in the U.S. onto Drupal - Legacy.com Case Study Migrating Legacy.com Jordan Ryan Product Owner Ankur Gupta Lead Developer Bassam Ismail Front-end Lakshmi Narasimhan RESTful


slide-1
SLIDE 1
slide-2
SLIDE 2

Migrating Legacy.com

Migrating a top 50 most visited site in the U.S. onto Drupal - Legacy.com

Case Study

slide-3
SLIDE 3

Migrating Legacy.com

Jordan Ryan

Product Owner

Ankur Gupta

Lead Developer

Bassam Ismail

Front-end

Lakshmi Narasimhan

RESTful Services

Hussain Abbas

Migration

slide-4
SLIDE 4

Who is Legacy?

slide-5
SLIDE 5

Why Drupal

slide-6
SLIDE 6

Why Decoupled

Legacy looks to innovate on the Front-End

slide-7
SLIDE 7

Why Decoupled

Content was a small part of a much larger ecosystem

slide-8
SLIDE 8

Why Decoupled

Using React/Node lent itself to componentized widgets that needed services

slide-9
SLIDE 9

Why Decoupled

Legacy wanted to own the data and platform

slide-10
SLIDE 10

What we did

  • Discovery
  • Architecture
  • Site building and development
  • Migration
  • API development
  • Performance optimization
  • FE/BE Staff Augmentation

DELIVERY TIMELINE < 6 months

slide-11
SLIDE 11

Key Challenges

Managing teams with different velocities

slide-12
SLIDE 12

Key Challenges

Managing presentation in a decoupled system

slide-13
SLIDE 13

Key Challenges

Managing SEO Value in Decoupled system - how to deliver SEO value to a headless application

slide-14
SLIDE 14

Key Challenges

Versioning API’s

slide-15
SLIDE 15

Key Challenges

Varying page elements depending on affiliates

slide-16
SLIDE 16

Key Challenges

Cache Invalidation

slide-17
SLIDE 17

Key Challenges

React doesn’t like HTML. Componentized HTML for react elements.

slide-18
SLIDE 18

Discovery

  • Value Driven Development
  • API designs first
  • Drupal as a platform solution
  • Extracting 15 years of complex

business logic

  • Infrastructure

○ Akamai ○ AWS ○ Latisys, .NET

Our Methods

slide-19
SLIDE 19

Development

METHODOLOGY: SCRUM

Our Methods

slide-20
SLIDE 20

Development

Overcommunicate

Our Methods

slide-21
SLIDE 21

Development

Few Drupal best practices

  • Consistent environments
  • Established git workflow

○ Release notes

  • Drush build script
  • Feature driven development
  • Checklists
  • Environment module

80+ CONTRIBS 40+ CUSTOM

Our Methods

slide-22
SLIDE 22

Development

slide-23
SLIDE 23

RESTful

Why choose RESTful?

  • Developer friendly.
  • Allows customizing every aspect of

API, like auth, headers, versioning, caching.

slide-24
SLIDE 24

RESTful

Specifications and testing

  • An API is only as good as its

documentation.

  • RAML - standard format to share

and maintain API specs.

  • It is possible to write Drupal Web

test cases over RAML!

slide-25
SLIDE 25

RAML

slide-26
SLIDE 26

RESTful

Authentication

  • RESTful allows any kind of

authentication scheme

  • We wrote our own for performance

reasons.

slide-27
SLIDE 27

RESTful

Versioning

  • serves same purpose as interfaces,

i.e. honor a contract.

  • RESTful allows versioning on a per

resource basis

  • Each payload change bumps up

minor version number.

slide-28
SLIDE 28

RESTful

Challenges

  • Problem statement: given a URL

alias, fetch the corresponding resource

  • Hard bits: handle redirects, 404s,

get metatags

slide-29
SLIDE 29

RESTful

Caching

  • RESTful ships with batteries

included caching

  • The need to intelligently purge

cache

  • RESTful cache purge, https://www.

drupal.org/project/restful_purge

slide-30
SLIDE 30

RESTful Panels

Our Methods

  • Presentation Framework
  • Use Panels to administer content

and layout on a decoupled Drupal website.

  • Supports Panelizer.
slide-31
SLIDE 31

RESTful Panels

slide-32
SLIDE 32

restful_panels

RESTful Panels

RestfulPanelsDataProviderDisplay RestfulPanelsPanelizer RestfulPanelsDisplay

(ready to use endpoint)

ctools StructuredRenderer Standard Panels Renderer

restful_panels

slide-33
SLIDE 33

restful_panels

RESTful Panels

LegacyPaneLandingPage Processes input data and passes node id to RestfulPanelsPanelizer. RestfulPanelsPanelizer ctools

legacy_pane

restful_panels legacy_pane (ctools content type) Renders JSON if in context of RESTful Panels.

slide-34
SLIDE 34

RESTful Panels

Our Methods

  • Contributed and available for use:

https://www.drupal.org/project/restful_panels

  • Future plans

○ Usage with context ○ Metatags ○ Panels Variants

slide-35
SLIDE 35

Migration

Our Methods

  • Migration from MSSQL Server
  • Transforming content structure
  • Map everything based on complex

business logic

  • Migration groups
  • Some numbers:

○ ~2500 articles ○ ~5,000 media items ○ ~200 galleries ○ ~4,000 gallery items ○ ~1,100 affiliates

slide-36
SLIDE 36

Front-end

slide-37
SLIDE 37

Front-end

Why

  • Performance
  • Developer Productivity
slide-38
SLIDE 38

Front-end

Why: Performance

  • Performance*

○ Page load time ○ Native (like) experience on the web

slide-39
SLIDE 39

Front-end

Why: Developer Productivity

  • Composition

○ Easy to compose ○ Event delegation and inline styles ○ No global scope in pre CSS-Modules era using Stylus

  • Testing

○ ui = f(state, […actions]) ○ Easy to simulate events ○ Testing against virtual and real DOM

slide-40
SLIDE 40

Front-end

Solutions

  • Server-side rendering

○ SEO for SPA ○ Improved Initial page load time ○ Easy to Cache

slide-41
SLIDE 41

Front-end

Solutions

  • Drupal

○ Data source ○ Layout configuration source

slide-42
SLIDE 42

Front-end

Solutions

  • React

○ Parsing raw HTML on Drupal Layer ○ Schema.org compliance ○ Help avoid content injection

slide-43
SLIDE 43

Final Thoughts

  • CI/CD best practices
  • Personalized Decoupled Drupal

requires specialized infrastructure / middleware

  • Architecture across 2 systems
  • Considerations with points of

failure

  • Progressively develop Decoupled

solutions

slide-44
SLIDE 44

QUESTIONS?

slide-45
SLIDE 45

asia2016.drupal.

  • rg/schedule

https://events.drupal.org/node/7536