SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
®
@MAGNOLIA_CMS 2
Magnolia and
Rails
Patrik Metzmacher,

Daniel Trierweiler,
Dievision GmbH
@MAGNOLIA_CMS 3
Who we are
We build web-based software
@MAGNOLIA_CMS 6
The Problem
@MAGNOLIA_CMS 7
We need to provide a

first-class CMS to our clients.
We want to have freedom in the
choice of our application
development environment.
@MAGNOLIA_CMS 8
@MAGNOLIA_CMS 9
Your Framework
of Choice
@MAGNOLIA_CMS 10
Who are you?
@MAGNOLIA_CMS 11
Agenda
@MAGNOLIA_CMS 12
The Problem:

Using Content in an(y) Application
The Solution, Magnolia Part:

REST Server and UI Integration
The Solution,

(Rails-) Application Part:

REST Client and Application Integration
@MAGNOLIA_CMS 13
Sinicum
github.com/dievision/
sinicum
@MAGNOLIA_CMS 14
Just another
Magnolia CMS
integration
@MAGNOLIA_CMS 15
Integrates with a different process
All content-related work should

be done within Magnolia CMS
(Almost) all development should

take place outside of Magnolia
CMS
@MAGNOLIA_CMS 16
“Content as a
Service”
@MAGNOLIA_CMS 17
@MAGNOLIA_CMS 18
@MAGNOLIA_CMS 19
@MAGNOLIA_CMS 20
Use Case Example
Use content in an external
application
Add content to a web shop
Provide a consistent content
creation experience among
multiple websites
Add content to a web shop
Develop application-driven and
content-driven sites

in a consistent way
Same tech stack and increased
efficiency for a dev team over
multiple projects
Decouple components of

an application –

e.g. to gain development and
deployment flexibility
Mobile application that re-uses
existing content in a different
way
@MAGNOLIA_CMS 21
Demo
@MAGNOLIA_CMS
Internet
Application
Provide Content Data
Fetch Content Data
Assemble Response
Render Templates
Web-facing component
JSON Response
HTTP Request
HTTP Request
HTTP (HTML) Request
@MAGNOLIA_CMS 23
Demo
@MAGNOLIA_CMS
Internet
Application
Editors
Provide Editing Interface
Access Application
Provide Content Data
Return Response
Fetch Content Data
Assemble Response
Render Templates

(with “Green Bars”)
HTTP Request
Proxy Request
JSON Response
HTTP Request
Proxy Response
HTTP (HTML) Response
@MAGNOLIA_CMS
Internet
Application
Editors
“Sinicum Server”
(Magnolia Module)
“Sinicum”
(Ruby Gem, Rails Engine)
@MAGNOLIA_CMS 26
Sinicum Server
github.com/dievision/sinicum-
server
@MAGNOLIA_CMS 27
Magnolia Module
Plain Java, no Ruby dependencies
Jersey/JAX-RS JSON REST API

(does not use the Magnolia 5.2 REST framework for historical
reasons)
Exposes content, CMS functionality
Proxies requests from the Pages
App

to the external application
@MAGNOLIA_CMS 28
@MAGNOLIA_CMS 29
@MAGNOLIA_CMS 30
The REST Part
@MAGNOLIA_CMS 31
curl --user superuser:superuser 

'http://localhost:8080/sinicum-rest/:workspace/:path'
@MAGNOLIA_CMS 32
curl --user superuser:superuser 

'http://localhost:8080/sinicum-rest/website/de?pretty=true'
[ {
"meta" : {
"name" : "de",
"path" : "/de",
"superTypes" : [ "mix:created", „mix:referenceable",
"nt:base", "nt:hierarchyNode", "mgnl:activatable", „mgnl:content",
"mgnl:created", "mgnl:lastModified", „mgnl:renderable",
"mgnl:versionable" ],
"mixinNodeTypes" : [ ],
"depth" : 1,
"workspace" : "website",
"mgnl:template" : "mymodule:pages/application",
"mgnl:created" : "2014-03-22T09:26:36.382+01:00",
"mgnl:createdBy" : "superuser",
"mgnl:lastModified" : "2014-03-22T15:52:07.547+01:00",
"mgnl:lastModifiedBy" : "superuser",
"jcr:created" : "2014-03-22T09:53:36.693+01:00",
"jcr:uuid" : "1ba90c51-a0c2-405b-8c36-764f60e5fb90",
"jcr:primaryType" : "mgnl:page"
},
"properties" : {
"title" : "A Headline"
},
"nodes" : {
"main" : {
"meta" : {
"name" : "main",
"path" : "/de/main",
"superTypes" : [ "mix:created", „mix:referenceable",
"nt:base", "nt:hierarchyNode", "mgnl:activatable", „mgnl:contentNode",
"mgnl:created", "mgnl:lastModified", "mgnl:renderable" ],
"mixinNodeTypes" : [ ],
"depth" : 2,
"workspace" : "website",
"mgnl:created" : "2014-03-22T15:49:48.678+01:00",
"mgnl:createdBy" : "superuser",
"mgnl:lastModified" : "2014-03-22T15:49:48.678+01:00",
"mgnl:lastModifiedBy" : "superuser",
"jcr:created" : "2014-03-22T15:49:48.678+01:00",
"jcr:uuid" : "734b6fee-0eb8-4d2a-a8c2-151f730b23b3",
"jcr:primaryType" : "mgnl:area"
},
"properties" : { },
"nodes" : {
"0" : {
"meta" : {
"name" : "0",
"path" : "/de/main/0",
"superTypes" : [ "mix:created", "mix:referenceable", „nt:base",
"nt:hierarchyNode", "mgnl:activatable", „mgnl:contentNode",
"mgnl:created", "mgnl:lastModified", "mgnl:renderable" ],
"mixinNodeTypes" : [ ],
"depth" : 3,
"workspace" : "website",
"mgnl:template" : "mymodule:components/textBlock",
"mgnl:created" : "2014-03-22T15:52:07.548+01:00",
"mgnl:createdBy" : "superuser",
"mgnl:lastModified" : "2014-03-22T15:52:07.548+01:00",
"mgnl:lastModifiedBy" : "superuser",
"jcr:created" : "2014-03-22T15:52:07.547+01:00",
"jcr:uuid" : "42333112-f48f-4646-8b0c-12d4cb8beefa",
"jcr:primaryType" : "mgnl:component"
},
"properties" : {
"text" : "A text"
},
"nodes" : { }
}
}
}
}
} ]
@MAGNOLIA_CMS 33
curl --user superuser:superuser 

'http://localhost:8080/sinicum-rest/website/de?pretty=true'
{
"meta" : {
// JCR/Magnolia meta information on a node
},
"properties" : {
// The node’s properties
},
"nodes" : {
!
// The child nodes relevant for the document
"child_node" : {
"meta" : {
// JCR/Magnolia meta information on the child node
},
"properties" : {
// The child node’s properties
},
!
!
!
}
}
}
@MAGNOLIA_CMS 34
curl --user superuser:superuser 

'http://localhost:8080/sinicum-rest/website/de?pretty=true'
{
"meta" : {
// JCR/Magnolia meta information on a node
},
"properties" : {
// The node’s properties
},
"nodes" : {
!
// The child nodes relevant for the document
"child_node" : {
"meta" : {
// JCR/Magnolia meta information on the child node
},
"properties" : {
// The child node’s properties
},
"nodes" : {
// All relevant nodes are resolved recursively
}
}
}
}
@MAGNOLIA_CMS 35
„Documents“, not JCR Nodes
Returns a Node including its

relevant children in a single
request

(e.g. Page + Area + Components)
Optionally, UUID References

are resolved as well
@MAGNOLIA_CMS 36
Central Goal:
Minimize the number

of API requests per page
@MAGNOLIA_CMS 37
Get a single node (and it’s children) via its path
GET /sinicum-server/:workspace/:path
Get a single node (and it’s children) via its UUID
GET /sinicum-server/:workspace/_uuid/:uuid
Perform a JCR query
GET /sinicum-server/:workspace/_query
Parameter Name Description
query The JCR query to perform
language The JCR query language (xpath, sql, jcr_sql2)
limit The maximum number of results
offset The offset for the results
@MAGNOLIA_CMS 38
Get all valid components for an area
GET /sinicum-server/_templating/components/

:module_name/:page_name/:area_name
Create and initialize an Area on a Page
POST /sinicum-server/_templating/areas/initialize
Parameter Name Description
workspace The name of the workspace
baseNodeUuid The UUID of the node to create the Area in
areaName The name of the Area to create
Get the dialog for a component
GET /sinicum-server/_templating/dialogs/

:component_type/:module_name/:component_name
@MAGNOLIA_CMS 39
The Proxy Part
@MAGNOLIA_CMS 40
@MAGNOLIA_CMS 41
% rails server
=> Booting WEBrick
=> Rails 4.0.4 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2014-03-24 18:10:25] INFO WEBrick 1.3.1
[2014-03-24 18:10:25] INFO ruby 2.1.1 (2014-02-24) [x86_64-darwin12.4.0]
[2014-03-24 18:10:25] INFO WEBrick::HTTPServer#start: pid=68886 port=3000
@MAGNOLIA_CMS 42
@MAGNOLIA_CMS 43
Sinicum
github.com/dievision/
sinicum
@MAGNOLIA_CMS 44
Demo
@MAGNOLIA_CMS 45
Ruby client for the REST API
“Object-Document-Mapper” mapping

the JSON responses to Ruby objects that follow

Ruby/ActiveRecord semantics
Conventions for Template/Area/Component
files
Implementation of Magnolia CMS’

Tag Libraries as Rails Helpers 
Convenience functionality to let Rails
Controllers handle requests to Magnolia CMS
@MAGNOLIA_CMS 46
Project Status
@MAGNOLIA_CMS 47
Stable and used in production
Follows Dievision’s conventions
and can only benefit from
exposure to the outside world
@MAGNOLIA_CMS 48
We are happy to help you get
started:

sinicum@dievision.de
Follow the project at

github.com/dievision/sinicum

github.com/dievision/sinicum-
server
Fork it, create Issues and send

@MAGNOLIA_CMS 49
Thank you
@MAGNOLIA_CMS 50
Any Questions?

Weitere ähnliche Inhalte

Ähnlich wie Magnolia CMS and Rails

Supercharge your data analytics with BigQuery
Supercharge your data analytics with BigQuerySupercharge your data analytics with BigQuery
Supercharge your data analytics with BigQueryMárton Kodok
 
Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018Microsoft 365 Developer
 
Consumer driven contract testing
Consumer driven contract testingConsumer driven contract testing
Consumer driven contract testingMike van Vendeloo
 
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Nicolas HAAN
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
Decrease build time and application size
Decrease build time and application sizeDecrease build time and application size
Decrease build time and application sizeKeval Patel
 
Journey to Containerized Application / Google Container Engine
Journey to Containerized Application / Google Container EngineJourney to Containerized Application / Google Container Engine
Journey to Containerized Application / Google Container EngineGoogle Cloud Platform - Japan
 
DECK36 - Log everything! and Realtime Datastream Analytics with Storm
DECK36 - Log everything! and Realtime Datastream Analytics with StormDECK36 - Log everything! and Realtime Datastream Analytics with Storm
DECK36 - Log everything! and Realtime Datastream Analytics with StormMike Lohmann
 
Static site generation using Metalsmith (Node.js)
Static site generation using Metalsmith (Node.js)Static site generation using Metalsmith (Node.js)
Static site generation using Metalsmith (Node.js)David Boyer
 
What I Learned At Drupal Con Dc 2009
What I Learned At Drupal Con Dc 2009What I Learned At Drupal Con Dc 2009
What I Learned At Drupal Con Dc 2009Neil Giarratana
 
MongoDB Tick Data Presentation
MongoDB Tick Data PresentationMongoDB Tick Data Presentation
MongoDB Tick Data PresentationMongoDB
 
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On KubernetesHow To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On KubernetesLightbend
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JSFestUA
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
Novedades de MongoDB 3.6
Novedades de MongoDB 3.6Novedades de MongoDB 3.6
Novedades de MongoDB 3.6MongoDB
 
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Massimiliano Dessì
 
Cloud Computing in Mobile
Cloud Computing in MobileCloud Computing in Mobile
Cloud Computing in MobileSVWB
 
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB
 

Ähnlich wie Magnolia CMS and Rails (20)

Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
 
Supercharge your data analytics with BigQuery
Supercharge your data analytics with BigQuerySupercharge your data analytics with BigQuery
Supercharge your data analytics with BigQuery
 
Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018
 
Consumer driven contract testing
Consumer driven contract testingConsumer driven contract testing
Consumer driven contract testing
 
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
 
AngularJS in large applications - AE NV
AngularJS in large applications - AE NVAngularJS in large applications - AE NV
AngularJS in large applications - AE NV
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Decrease build time and application size
Decrease build time and application sizeDecrease build time and application size
Decrease build time and application size
 
Journey to Containerized Application / Google Container Engine
Journey to Containerized Application / Google Container EngineJourney to Containerized Application / Google Container Engine
Journey to Containerized Application / Google Container Engine
 
DECK36 - Log everything! and Realtime Datastream Analytics with Storm
DECK36 - Log everything! and Realtime Datastream Analytics with StormDECK36 - Log everything! and Realtime Datastream Analytics with Storm
DECK36 - Log everything! and Realtime Datastream Analytics with Storm
 
Static site generation using Metalsmith (Node.js)
Static site generation using Metalsmith (Node.js)Static site generation using Metalsmith (Node.js)
Static site generation using Metalsmith (Node.js)
 
What I Learned At Drupal Con Dc 2009
What I Learned At Drupal Con Dc 2009What I Learned At Drupal Con Dc 2009
What I Learned At Drupal Con Dc 2009
 
MongoDB Tick Data Presentation
MongoDB Tick Data PresentationMongoDB Tick Data Presentation
MongoDB Tick Data Presentation
 
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On KubernetesHow To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Novedades de MongoDB 3.6
Novedades de MongoDB 3.6Novedades de MongoDB 3.6
Novedades de MongoDB 3.6
 
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
 
Cloud Computing in Mobile
Cloud Computing in MobileCloud Computing in Mobile
Cloud Computing in Mobile
 
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
 

Mehr von Magnolia

The SEO Workflow
The SEO WorkflowThe SEO Workflow
The SEO WorkflowMagnolia
 
Magnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia
 
Buzzword bingo: The real deal behind omnichannel, personalization and headless
Buzzword bingo: The real deal behind  omnichannel, personalization and headlessBuzzword bingo: The real deal behind  omnichannel, personalization and headless
Buzzword bingo: The real deal behind omnichannel, personalization and headlessMagnolia
 
Developing Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyDeveloping Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyMagnolia
 
Integrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceIntegrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceMagnolia
 
Customer Engagement in the Digital Era
Customer Engagement in the Digital EraCustomer Engagement in the Digital Era
Customer Engagement in the Digital EraMagnolia
 
The Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessThe Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessMagnolia
 
Using Magnolia in a Microservices Architecture
Using Magnolia in a Microservices ArchitectureUsing Magnolia in a Microservices Architecture
Using Magnolia in a Microservices ArchitectureMagnolia
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianMagnolia
 
Magnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia
 
Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Magnolia
 
Launching Magnolia on demand
Launching Magnolia on demandLaunching Magnolia on demand
Launching Magnolia on demandMagnolia
 
Front-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterFront-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterMagnolia
 
Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia
 
Magnolia and the IOT
Magnolia and the IOTMagnolia and the IOT
Magnolia and the IOTMagnolia
 
Internationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesInternationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesMagnolia
 
The new visana website how to fit a square peg into a round hole
The new visana website   how to fit a square peg into a round holeThe new visana website   how to fit a square peg into a round hole
The new visana website how to fit a square peg into a round holeMagnolia
 
Solving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachSolving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachMagnolia
 
Extending Magnolia with our solutions
Extending Magnolia with our solutionsExtending Magnolia with our solutions
Extending Magnolia with our solutionsMagnolia
 
Boost your online e commerce with magnolia
Boost your online e commerce with magnoliaBoost your online e commerce with magnolia
Boost your online e commerce with magnoliaMagnolia
 

Mehr von Magnolia (20)

The SEO Workflow
The SEO WorkflowThe SEO Workflow
The SEO Workflow
 
Magnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia 6 release walkthrough
Magnolia 6 release walkthrough
 
Buzzword bingo: The real deal behind omnichannel, personalization and headless
Buzzword bingo: The real deal behind  omnichannel, personalization and headlessBuzzword bingo: The real deal behind  omnichannel, personalization and headless
Buzzword bingo: The real deal behind omnichannel, personalization and headless
 
Developing Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyDeveloping Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficiently
 
Integrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceIntegrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer Experience
 
Customer Engagement in the Digital Era
Customer Engagement in the Digital EraCustomer Engagement in the Digital Era
Customer Engagement in the Digital Era
 
The Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessThe Age of the IOT & Digital Business
The Age of the IOT & Digital Business
 
Using Magnolia in a Microservices Architecture
Using Magnolia in a Microservices ArchitectureUsing Magnolia in a Microservices Architecture
Using Magnolia in a Microservices Architecture
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at Atlassian
 
Magnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynote
 
Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4
 
Launching Magnolia on demand
Launching Magnolia on demandLaunching Magnolia on demand
Launching Magnolia on demand
 
Front-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterFront-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites faster
 
Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?
 
Magnolia and the IOT
Magnolia and the IOTMagnolia and the IOT
Magnolia and the IOT
 
Internationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesInternationalization for globalized enterprise websites
Internationalization for globalized enterprise websites
 
The new visana website how to fit a square peg into a round hole
The new visana website   how to fit a square peg into a round holeThe new visana website   how to fit a square peg into a round hole
The new visana website how to fit a square peg into a round hole
 
Solving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachSolving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approach
 
Extending Magnolia with our solutions
Extending Magnolia with our solutionsExtending Magnolia with our solutions
Extending Magnolia with our solutions
 
Boost your online e commerce with magnolia
Boost your online e commerce with magnoliaBoost your online e commerce with magnolia
Boost your online e commerce with magnolia
 

Kürzlich hochgeladen

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
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
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
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
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Magnolia CMS and Rails

  • 1. ®
  • 2. @MAGNOLIA_CMS 2 Magnolia and Rails Patrik Metzmacher,
 Daniel Trierweiler, Dievision GmbH
  • 4.
  • 7. @MAGNOLIA_CMS 7 We need to provide a
 first-class CMS to our clients. We want to have freedom in the choice of our application development environment.
  • 12. @MAGNOLIA_CMS 12 The Problem:
 Using Content in an(y) Application The Solution, Magnolia Part:
 REST Server and UI Integration The Solution,
 (Rails-) Application Part:
 REST Client and Application Integration
  • 15. @MAGNOLIA_CMS 15 Integrates with a different process All content-related work should
 be done within Magnolia CMS (Almost) all development should
 take place outside of Magnolia CMS
  • 20. @MAGNOLIA_CMS 20 Use Case Example Use content in an external application Add content to a web shop Provide a consistent content creation experience among multiple websites Add content to a web shop Develop application-driven and content-driven sites
 in a consistent way Same tech stack and increased efficiency for a dev team over multiple projects Decouple components of
 an application –
 e.g. to gain development and deployment flexibility Mobile application that re-uses existing content in a different way
  • 22. @MAGNOLIA_CMS Internet Application Provide Content Data Fetch Content Data Assemble Response Render Templates Web-facing component JSON Response HTTP Request HTTP Request HTTP (HTML) Request
  • 24. @MAGNOLIA_CMS Internet Application Editors Provide Editing Interface Access Application Provide Content Data Return Response Fetch Content Data Assemble Response Render Templates
 (with “Green Bars”) HTTP Request Proxy Request JSON Response HTTP Request Proxy Response HTTP (HTML) Response
  • 27. @MAGNOLIA_CMS 27 Magnolia Module Plain Java, no Ruby dependencies Jersey/JAX-RS JSON REST API
 (does not use the Magnolia 5.2 REST framework for historical reasons) Exposes content, CMS functionality Proxies requests from the Pages App
 to the external application
  • 31. @MAGNOLIA_CMS 31 curl --user superuser:superuser 
 'http://localhost:8080/sinicum-rest/:workspace/:path'
  • 32. @MAGNOLIA_CMS 32 curl --user superuser:superuser 
 'http://localhost:8080/sinicum-rest/website/de?pretty=true' [ { "meta" : { "name" : "de", "path" : "/de", "superTypes" : [ "mix:created", „mix:referenceable", "nt:base", "nt:hierarchyNode", "mgnl:activatable", „mgnl:content", "mgnl:created", "mgnl:lastModified", „mgnl:renderable", "mgnl:versionable" ], "mixinNodeTypes" : [ ], "depth" : 1, "workspace" : "website", "mgnl:template" : "mymodule:pages/application", "mgnl:created" : "2014-03-22T09:26:36.382+01:00", "mgnl:createdBy" : "superuser", "mgnl:lastModified" : "2014-03-22T15:52:07.547+01:00", "mgnl:lastModifiedBy" : "superuser", "jcr:created" : "2014-03-22T09:53:36.693+01:00", "jcr:uuid" : "1ba90c51-a0c2-405b-8c36-764f60e5fb90", "jcr:primaryType" : "mgnl:page" }, "properties" : { "title" : "A Headline" }, "nodes" : { "main" : { "meta" : { "name" : "main", "path" : "/de/main", "superTypes" : [ "mix:created", „mix:referenceable", "nt:base", "nt:hierarchyNode", "mgnl:activatable", „mgnl:contentNode", "mgnl:created", "mgnl:lastModified", "mgnl:renderable" ], "mixinNodeTypes" : [ ], "depth" : 2, "workspace" : "website", "mgnl:created" : "2014-03-22T15:49:48.678+01:00", "mgnl:createdBy" : "superuser", "mgnl:lastModified" : "2014-03-22T15:49:48.678+01:00", "mgnl:lastModifiedBy" : "superuser", "jcr:created" : "2014-03-22T15:49:48.678+01:00", "jcr:uuid" : "734b6fee-0eb8-4d2a-a8c2-151f730b23b3", "jcr:primaryType" : "mgnl:area" }, "properties" : { }, "nodes" : { "0" : { "meta" : { "name" : "0", "path" : "/de/main/0", "superTypes" : [ "mix:created", "mix:referenceable", „nt:base", "nt:hierarchyNode", "mgnl:activatable", „mgnl:contentNode", "mgnl:created", "mgnl:lastModified", "mgnl:renderable" ], "mixinNodeTypes" : [ ], "depth" : 3, "workspace" : "website", "mgnl:template" : "mymodule:components/textBlock", "mgnl:created" : "2014-03-22T15:52:07.548+01:00", "mgnl:createdBy" : "superuser", "mgnl:lastModified" : "2014-03-22T15:52:07.548+01:00", "mgnl:lastModifiedBy" : "superuser", "jcr:created" : "2014-03-22T15:52:07.547+01:00", "jcr:uuid" : "42333112-f48f-4646-8b0c-12d4cb8beefa", "jcr:primaryType" : "mgnl:component" }, "properties" : { "text" : "A text" }, "nodes" : { } } } } } } ]
  • 33. @MAGNOLIA_CMS 33 curl --user superuser:superuser 
 'http://localhost:8080/sinicum-rest/website/de?pretty=true' { "meta" : { // JCR/Magnolia meta information on a node }, "properties" : { // The node’s properties }, "nodes" : { ! // The child nodes relevant for the document "child_node" : { "meta" : { // JCR/Magnolia meta information on the child node }, "properties" : { // The child node’s properties }, ! ! ! } } }
  • 34. @MAGNOLIA_CMS 34 curl --user superuser:superuser 
 'http://localhost:8080/sinicum-rest/website/de?pretty=true' { "meta" : { // JCR/Magnolia meta information on a node }, "properties" : { // The node’s properties }, "nodes" : { ! // The child nodes relevant for the document "child_node" : { "meta" : { // JCR/Magnolia meta information on the child node }, "properties" : { // The child node’s properties }, "nodes" : { // All relevant nodes are resolved recursively } } } }
  • 35. @MAGNOLIA_CMS 35 „Documents“, not JCR Nodes Returns a Node including its
 relevant children in a single request
 (e.g. Page + Area + Components) Optionally, UUID References
 are resolved as well
  • 36. @MAGNOLIA_CMS 36 Central Goal: Minimize the number
 of API requests per page
  • 37. @MAGNOLIA_CMS 37 Get a single node (and it’s children) via its path GET /sinicum-server/:workspace/:path Get a single node (and it’s children) via its UUID GET /sinicum-server/:workspace/_uuid/:uuid Perform a JCR query GET /sinicum-server/:workspace/_query Parameter Name Description query The JCR query to perform language The JCR query language (xpath, sql, jcr_sql2) limit The maximum number of results offset The offset for the results
  • 38. @MAGNOLIA_CMS 38 Get all valid components for an area GET /sinicum-server/_templating/components/
 :module_name/:page_name/:area_name Create and initialize an Area on a Page POST /sinicum-server/_templating/areas/initialize Parameter Name Description workspace The name of the workspace baseNodeUuid The UUID of the node to create the Area in areaName The name of the Area to create Get the dialog for a component GET /sinicum-server/_templating/dialogs/
 :component_type/:module_name/:component_name
  • 41. @MAGNOLIA_CMS 41 % rails server => Booting WEBrick => Rails 4.0.4 application starting in development on http://0.0.0.0:3000 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server [2014-03-24 18:10:25] INFO WEBrick 1.3.1 [2014-03-24 18:10:25] INFO ruby 2.1.1 (2014-02-24) [x86_64-darwin12.4.0] [2014-03-24 18:10:25] INFO WEBrick::HTTPServer#start: pid=68886 port=3000
  • 45. @MAGNOLIA_CMS 45 Ruby client for the REST API “Object-Document-Mapper” mapping
 the JSON responses to Ruby objects that follow
 Ruby/ActiveRecord semantics Conventions for Template/Area/Component files Implementation of Magnolia CMS’
 Tag Libraries as Rails Helpers Convenience functionality to let Rails Controllers handle requests to Magnolia CMS
  • 47. @MAGNOLIA_CMS 47 Stable and used in production Follows Dievision’s conventions and can only benefit from exposure to the outside world
  • 48. @MAGNOLIA_CMS 48 We are happy to help you get started:
 sinicum@dievision.de Follow the project at
 github.com/dievision/sinicum
 github.com/dievision/sinicum- server Fork it, create Issues and send