SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
CIRCUIT – An Adobe Developer Event
Presented by ICF Interactive
How to migrate
any CMS
through the front door
Agenda
•  About @rockwell105
–  Recent Experiences in Content Migration
•  A process for any CMS
•  Frontend Tools
•  Example Code
–  Cucumber / Step-Definition using Capybara
–  LSA Department Profile Pages
•  Demonstration
•  Summary / Questions
–  Resources & References
About Me
Chris Rockwell
–  University of Michigan, LSA
•  College of Literature, Science and the Arts, Web Services
–  Technical Lead on AEM project
–  Neither software consultant nor database expert
•  API User; Java, Ruby and Frontend
–  Recent Experience
•  Database Migration from OpenText
•  R2Integrated did a great job in migrating our SQL database
to AEM
–  Java classes calling SQL Stored Procedures and creating the
content in the JCR
–  We also used frontend techniques, which I want to talk about
today
Querying the Database
Why	
  database	
  migra/ons	
  can	
  be	
  difficult	
  
	
  
-­‐  Requires	
  skills	
  in	
  both	
  systems	
  
-­‐  Source	
  CMS	
  and	
  target	
  AEM	
  
-­‐  Source	
  DB	
  table	
  names	
  are	
  like	
  …	
  
-­‐  vgnAsAtmyContentChannel?	
  
-­‐  vgnAsAtmyContentObjRef?	
  
-­‐  Rela/onships	
  between	
  the	
  tables	
  were	
  unclear	
  
-­‐  In	
  our	
  case,	
  no	
  foreign	
  keys	
  
-­‐  Legacy	
  system	
  customiza/ons	
  may	
  not	
  be	
  well	
  
understood	
  or	
  documented	
  
What	
  about	
  the	
  Legacy	
  system	
  API?	
  
	
  
Or	
  Screen	
  Scraping?	
  
	
  
	
  
	
  
Migrate ANY CMS
HTML	
  
CSS	
  
JS	
  
	
  
WordPress	
  
AEM	
  
OpenText	
  
Joomla	
  
Drupal	
  
MediaWiki	
  
Magnolia	
  
AssumpOon:	
  Every	
  Web	
  CMS	
  that	
  places	
  
content	
  in	
  HTML	
  templates,	
  which	
  provide	
  a	
  
consistent	
  HTML	
  Document	
  structure.	
  
	
  
Template	
  Mapping	
  
Old	
  system	
  to	
  New	
  system	
  
	
  
Group	
  URL’s	
  by	
  template	
  group	
  
	
  
For	
  each	
  group	
  idenOfy	
  extra	
  informa/on	
  
needed	
  to	
  migrate	
  properly	
  
	
  
Data / Screen Scaping
hGps://en.wikipedia.org/wiki/Data_scraping	
  
	
  
“Data	
  scraping	
  is	
  generally	
  considered	
  an	
  ad	
  hoc,	
  inelegant	
  technique,	
  
o2en	
  used	
  only	
  as	
  a	
  "last	
  resort"	
  when	
  no	
  other	
  mechanism	
  for	
  data	
  
interchange	
  is	
  available.	
  Aside	
  from	
  the	
  higher	
  programming	
  and	
  
processing	
  overhead,	
  output	
  displays	
  intended	
  for	
  human	
  consump>on	
  
o2en	
  change	
  structure	
  frequently.”	
  
For	
  us,	
  some	
  content	
  was	
  much	
  easier	
  (and	
  more	
  fun)	
  to	
  automate	
  a	
  browser	
  and	
  get	
  
the	
  content	
  from	
  the	
  frontend.	
  	
  	
  
	
  
Why	
  it	
  this	
  easier?	
  
-­‐  Content	
  is	
  consolidated	
  on	
  the	
  page	
  
-­‐  No	
  reverse	
  engineering	
  of	
  messy	
  legacy	
  systems	
  
-­‐  Knowledge	
  of	
  the	
  DOM	
  can	
  be	
  used	
  to	
  get	
  content	
  using	
  CSS	
  selectors	
  
-­‐  Consistent	
  HTML	
  template	
  structure	
  provided	
  by	
  the	
  legacy	
  system	
  
-­‐  UAT	
  fails	
  if	
  the	
  migraOng	
  URL	
  does	
  not	
  meet	
  assumpOons	
  
	
  
Data / Screen Scaping
Other	
  reasons	
  to	
  do	
  this	
  
-­‐  Going	
  aYer	
  business	
  with	
  no	
  access	
  to	
  the	
  database	
  (POC)	
  
-­‐  Can	
  be	
  done	
  quickly	
  without	
  knowledge	
  about	
  the	
  legacy	
  system	
  
-­‐  Can	
  be	
  done	
  in	
  phases	
  (migrates	
  based	
  URL’s	
  listed)	
  
-­‐  Works	
  against	
  live	
  websites	
  (not	
  stale	
  database	
  snapshots)	
  	
  
	
  
Frontend Tools
	
  
Makes	
  it	
  easy	
  to	
  
-­‐  Provide	
  tables	
  of	
  input	
  for	
  
migraOon	
  	
  
-­‐  Script	
  Selenium	
  
-­‐  Visit	
  every	
  page	
  
-­‐  Get	
  the	
  content	
  
-­‐  Format	
  the	
  content	
  
-­‐  Post	
  using	
  curl	
  (curb)	
  
	
  
Takes	
  Ome	
  usually	
  5s	
  per	
  page,	
  or	
  
more	
  
	
  
	
  
User	
  Acceptance	
  Tools	
  (UAT):	
  Cucumber,	
  
Capybara,	
  Selenium	
  Webdriver	
  
	
  
source :rubygems!
!
gem 'cucumber', '~> 2.0.0'!
gem 'capybara', '~> 2.4.4'!
gem 'rspec', '~> 2.8.0'!
gem 'selenium-webdriver', '2.45.0’!
gem 'curb', '~> 0.8.8'!
gem 'capybara-webkit' , '~>1.5.1'!
!
Example Code - Cucumber
Feature: Given a list of URL's go to each and create or update the AEM profile!
!
Scenario Outline: Visit live profile, get profile data, update the AEM page !
!Given the profile page, visit the <URL> !
!Then profiles should migrate into these dept categories:!
!| uniqname | dept | categories | !!
!| smaarons@umich.edu | earth | graduate-students | !
!| alabbey@umich.edu | earth | graduate-students | !
!| carliana@umich.edu | earth | graduate-students | !
!| mjbegin@umich.edu | earth | graduate-students |!
!Examples:!
!| URL | !
!| http://www.lsa.umich.edu/earth/people/ci.aaronssarah_ci.detail |!
!| http://www.lsa.umich.edu/earth/people/ci.abbeyalyssa_ci.detail |!
!| http://www.lsa.umich.edu/earth/people/ci.aciegosarah_ci.detail |!
!| http://www.lsa.umich.edu/earth/people/ci.altjeffrey_ci.detail |!
!| http://www.lsa.umich.edu/earth/people/ci.ansongjoseph_ci.detail |!
!| http://www.lsa.umich.edu/earth/people/ci.apsitisbrenda_ci.detail | !
•  Use	
  Scenario	
  Outlines,	
  and	
  list	
  each	
  URL	
  to	
  migrate	
  under	
  Examples:	
  
•  All	
  Steps	
  will	
  run	
  for	
  each	
  page	
  (URL	
  example)	
  
•  The	
  steps	
  are	
  defined	
  under	
  the	
  step_defini/ons	
  folder	
  
•  These	
  are	
  UAT	
  tools,	
  so	
  we	
  can	
  take	
  advantage	
  include	
  steps	
  to	
  test	
  the	
  success	
  of	
  
the	
  page	
  migraOon	
  
	
  
Create	
  one	
  (or	
  more)	
  *.feature	
  file	
  for	
  each	
  Template	
  Group	
  (or	
  URL	
  group)	
  
Example Code - Step Definition
Given /^the profile page (.*)$/ do | url |!
visit url !
end!
!
Given /^profiles should migrate into these dept categories:$/ do |table|!
@peopleDeptCat = table.raw!
@peopleHash = Hash[@peopleDeptCat.map {|key, value, v2| [key, [value, v2]]}]!
!
@phone = find("#phone", :visible => false).value!
@imageURI = find(".peopleImg")[:src]!
@education = find("#education").all('li').collect(&:text) !
!
curlAuthenticate(@profilePath)!
buildJsonContent!
postContent(@peoplePath, @categoryHash) # create category page!
postContent(@categoryPath, @profileHash) # create profile!
….!
@c.close!
end!
!
The	
  Capybara	
  gem	
  provides	
  convenient	
  ways	
  to…	
  
•  Drive	
  Selenium,	
  visit	
  url	
  
•  Get	
  content	
  from	
  the	
  page,	
  find(".peopleImg")[:src]	
  
	
  
A	
  Data	
  Table	
  is	
  passed	
  in	
  from	
  Cucumber	
  lisOng	
  email,	
  department	
  and	
  category.	
  This	
  extra	
  
informaOon	
  is	
  used	
  to	
  create	
  the	
  new	
  paths	
  for	
  the	
  migrated	
  pages.	
  
Example Code- Sling Post Servlet
def buildJsonContent!
@profileHash = {!
"jcr:primaryType"=> "cq:Page",!
@uniqueName =>{!
"jcr:primaryType"=> "cq:Page", !
"jcr:content"=> {!
"jcr:primaryType"=> "cq:PageContent",!
! "officeLocation"=> "#{@officeLocation}",!
"jcr:title"=> "#{@firstName} #{@lastName}",!
"website1"=> "#{@url}",!
"website2"=> "#{@url2}",!
"lastName"=> "#{@lastName}",!
"cq:template"=> "/apps/sweet-aem-project/templates/department_person_profile",!
"officeHours"=> "#{@officeHours}",!
"fileName"=> "#{@cvFileName.match(/w*.w{3,4}$/) if !@cvFileName.nil?}", #!
"education"=> @education || "",!
"about"=> "#{@about}",!
"phone"=> "#{@phone.gsub(/<br>/,', ') if !@phone.nil?}",!
"title"=> "#{@title.gsub(/<br>/,'; ') if !@title.nil?}", !
"firstName"=> "#{@firstName}",!
"uniqueName"=> "#{@uniqueName}",!
"hideInNav"=> "true",!
"sling:resourceType"=> "sweet-aem-project/components/pages/department_person_profile",!
"cq:designPath"=> "/etc/designs/sweet-aem-project",!
"profileImage"=> {!
"jcr:primaryType"=> "nt:unstructured",!
"sling:resourceType"=> "foundation/components/image",!
"imageRotate"=> "0",!
},!
}!
}!
} !
Step	
  Defini/on	
  Overview	
  
Visit	
  the	
  page,	
  	
  
Get	
  the	
  content.	
  
Build	
  nested	
  hash(es),	
  	
  
	
  	
  	
  which	
  convert	
  nicely	
  to	
  JSON	
  
	
  
Use	
  *.infinity.json	
  on	
  example	
  content.	
  Use	
  this	
  
as	
  a	
  starOng	
  point	
  for	
  the	
  nested	
  hash.	
  
	
  
def postContent(jcrPath, contentHash)!
@c.url = jcrPath!
@c.on_success {|easy| puts "ON SUCCESS #{easy.response_code}"}!
@c.on_failure {|easy| fail easy.to_s}!
@c.http_post("#{jcrPath}", !
Curl::PostField.content(':operation', 'import'),!
Curl::PostField.content(':contentType', 'json'),!
Curl::PostField.content(':replaceProperties', 'true'),!
Curl::PostField.content(':content', contentHash.to_json))!
puts "FINISHED: HTTP #{@c.response_code}"!
end !
Step	
  Defini/on	
  Overview	
  (cont.)	
  
Post	
  JSON	
  to	
  the	
  desired	
  path	
  
	
  	
  	
  using	
  :opera/on	
  import	
  
	
  
	
  
The	
  JSON	
  contains	
  a	
  structure	
  needed	
  
for	
  the	
  page	
  in	
  AEM	
  containing	
  
properOes	
  needed;	
  
	
  jcr:primaryType,	
  	
  
cq:template,	
  	
  
sling:resourceType	
  
	
  
	
  
	
  
	
  
content	
  hash	
  example	
  
Legacy	
  System	
   AEM	
  System	
  
OperaOon	
  Import	
  
SlingPostServlet	
  
Wrap-up	
  Demo	
   Questions	
  
•  Several options for Content Migration
– Scraping webpages is one option to consider
– :operation import is great
•  Ways to speed up frontend migration
– Scale migration across machines using
Selenium Grid to launch parallel operations
– Use a headless browser
Questions	
  Wrap-up	
  Demo	
  
Resources	
  /	
  References	
  
	
  
Sling	
  docs	
  
haps://sling.apache.org/documentaOon/bundles/manipulaOng-­‐content-­‐the-­‐slingpostservlet-­‐
servlets-­‐post.html#imporOng-­‐content-­‐structures	
  
	
  
U-­‐M	
  Demo	
  Project	
  
haps://bitbucket.org/cmrockwell/cukescrape	
  
	
  
Ruby	
  Gems	
  
hap://bundler.io/	
  
haps://github.com/jnicklas/capybara	
  
haps://github.com/cucumber/cucumber	
  
haps://github.com/taf2/curb	
  
	
  
Selenium	
  Webdriver	
  
hap://www.seleniumhq.org/projects/webdriver/	
  
hap://www.seleniumhq.org/docs/07_selenium_grid.jsp	
  
	
  
	
  
Wrap-up	
   Questions	
  Demo	
  

Contenu connexe

Tendances

Slug: A Semantic Web Crawler
Slug: A Semantic Web CrawlerSlug: A Semantic Web Crawler
Slug: A Semantic Web CrawlerLeigh Dodds
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Lucidworks
 
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
2018 09-03 aOS Aachen - SharePoint demystified - Thomas VochtenaOS Community
 
Web crawler with seo analysis
Web crawler with seo analysis Web crawler with seo analysis
Web crawler with seo analysis Vikram Parmar
 
Creating Truly RESTful APIs
Creating Truly RESTful APIsCreating Truly RESTful APIs
Creating Truly RESTful APIsDomenic Denicola
 
Take Cloud Hybrid Search to the Next Level
Take Cloud Hybrid Search to the Next LevelTake Cloud Hybrid Search to the Next Level
Take Cloud Hybrid Search to the Next LevelJeff Fried
 
12 SQL On-Hadoop Tools
12 SQL On-Hadoop Tools12 SQL On-Hadoop Tools
12 SQL On-Hadoop ToolsXplenty
 
Understanding and Applying Cloud Hybrid Search
Understanding and Applying Cloud Hybrid SearchUnderstanding and Applying Cloud Hybrid Search
Understanding and Applying Cloud Hybrid SearchJeff Fried
 
Share point 2013 enterprise search (public)
Share point 2013 enterprise search (public)Share point 2013 enterprise search (public)
Share point 2013 enterprise search (public)Petter Skodvin-Hvammen
 
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016Sonja Madsen
 
Understanding and Applying Cloud Hybrid Search
Understanding and Applying Cloud Hybrid SearchUnderstanding and Applying Cloud Hybrid Search
Understanding and Applying Cloud Hybrid SearchJeff Fried
 
05 integrate redis
05 integrate redis05 integrate redis
05 integrate redisErhwen Kuo
 
Smart crawler a two stage crawler
Smart crawler a two stage crawlerSmart crawler a two stage crawler
Smart crawler a two stage crawlerRishikesh Pathak
 
SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803Andreas Grabner
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to SolrErik Hatcher
 
Test driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBTest driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBAndrew Siemer
 
How to build your own Delve: combining machine learning, big data and SharePoint
How to build your own Delve: combining machine learning, big data and SharePointHow to build your own Delve: combining machine learning, big data and SharePoint
How to build your own Delve: combining machine learning, big data and SharePointJoris Poelmans
 

Tendances (20)

Slug: A Semantic Web Crawler
Slug: A Semantic Web CrawlerSlug: A Semantic Web Crawler
Slug: A Semantic Web Crawler
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
 
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
 
Web crawler with seo analysis
Web crawler with seo analysis Web crawler with seo analysis
Web crawler with seo analysis
 
Creating Truly RESTful APIs
Creating Truly RESTful APIsCreating Truly RESTful APIs
Creating Truly RESTful APIs
 
Take Cloud Hybrid Search to the Next Level
Take Cloud Hybrid Search to the Next LevelTake Cloud Hybrid Search to the Next Level
Take Cloud Hybrid Search to the Next Level
 
12 SQL On-Hadoop Tools
12 SQL On-Hadoop Tools12 SQL On-Hadoop Tools
12 SQL On-Hadoop Tools
 
Understanding and Applying Cloud Hybrid Search
Understanding and Applying Cloud Hybrid SearchUnderstanding and Applying Cloud Hybrid Search
Understanding and Applying Cloud Hybrid Search
 
Share point 2013 enterprise search (public)
Share point 2013 enterprise search (public)Share point 2013 enterprise search (public)
Share point 2013 enterprise search (public)
 
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
 
Understanding and Applying Cloud Hybrid Search
Understanding and Applying Cloud Hybrid SearchUnderstanding and Applying Cloud Hybrid Search
Understanding and Applying Cloud Hybrid Search
 
05 integrate redis
05 integrate redis05 integrate redis
05 integrate redis
 
Apache Solr
Apache SolrApache Solr
Apache Solr
 
Sql over hadoop ver 3
Sql over hadoop ver 3Sql over hadoop ver 3
Sql over hadoop ver 3
 
Web crawler
Web crawlerWeb crawler
Web crawler
 
Smart crawler a two stage crawler
Smart crawler a two stage crawlerSmart crawler a two stage crawler
Smart crawler a two stage crawler
 
SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
Test driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBTest driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDB
 
How to build your own Delve: combining machine learning, big data and SharePoint
How to build your own Delve: combining machine learning, big data and SharePointHow to build your own Delve: combining machine learning, big data and SharePoint
How to build your own Delve: combining machine learning, big data and SharePoint
 

Similaire à How to migrate from any CMS (thru the front-door)

A Work Day Of A Web Developer
A Work Day Of A Web DeveloperA Work Day Of A Web Developer
A Work Day Of A Web DeveloperEdureka!
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
Architectures For Scaling Ajax
Architectures For Scaling AjaxArchitectures For Scaling Ajax
Architectures For Scaling Ajaxwolframkriesing
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfAlfresco Software
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web AppsTimothy Fisher
 
Single page applications - TernopilJS #2
Single page applications - TernopilJS #2Single page applications - TernopilJS #2
Single page applications - TernopilJS #2Andriy Deren'
 
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...Amazon Web Services
 
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Codemotion
 
OrientDB the database for the web 1.1
OrientDB the database for the web 1.1OrientDB the database for the web 1.1
OrientDB the database for the web 1.1Luca Garulli
 
Semantic technologies in practice - KULeuven 2016
Semantic technologies in practice - KULeuven 2016Semantic technologies in practice - KULeuven 2016
Semantic technologies in practice - KULeuven 2016Aad Versteden
 
What is front-end development ?
What is front-end development ?What is front-end development ?
What is front-end development ?Mahmoud Shaker
 
IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?IWMW
 

Similaire à How to migrate from any CMS (thru the front-door) (20)

A Work Day Of A Web Developer
A Work Day Of A Web DeveloperA Work Day Of A Web Developer
A Work Day Of A Web Developer
 
Nuxeo JavaOne 2007
Nuxeo JavaOne 2007Nuxeo JavaOne 2007
Nuxeo JavaOne 2007
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
Architectures For Scaling Ajax
Architectures For Scaling AjaxArchitectures For Scaling Ajax
Architectures For Scaling Ajax
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web Apps
 
Ajax workshop
Ajax workshopAjax workshop
Ajax workshop
 
Single page applications - TernopilJS #2
Single page applications - TernopilJS #2Single page applications - TernopilJS #2
Single page applications - TernopilJS #2
 
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
 
OrientDB the database for the web 1.1
OrientDB the database for the web 1.1OrientDB the database for the web 1.1
OrientDB the database for the web 1.1
 
Semantic technologies in practice - KULeuven 2016
Semantic technologies in practice - KULeuven 2016Semantic technologies in practice - KULeuven 2016
Semantic technologies in practice - KULeuven 2016
 
Markup As An Api
Markup As An ApiMarkup As An Api
Markup As An Api
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
025444215.pptx
025444215.pptx025444215.pptx
025444215.pptx
 
JavaScripts & jQuery
JavaScripts & jQueryJavaScripts & jQuery
JavaScripts & jQuery
 
What is front-end development ?
What is front-end development ?What is front-end development ?
What is front-end development ?
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?
 

Plus de ICF CIRCUIT

CIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM AppsCIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM AppsICF CIRCUIT
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksICF CIRCUIT
 
CIRCUIT 2015 - Monitoring AEM
CIRCUIT 2015 - Monitoring AEMCIRCUIT 2015 - Monitoring AEM
CIRCUIT 2015 - Monitoring AEMICF CIRCUIT
 
CIRCUIT 2015 - Akamai: Caching and Beyond
CIRCUIT 2015 - Akamai:  Caching and BeyondCIRCUIT 2015 - Akamai:  Caching and Beyond
CIRCUIT 2015 - Akamai: Caching and BeyondICF CIRCUIT
 
CIRCUIT 2015 - Free Beer and Testing
CIRCUIT 2015 - Free Beer and TestingCIRCUIT 2015 - Free Beer and Testing
CIRCUIT 2015 - Free Beer and TestingICF CIRCUIT
 
CIRCUIT 2015 - UI Customization in AEM 6.1
CIRCUIT 2015 - UI Customization in AEM 6.1CIRCUIT 2015 - UI Customization in AEM 6.1
CIRCUIT 2015 - UI Customization in AEM 6.1ICF CIRCUIT
 
CIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM SitesCIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM SitesICF CIRCUIT
 
CIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
CIRCUIT 2015 - Responsive Websites & Grid-Based LayoutsCIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
CIRCUIT 2015 - Responsive Websites & Grid-Based LayoutsICF CIRCUIT
 
CIRCUIT 2015 - Glimpse of perceptual diff
CIRCUIT 2015 - Glimpse of perceptual diffCIRCUIT 2015 - Glimpse of perceptual diff
CIRCUIT 2015 - Glimpse of perceptual diffICF CIRCUIT
 
CIRCUIT 2015 - Orchestrate your story with interactive video and web content
CIRCUIT 2015 -  Orchestrate your story with interactive video and web contentCIRCUIT 2015 -  Orchestrate your story with interactive video and web content
CIRCUIT 2015 - Orchestrate your story with interactive video and web contentICF CIRCUIT
 
Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM ICF CIRCUIT
 
CIRCUIT 2015 - 10 Things Apache Sling Can Do
CIRCUIT 2015 - 10 Things Apache Sling Can DoCIRCUIT 2015 - 10 Things Apache Sling Can Do
CIRCUIT 2015 - 10 Things Apache Sling Can DoICF CIRCUIT
 
Circuit 2015 Keynote - Carsten Ziegeler
Circuit 2015 Keynote -  Carsten ZiegelerCircuit 2015 Keynote -  Carsten Ziegeler
Circuit 2015 Keynote - Carsten ZiegelerICF CIRCUIT
 

Plus de ICF CIRCUIT (13)

CIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM AppsCIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM Apps
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
 
CIRCUIT 2015 - Monitoring AEM
CIRCUIT 2015 - Monitoring AEMCIRCUIT 2015 - Monitoring AEM
CIRCUIT 2015 - Monitoring AEM
 
CIRCUIT 2015 - Akamai: Caching and Beyond
CIRCUIT 2015 - Akamai:  Caching and BeyondCIRCUIT 2015 - Akamai:  Caching and Beyond
CIRCUIT 2015 - Akamai: Caching and Beyond
 
CIRCUIT 2015 - Free Beer and Testing
CIRCUIT 2015 - Free Beer and TestingCIRCUIT 2015 - Free Beer and Testing
CIRCUIT 2015 - Free Beer and Testing
 
CIRCUIT 2015 - UI Customization in AEM 6.1
CIRCUIT 2015 - UI Customization in AEM 6.1CIRCUIT 2015 - UI Customization in AEM 6.1
CIRCUIT 2015 - UI Customization in AEM 6.1
 
CIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM SitesCIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM Sites
 
CIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
CIRCUIT 2015 - Responsive Websites & Grid-Based LayoutsCIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
CIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
 
CIRCUIT 2015 - Glimpse of perceptual diff
CIRCUIT 2015 - Glimpse of perceptual diffCIRCUIT 2015 - Glimpse of perceptual diff
CIRCUIT 2015 - Glimpse of perceptual diff
 
CIRCUIT 2015 - Orchestrate your story with interactive video and web content
CIRCUIT 2015 -  Orchestrate your story with interactive video and web contentCIRCUIT 2015 -  Orchestrate your story with interactive video and web content
CIRCUIT 2015 - Orchestrate your story with interactive video and web content
 
Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM
 
CIRCUIT 2015 - 10 Things Apache Sling Can Do
CIRCUIT 2015 - 10 Things Apache Sling Can DoCIRCUIT 2015 - 10 Things Apache Sling Can Do
CIRCUIT 2015 - 10 Things Apache Sling Can Do
 
Circuit 2015 Keynote - Carsten Ziegeler
Circuit 2015 Keynote -  Carsten ZiegelerCircuit 2015 Keynote -  Carsten Ziegeler
Circuit 2015 Keynote - Carsten Ziegeler
 

Dernier

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Dernier (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

How to migrate from any CMS (thru the front-door)

  • 1. CIRCUIT – An Adobe Developer Event Presented by ICF Interactive How to migrate any CMS through the front door
  • 2. Agenda •  About @rockwell105 –  Recent Experiences in Content Migration •  A process for any CMS •  Frontend Tools •  Example Code –  Cucumber / Step-Definition using Capybara –  LSA Department Profile Pages •  Demonstration •  Summary / Questions –  Resources & References
  • 3. About Me Chris Rockwell –  University of Michigan, LSA •  College of Literature, Science and the Arts, Web Services –  Technical Lead on AEM project –  Neither software consultant nor database expert •  API User; Java, Ruby and Frontend –  Recent Experience •  Database Migration from OpenText •  R2Integrated did a great job in migrating our SQL database to AEM –  Java classes calling SQL Stored Procedures and creating the content in the JCR –  We also used frontend techniques, which I want to talk about today
  • 4. Querying the Database Why  database  migra/ons  can  be  difficult     -­‐  Requires  skills  in  both  systems   -­‐  Source  CMS  and  target  AEM   -­‐  Source  DB  table  names  are  like  …   -­‐  vgnAsAtmyContentChannel?   -­‐  vgnAsAtmyContentObjRef?   -­‐  Rela/onships  between  the  tables  were  unclear   -­‐  In  our  case,  no  foreign  keys   -­‐  Legacy  system  customiza/ons  may  not  be  well   understood  or  documented   What  about  the  Legacy  system  API?     Or  Screen  Scraping?        
  • 5. Migrate ANY CMS HTML   CSS   JS     WordPress   AEM   OpenText   Joomla   Drupal   MediaWiki   Magnolia   AssumpOon:  Every  Web  CMS  that  places   content  in  HTML  templates,  which  provide  a   consistent  HTML  Document  structure.     Template  Mapping   Old  system  to  New  system     Group  URL’s  by  template  group     For  each  group  idenOfy  extra  informa/on   needed  to  migrate  properly    
  • 6. Data / Screen Scaping hGps://en.wikipedia.org/wiki/Data_scraping     “Data  scraping  is  generally  considered  an  ad  hoc,  inelegant  technique,   o2en  used  only  as  a  "last  resort"  when  no  other  mechanism  for  data   interchange  is  available.  Aside  from  the  higher  programming  and   processing  overhead,  output  displays  intended  for  human  consump>on   o2en  change  structure  frequently.”   For  us,  some  content  was  much  easier  (and  more  fun)  to  automate  a  browser  and  get   the  content  from  the  frontend.         Why  it  this  easier?   -­‐  Content  is  consolidated  on  the  page   -­‐  No  reverse  engineering  of  messy  legacy  systems   -­‐  Knowledge  of  the  DOM  can  be  used  to  get  content  using  CSS  selectors   -­‐  Consistent  HTML  template  structure  provided  by  the  legacy  system   -­‐  UAT  fails  if  the  migraOng  URL  does  not  meet  assumpOons    
  • 7. Data / Screen Scaping Other  reasons  to  do  this   -­‐  Going  aYer  business  with  no  access  to  the  database  (POC)   -­‐  Can  be  done  quickly  without  knowledge  about  the  legacy  system   -­‐  Can  be  done  in  phases  (migrates  based  URL’s  listed)   -­‐  Works  against  live  websites  (not  stale  database  snapshots)      
  • 8. Frontend Tools   Makes  it  easy  to   -­‐  Provide  tables  of  input  for   migraOon     -­‐  Script  Selenium   -­‐  Visit  every  page   -­‐  Get  the  content   -­‐  Format  the  content   -­‐  Post  using  curl  (curb)     Takes  Ome  usually  5s  per  page,  or   more       User  Acceptance  Tools  (UAT):  Cucumber,   Capybara,  Selenium  Webdriver     source :rubygems! ! gem 'cucumber', '~> 2.0.0'! gem 'capybara', '~> 2.4.4'! gem 'rspec', '~> 2.8.0'! gem 'selenium-webdriver', '2.45.0’! gem 'curb', '~> 0.8.8'! gem 'capybara-webkit' , '~>1.5.1'! !
  • 9. Example Code - Cucumber Feature: Given a list of URL's go to each and create or update the AEM profile! ! Scenario Outline: Visit live profile, get profile data, update the AEM page ! !Given the profile page, visit the <URL> ! !Then profiles should migrate into these dept categories:! !| uniqname | dept | categories | !! !| smaarons@umich.edu | earth | graduate-students | ! !| alabbey@umich.edu | earth | graduate-students | ! !| carliana@umich.edu | earth | graduate-students | ! !| mjbegin@umich.edu | earth | graduate-students |! !Examples:! !| URL | ! !| http://www.lsa.umich.edu/earth/people/ci.aaronssarah_ci.detail |! !| http://www.lsa.umich.edu/earth/people/ci.abbeyalyssa_ci.detail |! !| http://www.lsa.umich.edu/earth/people/ci.aciegosarah_ci.detail |! !| http://www.lsa.umich.edu/earth/people/ci.altjeffrey_ci.detail |! !| http://www.lsa.umich.edu/earth/people/ci.ansongjoseph_ci.detail |! !| http://www.lsa.umich.edu/earth/people/ci.apsitisbrenda_ci.detail | ! •  Use  Scenario  Outlines,  and  list  each  URL  to  migrate  under  Examples:   •  All  Steps  will  run  for  each  page  (URL  example)   •  The  steps  are  defined  under  the  step_defini/ons  folder   •  These  are  UAT  tools,  so  we  can  take  advantage  include  steps  to  test  the  success  of   the  page  migraOon     Create  one  (or  more)  *.feature  file  for  each  Template  Group  (or  URL  group)  
  • 10. Example Code - Step Definition Given /^the profile page (.*)$/ do | url |! visit url ! end! ! Given /^profiles should migrate into these dept categories:$/ do |table|! @peopleDeptCat = table.raw! @peopleHash = Hash[@peopleDeptCat.map {|key, value, v2| [key, [value, v2]]}]! ! @phone = find("#phone", :visible => false).value! @imageURI = find(".peopleImg")[:src]! @education = find("#education").all('li').collect(&:text) ! ! curlAuthenticate(@profilePath)! buildJsonContent! postContent(@peoplePath, @categoryHash) # create category page! postContent(@categoryPath, @profileHash) # create profile! ….! @c.close! end! ! The  Capybara  gem  provides  convenient  ways  to…   •  Drive  Selenium,  visit  url   •  Get  content  from  the  page,  find(".peopleImg")[:src]     A  Data  Table  is  passed  in  from  Cucumber  lisOng  email,  department  and  category.  This  extra   informaOon  is  used  to  create  the  new  paths  for  the  migrated  pages.  
  • 11. Example Code- Sling Post Servlet def buildJsonContent! @profileHash = {! "jcr:primaryType"=> "cq:Page",! @uniqueName =>{! "jcr:primaryType"=> "cq:Page", ! "jcr:content"=> {! "jcr:primaryType"=> "cq:PageContent",! ! "officeLocation"=> "#{@officeLocation}",! "jcr:title"=> "#{@firstName} #{@lastName}",! "website1"=> "#{@url}",! "website2"=> "#{@url2}",! "lastName"=> "#{@lastName}",! "cq:template"=> "/apps/sweet-aem-project/templates/department_person_profile",! "officeHours"=> "#{@officeHours}",! "fileName"=> "#{@cvFileName.match(/w*.w{3,4}$/) if !@cvFileName.nil?}", #! "education"=> @education || "",! "about"=> "#{@about}",! "phone"=> "#{@phone.gsub(/<br>/,', ') if !@phone.nil?}",! "title"=> "#{@title.gsub(/<br>/,'; ') if !@title.nil?}", ! "firstName"=> "#{@firstName}",! "uniqueName"=> "#{@uniqueName}",! "hideInNav"=> "true",! "sling:resourceType"=> "sweet-aem-project/components/pages/department_person_profile",! "cq:designPath"=> "/etc/designs/sweet-aem-project",! "profileImage"=> {! "jcr:primaryType"=> "nt:unstructured",! "sling:resourceType"=> "foundation/components/image",! "imageRotate"=> "0",! },! }! }! } ! Step  Defini/on  Overview   Visit  the  page,     Get  the  content.   Build  nested  hash(es),          which  convert  nicely  to  JSON     Use  *.infinity.json  on  example  content.  Use  this   as  a  starOng  point  for  the  nested  hash.     def postContent(jcrPath, contentHash)! @c.url = jcrPath! @c.on_success {|easy| puts "ON SUCCESS #{easy.response_code}"}! @c.on_failure {|easy| fail easy.to_s}! @c.http_post("#{jcrPath}", ! Curl::PostField.content(':operation', 'import'),! Curl::PostField.content(':contentType', 'json'),! Curl::PostField.content(':replaceProperties', 'true'),! Curl::PostField.content(':content', contentHash.to_json))! puts "FINISHED: HTTP #{@c.response_code}"! end ! Step  Defini/on  Overview  (cont.)   Post  JSON  to  the  desired  path        using  :opera/on  import       The  JSON  contains  a  structure  needed   for  the  page  in  AEM  containing   properOes  needed;    jcr:primaryType,     cq:template,     sling:resourceType           content  hash  example  
  • 12. Legacy  System   AEM  System   OperaOon  Import   SlingPostServlet   Wrap-up  Demo   Questions  
  • 13. •  Several options for Content Migration – Scraping webpages is one option to consider – :operation import is great •  Ways to speed up frontend migration – Scale migration across machines using Selenium Grid to launch parallel operations – Use a headless browser Questions  Wrap-up  Demo  
  • 14. Resources  /  References     Sling  docs   haps://sling.apache.org/documentaOon/bundles/manipulaOng-­‐content-­‐the-­‐slingpostservlet-­‐ servlets-­‐post.html#imporOng-­‐content-­‐structures     U-­‐M  Demo  Project   haps://bitbucket.org/cmrockwell/cukescrape     Ruby  Gems   hap://bundler.io/   haps://github.com/jnicklas/capybara   haps://github.com/cucumber/cucumber   haps://github.com/taf2/curb     Selenium  Webdriver   hap://www.seleniumhq.org/projects/webdriver/   hap://www.seleniumhq.org/docs/07_selenium_grid.jsp       Wrap-up   Questions  Demo