SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
N Hidden Gems in Hippo Forge and
Experience Plugins
Woonsan Ko
December 6, 2017
Sequel to N Hidden Gems You Didn’t Know
 (2016)
● slideshare.net/woonsan
● woonsanko.blogspot.com
The Ecosystem around BR Experience
3
OSS
Libraries
Hippo Forge
Plugins
BR Experience
Plugins
OSS*
Frameworks
Generic vs. Specific
Complexity
* OSS: Open Source Software
The Ecosystem around BR Experience (cont.)
4
OSS
Libraries
Hippo Forge
Plugins
BR Experience
Plugins
OSS*
Frameworks
1. IFrame Perspective Plugin
2. Copy/Move Folder Plugin
3. External Document Picker
4. Doc. Commenting Plugin
5. HST Content Version Utils
6. Hipshoot for Spring Boot Deploy
* OSS: Open Source Software
7. Content HAL API
Complexity
Generic vs. Specific
Gem #1: Too Simple to iFrame?
5
“Why don’t you simply frame the goody in it?”
Gem #1: Why IFrame Perspective Plugin*?
● Built-in CMS Perspective Plugin to embed an IFrame to include a web
application.
● Sometimes it is most cost effective to simply embed an IFrame for a
good feature by a web application.
6
* More at https://onehippo-forge.github.io/iframe-perspective/
Gem #1: IFrame Perspective Plugin
● Configurations*
○ title, src, icon infos, any other IFrame element attributes (iframe.*)
○ X-Frame-Options , Content-Security-Policy ,
X-Content-Security-Policy , X-Webkit-CSP
● WicketSessionFilter in web.xml
○ To limit access only to CMS authenticated users.
7
* More at https://onehippo-forge.github.io/iframe-perspective/install.html
Gem #1: IFrame Perspective Plugin (cont.)
8
Gem #2: Copy or Move Folder
in CMS UI
9
“Can I copy or move a folder as a whole in CMS UI?”
Gem #2: Why Folder Context Menus Plugin*?
● Built-in CMS Folder Context Menu(s) to provide business users with
features to copy or move folders in CMS UI.
○ Let business users organize content folders by themselves.
● Also provides a common code library for copying/moving folders.
○ Use it in Java / Groovy code. E.g, Batch Processing
10* More at https://onehippo-forge.github.io/folder-context-menus/
Gem #2: Copy or Move Folder* in CMS UI
11
Gem #2: Copy or Move Folder in CMS UI (cont.)
12
● Code Library Support for Batch Processing - FolderCopyTask
// Example: Copy /content/documents/myhippoproject/news/
// to /content/documents/myhippoproject/news2/
String sourceFolderPath = "/content/documents/myhippoproject/news";
String destBaseFolderPath = "/content/documents/myhippoproject";
String destFolderNodeName = "news2";
String destFolderDisplayName = "News 2";
Node sourceFolderNode = jcrSession.getNode(sourceFolderPath);
Node destBaseFolderNode = jcrSession.getNode(destBaseFolderPath);
FolderCopyTask task = new FolderCopyTask(jcrSession, Locale.ENGLISH, sourceFolderNode,
destBaseFolderNode, destFolderNodeName,
destFolderDisplayName);
task.execute();
jcrSession.save();
Gem #2: Copy or Move Folder in CMS UI (cont.)
13
● Code Library Support for Batch Processing - FolderMoveTask
// Example: Move /content/documents/myhippoproject/news/2011/
// to /content/documents/myhippoproject/common/2011/
String sourceFolderPath = "/content/documents/myhippoproject/news";
String destBaseFolderPath = "/content/documents/myhippoproject";
String destFolderNodeName = "news2";
String destFolderDisplayName = "News 2";
Node sourceFolderNode = jcrSession.getNode(sourceFolderPath);
Node destBaseFolderNode = jcrSession.getNode(destBaseFolderPath);
FolderMoveTask task = new FolderMoveTask(jcrSession, Locale.ENGLISH, sourceFolderNode,
destBaseFolderNode, destFolderNodeName,
destFolderDisplayName);
task.execute();
jcrSession.save();
Gem #3: External Document Picker
(with new feature additions)
14
“Enrich your content by including metadata
of related external content in CMS UI!”
Gem #3: Why External Document Picker Plugin*?
● Built-in Generic Picker UI Plugin in CMS for:
○ Selecting an associated external documents for a field in the document editor.
○ Selecting a linked external documents for a RichText field in a document.
○ Selecting external documents from Folder Context Menu to do something.
■ E.g, creating documents in the folder, tagging the folder, etc.
● For both flat-list data and tree-list data.
● Most effective way to enrich your content
○ Highly extensible.
○ CRISP API can be used in backend integration.
15* More at https://onehippo-forge.github.io/external-document-picker/
Gem #3: External Document Picker
16
ExternalDocumentServiceFacade
is responsible for data to
display each item.
17
Gem #3: External Document Picker (cont.)
ExternalDocumentServiceFacade
in Tree List View option,
resolving parent-child
relationship!
* More at https://onehippo-forge.github.io/external-document-picker/field/dev-howto-treeview.html
NEW!
18
Gem #3: External Document Picker (cont.)
* More at https://onehippo-forge.github.io/external-document-picker/folder/architecture.html
NEW!
ExternalDocumentServiceFacade
in CMS Folder Menu, allowing
custom folder settings or
content creation!
Gem #4: Document Commenting
in CMS UI
19
“Comment on what you’re doing
in collaboration with others!”
Gem #4: Why Document Commenting Plugin*?
● Built-in Field UI Plugin to allow commenting among collaborators in
Document Editor.
● Simple, cost-effective collaboration in document authoring and reviewing.
● No burden in document storage level as it’s stored separately.
● Highly extensible.
20* More at https://onehippo-forge.github.io/document-commenting/
21
Gem #4: Document Commenting
Add a
commenting field
anywhere in a
document type!
22
Gem #4: Document Commenting (cont.)
Gem #4: Document Commenting (cont.)
● Very Extensible for different backends!
23
Document
Commenting
CMS UI Plugin
<<interface>>
CommentPersistence
Manager*
Default JCR
CommentPersistence
Manager
Other
Storage-based
CommentPersistence
Manager?
* https://onehippo-forge.github.io/document-commenting/apidocs/org/onehippo/forge/document/commenting/cms/api/CommentPersistenceManager.html
Only very simple 9
methods to
implement!
JCR
ES?
NoSQL?
Gem #5: Live Version As-Of
via HST Content Version Utils
24
“Show content in specific version,
live as of December 6, 2017!”
Gem #5: Why HST Content Version Utils*?
● Utility to retrieve JCR Version data through dynamic proxy of
HST Content Beans, generated at runtime automatically.
○ Instead of low-level JCR Version API: VersionManager, Frozen Nodes, etc.
● No need to have separate Java code and FreeMarker templates.
○ Just stick with HST Content Beans API, even for versioned, frozen nodes.
25
* More at https://onehippo-forge.github.io/hst-content-version-utils/
Gem #5: Live Version As-Of via HST Content Version Utils
● Retrieve a specific version of content using HST Content Beans API.
○ Dynamic proxying, and automatic link resolutions between versioned documents.
○ cf) JcrVersionUtils , HippoBeanVersionUtils (see javadoc for details)
26
HstRequestContext requestContext = RequestContextProvider.get();
// First, get the current live news document.
News curNewsDoc = requestContext.getContentBean();
// Then let’s get the specific version, live as of December 6, 2017 if any.
Calendar asOfDate = ISO8601.parse("2017-12-06T00:00:00-04:00");
News newsDocAsOf =
HippoBeanVersionUtils.getVersionedBeanAsOf(news.getCanonicalHandlePath(),
News.class, asOfDate);
// Pass along the News (dynamically proxied) bean to template!
request.setAttribute("document", newsDocAsOf);
Gem #6: Spring Boot Deploy Support
27
“Package and deploy it onto PCF Cloud!”
Gem #6: Why hipshoot Spring Boot Deploy Support*?
● Package a CMS project into single Spring Boot executable JAR.
○ Spring Boot is one of the best Framework for 12 Factor Apps (Cloud Native) development.
● Allow to deploy it to PCF (Pivotal Cloud Foundry) cloud env.
● Control the lifecycle of the application yourself.
○ E.g, environment initialization, Lucene index loading from storage, etc.
28
* https://onehippo-forge.github.io/hipshoot/
Gem #6: Spring Boot Support Deploy Support
29
● Build
$ mvn clean verify
● Running Example
$ java -Xms512m -Xmx1024m 
-Drepo.path="storage" 
-jar spring-boot-deploy/target/myhippoproject-deploy.jar
● Pushing Example to PCF (Pivotal Cloud Foundry)
$ cf login -a https://api.run.pivotal.io
$ cf push hippo-on-spring-boot 
-t 180 -f spring-boot-deploy/manifest.yml 
-p spring-boot-deploy/target/myhippoproject-deploy.jar
Gem #6: What does hipshoot provide?
30
● Extending TomcatEmbeddedServletContainerFactory
○ To support multi-wars packaging, JNDI resource configuration, etc.
● Demo project for details
○ https://github.com/woonsanko/hippo-on-spring-boot
Gem #6: What does hipshoot provide? (cont.)
31
● Example application.yaml with hipshoot configuration
hipshoot:
embedded:
catalina:
persistSession: 'false'
appBase: '${server.tomcat.basedir}/webapps'
wars: ${parameters.catalina.deployableWars}
server:
defaultContext:
parameters:
- name: 'repository-directory'
value: '${catalina.base}/repository'
override: 'false'
# SNIP
namingResources:
- name: 'jdbc/repositoryDS'
auth: 'Container'
type: 'javax.sql.DataSource'
properties:
# SNIP
Gem #6: Considering Lucene Index Rebuilding
32
● Each cluster node needs local Lucene on each node. *
Load Balancer
Node 1
Node N
DBMS
Lucene Index
on local FS
Lucene Index
on local FS
Journal
Global
Revision
Local
Revision
* https://wiki.apache.org/jackrabbit/Clustering
Gem #6: Considering Lucene Index Rebuilding (cont.)
33
● Solution Candidate
* https://wiki.apache.org/jackrabbit/Clustering
Node #N
DBMS
Lucene Index
on local FS
Journal
Global
Revision
Local
Revision
S3, SFTP, WebDAV,
...
Download and Restore
Lucene Index
From New Node
Export and Backup
Lucene Index
From Existing Node
Node #M
Gem #6: Considering Lucene Index Rebuilding (cont.)
34
● Solution Candidate, using Lucene Index Export/Import feature* (v12.1)
* https://www.onehippo.org/library/administration/export-the-lucene-index-from-a-running-production-environment.html
@SpringBootApplication
@RestController
public class Application {
// --->8--- SNIP --->8---
@PostConstruct
public void synchronizeLuceneIndex() {
// 1. Check if local lucene index directory exists.
// 2. If not existing, download the latest stable lucene export zip file.
}
@RequestMapping(path = "/backup-lucene-index")
public String backupLuceneIndex() {
// 1. Download lucene index export from https://{hostname}/cms/ws/indexexport.
// 2. Backup to a cloud storage such as S3, SFTP, WebDAV, etc.
}
}
Gem #7: Content HAL API
35
“Consume Content Right Away in your Apps!”
Gem #7: Why Content HAL API*?
● Another Built-in Generic Content REST API
based on HAL (Hypertext Application Language),
a specification draft as a HATEOAS
(Hypermedia as the Engine of Application State).
● Much easier, more performant and more extensible.
36
* More at https://tools.ietf.org/html/draft-kelly-json-hal-08 and http://stateless.co/hal_specification.html
Gem #7: Content HAL API
37
● What is HAL?
○ A specification draft for HATEOAS (Hypermedia as the Engine of Application State), a
constraint of the REST application architecture.
○ Minimum Valid HAL Resource: an empty JSON object
○ Mostly, a resource SHOULD have a self link ("_links" is reserved):
{}
{
"_links": {
"self": { "href" : "/orders/523" }
}
}
Gem #7: Content HAL API (cont.)
38
● You can have domain specific links and properties:
{
"_links": {
"self": { "href": "/orders/523" },
"invoice": { "href": "/invoices/873" }
},
"currency": "USD",
"status": "shipped",
"total": 10.20
}
Gem #7: Content HAL API (cont.)
39
● You can embed other resources in "_embedded" that is reserved:
{
"_links": {
"self": { "href": "/orders" }
},
"_embedded": {
"orders": [{
"_links": { "self": { "href": "/orders/523" } },
"total": 30.00
},{
"_links": { "self": { "href": "/orders/524" } },
"total": 20.00
}]
}
"currentlyProcessing": 14,
"shippedToday": 20
}
Gem #7: Content HAL API (cont.)
40
● Better use logical field names which are already defined in Document Types!
Gem #7: Content HAL API (cont.)
41
● Better use logical field names which are already defined in Document Types!
{
"_links": {
"self": { "href": "/site/api/events/b8f5eb45-7200-3118a0dc60b8" }
},
"title": "Breakfast",
"introduction": "Start the day with a nice breakfast.",
"date": 1478292471762,
"enddate": 1478292570000
}
Gem #7: Content HAL API (cont.)
42
● URL Patterns
○ Collection
■ /{type}/
■ e.g. http://localhost:8080/site/api/documents ,
http://localhost:8080/site/api/folders ,
http://localhost:8080/site/api/newsdocument
http://localhost:8080/site/api/resourcebundles
○ Item
■ /{type}/{id} or /{type}/{relPath}
■ e.g. http://localhost:8080/site/api/documents/{id },
http://localhost:8080/site/api/documents/{relPath },
http://localhost:8080/site/api/folders/{id },
http://localhost:8080/site/api/folders/{relPath },
http://localhost:8080/site/api/resourcebundles/{basename }
Gem #7: Content HAL API (cont.)
43
● Common Query Parameters
Name Description Examples
_scope Search scope node ID or path _scope=a_UUID or _scope=/content
_offset Offset of the iterating query result _offset=10
_limit Limit of the iterating query result _limit=10
_fields Field names to include or exclude _fields=title,introduction,-content
_sort Sort field names _sort=title,-date
_q Full text search query term _q=lorem+ipsum
_expr Custom JCR XPath expression to narrow the search
result
_expr=jcr:contains(@my:title,'hippo')
Gem #7: Content HAL API (cont.)
44
● Comparison with other options
Content REST API HST Plain JAX-RS REST Content HAL API
Standard Hippo Specific Custom HAL Specification
Built-in Yes No Yes
Chatty
Communication
Chatty Up to implementation Not Chatty
(w/ option to be chatty)
Logical Model
Support
No Yes Yes
Need Java
Beans
No Yes No
Extensible Yes No Yes
45
https://onehippo-forge.github.io/
https://github.com/onehippo-forge
Stay in Touch!
● www.onehippo.org
● slideshare.net/woonsan
● woonsanko.blogspot.com

Weitere Àhnliche Inhalte

Was ist angesagt?

CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourPeter Friese
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchAppsBradley Holt
 
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)Presto in Treasure Data (presented at db tech showcase Sapporo 2015)
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)Mitsunori Komatsu
 
Search@airbnb
Search@airbnbSearch@airbnb
Search@airbnbMousom Gupta
 
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...MongoDB
 
mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.Oleg Shanyuk
 
CouchDB in The Room
CouchDB in The RoomCouchDB in The Room
CouchDB in The RoomMakoto Ohnami
 
MongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your Data
MongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your DataMongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your Data
MongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your DataMongoDB
 
Elasticsearch - SEARCH & ANALYZE DATA IN REAL TIME
Elasticsearch - SEARCH & ANALYZE DATA IN REAL TIMEElasticsearch - SEARCH & ANALYZE DATA IN REAL TIME
Elasticsearch - SEARCH & ANALYZE DATA IN REAL TIMEPiotr Pelczar
 
Web Services with Objective-C
Web Services with Objective-CWeb Services with Objective-C
Web Services with Objective-CJuio Barros
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012sullis
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Dbchriskite
 
iOS: Web Services and XML parsing
iOS: Web Services and XML parsingiOS: Web Services and XML parsing
iOS: Web Services and XML parsingJussi Pohjolainen
 
Using Webservice in iOS
Using Webservice  in iOS Using Webservice  in iOS
Using Webservice in iOS Mahboob Nur
 
Using MongoDB and a Relational Database at MongoDB Day
Using MongoDB and a Relational Database at MongoDB DayUsing MongoDB and a Relational Database at MongoDB Day
Using MongoDB and a Relational Database at MongoDB Dayhayesdavis
 
Python, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoPython, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoSammy Fung
 

Was ist angesagt? (20)

CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchApps
 
Introducing CouchDB
Introducing CouchDBIntroducing CouchDB
Introducing CouchDB
 
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)Presto in Treasure Data (presented at db tech showcase Sapporo 2015)
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)
 
Search@airbnb
Search@airbnbSearch@airbnb
Search@airbnb
 
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
 
mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.
 
CouchDB in The Room
CouchDB in The RoomCouchDB in The Room
CouchDB in The Room
 
MongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your Data
MongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your DataMongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your Data
MongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your Data
 
Elasticsearch - SEARCH & ANALYZE DATA IN REAL TIME
Elasticsearch - SEARCH & ANALYZE DATA IN REAL TIMEElasticsearch - SEARCH & ANALYZE DATA IN REAL TIME
Elasticsearch - SEARCH & ANALYZE DATA IN REAL TIME
 
Web Services with Objective-C
Web Services with Objective-CWeb Services with Objective-C
Web Services with Objective-C
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
 
iOS: Web Services and XML parsing
iOS: Web Services and XML parsingiOS: Web Services and XML parsing
iOS: Web Services and XML parsing
 
MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
 
Using Webservice in iOS
Using Webservice  in iOS Using Webservice  in iOS
Using Webservice in iOS
 
Scrapy
ScrapyScrapy
Scrapy
 
Using MongoDB and a Relational Database at MongoDB Day
Using MongoDB and a Relational Database at MongoDB DayUsing MongoDB and a Relational Database at MongoDB Day
Using MongoDB and a Relational Database at MongoDB Day
 
Python, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoPython, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and Django
 
Web Scrapping with Python
Web Scrapping with PythonWeb Scrapping with Python
Web Scrapping with Python
 

Ähnlich wie N hidden gems in hippo forge and experience plugins (dec17)

[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization modelEuropean Collaboration Summit
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityTeamstudio
 
Rejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform GainRejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform GainƁukasz Piątkowski
 
Survey of Container Build Tools
Survey of Container Build ToolsSurvey of Container Build Tools
Survey of Container Build ToolsMichael Ducy
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Runwesley chun
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshareCavelle Benjamin
 
Fullstack workshop
Fullstack workshopFullstack workshop
Fullstack workshopAssaf Gannon
 
Odo improving the developer experience on OpenShift - hack &amp; sangria
Odo   improving the developer experience on OpenShift - hack &amp; sangriaOdo   improving the developer experience on OpenShift - hack &amp; sangria
Odo improving the developer experience on OpenShift - hack &amp; sangriaJorge Morales
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?Pascal Rapicault
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09Bastian Feder
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpackNodeXperts
 
WebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET CoreWebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET CoreChen Yu Pao
 
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptHoracio Gonzalez
 
Strategies for Context Data Persistence
Strategies for Context Data PersistenceStrategies for Context Data Persistence
Strategies for Context Data PersistenceFIWARE
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdfAbid Malik
 
Cloud native - CI/CD
Cloud native - CI/CDCloud native - CI/CD
Cloud native - CI/CDElad Hirsch
 
GoogleDSC_ GHRCE_ flutter_firebase.pptx
GoogleDSC_ GHRCE_  flutter_firebase.pptxGoogleDSC_ GHRCE_  flutter_firebase.pptx
GoogleDSC_ GHRCE_ flutter_firebase.pptxGoogleDeveloperStude22
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFxThomas Daly
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 

Ähnlich wie N hidden gems in hippo forge and experience plugins (dec17) (20)

[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
Rejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform GainRejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform Gain
 
Survey of Container Build Tools
Survey of Container Build ToolsSurvey of Container Build Tools
Survey of Container Build Tools
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshare
 
Fullstack workshop
Fullstack workshopFullstack workshop
Fullstack workshop
 
Odo improving the developer experience on OpenShift - hack &amp; sangria
Odo   improving the developer experience on OpenShift - hack &amp; sangriaOdo   improving the developer experience on OpenShift - hack &amp; sangria
Odo improving the developer experience on OpenShift - hack &amp; sangria
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
WebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET CoreWebSocket on client & server using websocket-sharp & ASP.NET Core
WebSocket on client & server using websocket-sharp & ASP.NET Core
 
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
 
Strategies for Context Data Persistence
Strategies for Context Data PersistenceStrategies for Context Data Persistence
Strategies for Context Data Persistence
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdf
 
Cloud native - CI/CD
Cloud native - CI/CDCloud native - CI/CD
Cloud native - CI/CD
 
GoogleDSC_ GHRCE_ flutter_firebase.pptx
GoogleDSC_ GHRCE_  flutter_firebase.pptxGoogleDSC_ GHRCE_  flutter_firebase.pptx
GoogleDSC_ GHRCE_ flutter_firebase.pptx
 
Zend Framework MVC driven ExtJS
Zend Framework MVC driven ExtJSZend Framework MVC driven ExtJS
Zend Framework MVC driven ExtJS
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 

KĂŒrzlich hochgeladen

Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEselvakumar948
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 

KĂŒrzlich hochgeladen (20)

Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 

N hidden gems in hippo forge and experience plugins (dec17)

  • 1. N Hidden Gems in Hippo Forge and Experience Plugins Woonsan Ko December 6, 2017
  • 2. Sequel to N Hidden Gems You Didn’t Know
 (2016) ● slideshare.net/woonsan ● woonsanko.blogspot.com
  • 3. The Ecosystem around BR Experience 3 OSS Libraries Hippo Forge Plugins BR Experience Plugins OSS* Frameworks Generic vs. Specific Complexity * OSS: Open Source Software
  • 4. The Ecosystem around BR Experience (cont.) 4 OSS Libraries Hippo Forge Plugins BR Experience Plugins OSS* Frameworks 1. IFrame Perspective Plugin 2. Copy/Move Folder Plugin 3. External Document Picker 4. Doc. Commenting Plugin 5. HST Content Version Utils 6. Hipshoot for Spring Boot Deploy * OSS: Open Source Software 7. Content HAL API Complexity Generic vs. Specific
  • 5. Gem #1: Too Simple to iFrame? 5 “Why don’t you simply frame the goody in it?”
  • 6. Gem #1: Why IFrame Perspective Plugin*? ● Built-in CMS Perspective Plugin to embed an IFrame to include a web application. ● Sometimes it is most cost effective to simply embed an IFrame for a good feature by a web application. 6 * More at https://onehippo-forge.github.io/iframe-perspective/
  • 7. Gem #1: IFrame Perspective Plugin ● Configurations* ○ title, src, icon infos, any other IFrame element attributes (iframe.*) ○ X-Frame-Options , Content-Security-Policy , X-Content-Security-Policy , X-Webkit-CSP ● WicketSessionFilter in web.xml ○ To limit access only to CMS authenticated users. 7 * More at https://onehippo-forge.github.io/iframe-perspective/install.html
  • 8. Gem #1: IFrame Perspective Plugin (cont.) 8
  • 9. Gem #2: Copy or Move Folder in CMS UI 9 “Can I copy or move a folder as a whole in CMS UI?”
  • 10. Gem #2: Why Folder Context Menus Plugin*? ● Built-in CMS Folder Context Menu(s) to provide business users with features to copy or move folders in CMS UI. ○ Let business users organize content folders by themselves. ● Also provides a common code library for copying/moving folders. ○ Use it in Java / Groovy code. E.g, Batch Processing 10* More at https://onehippo-forge.github.io/folder-context-menus/
  • 11. Gem #2: Copy or Move Folder* in CMS UI 11
  • 12. Gem #2: Copy or Move Folder in CMS UI (cont.) 12 ● Code Library Support for Batch Processing - FolderCopyTask // Example: Copy /content/documents/myhippoproject/news/ // to /content/documents/myhippoproject/news2/ String sourceFolderPath = "/content/documents/myhippoproject/news"; String destBaseFolderPath = "/content/documents/myhippoproject"; String destFolderNodeName = "news2"; String destFolderDisplayName = "News 2"; Node sourceFolderNode = jcrSession.getNode(sourceFolderPath); Node destBaseFolderNode = jcrSession.getNode(destBaseFolderPath); FolderCopyTask task = new FolderCopyTask(jcrSession, Locale.ENGLISH, sourceFolderNode, destBaseFolderNode, destFolderNodeName, destFolderDisplayName); task.execute(); jcrSession.save();
  • 13. Gem #2: Copy or Move Folder in CMS UI (cont.) 13 ● Code Library Support for Batch Processing - FolderMoveTask // Example: Move /content/documents/myhippoproject/news/2011/ // to /content/documents/myhippoproject/common/2011/ String sourceFolderPath = "/content/documents/myhippoproject/news"; String destBaseFolderPath = "/content/documents/myhippoproject"; String destFolderNodeName = "news2"; String destFolderDisplayName = "News 2"; Node sourceFolderNode = jcrSession.getNode(sourceFolderPath); Node destBaseFolderNode = jcrSession.getNode(destBaseFolderPath); FolderMoveTask task = new FolderMoveTask(jcrSession, Locale.ENGLISH, sourceFolderNode, destBaseFolderNode, destFolderNodeName, destFolderDisplayName); task.execute(); jcrSession.save();
  • 14. Gem #3: External Document Picker (with new feature additions) 14 “Enrich your content by including metadata of related external content in CMS UI!”
  • 15. Gem #3: Why External Document Picker Plugin*? ● Built-in Generic Picker UI Plugin in CMS for: ○ Selecting an associated external documents for a field in the document editor. ○ Selecting a linked external documents for a RichText field in a document. ○ Selecting external documents from Folder Context Menu to do something. ■ E.g, creating documents in the folder, tagging the folder, etc. ● For both flat-list data and tree-list data. ● Most effective way to enrich your content ○ Highly extensible. ○ CRISP API can be used in backend integration. 15* More at https://onehippo-forge.github.io/external-document-picker/
  • 16. Gem #3: External Document Picker 16 ExternalDocumentServiceFacade is responsible for data to display each item.
  • 17. 17 Gem #3: External Document Picker (cont.) ExternalDocumentServiceFacade in Tree List View option, resolving parent-child relationship! * More at https://onehippo-forge.github.io/external-document-picker/field/dev-howto-treeview.html NEW!
  • 18. 18 Gem #3: External Document Picker (cont.) * More at https://onehippo-forge.github.io/external-document-picker/folder/architecture.html NEW! ExternalDocumentServiceFacade in CMS Folder Menu, allowing custom folder settings or content creation!
  • 19. Gem #4: Document Commenting in CMS UI 19 “Comment on what you’re doing in collaboration with others!”
  • 20. Gem #4: Why Document Commenting Plugin*? ● Built-in Field UI Plugin to allow commenting among collaborators in Document Editor. ● Simple, cost-effective collaboration in document authoring and reviewing. ● No burden in document storage level as it’s stored separately. ● Highly extensible. 20* More at https://onehippo-forge.github.io/document-commenting/
  • 21. 21 Gem #4: Document Commenting Add a commenting field anywhere in a document type!
  • 22. 22 Gem #4: Document Commenting (cont.)
  • 23. Gem #4: Document Commenting (cont.) ● Very Extensible for different backends! 23 Document Commenting CMS UI Plugin <<interface>> CommentPersistence Manager* Default JCR CommentPersistence Manager Other Storage-based CommentPersistence Manager? * https://onehippo-forge.github.io/document-commenting/apidocs/org/onehippo/forge/document/commenting/cms/api/CommentPersistenceManager.html Only very simple 9 methods to implement! JCR ES? NoSQL?
  • 24. Gem #5: Live Version As-Of via HST Content Version Utils 24 “Show content in specific version, live as of December 6, 2017!”
  • 25. Gem #5: Why HST Content Version Utils*? ● Utility to retrieve JCR Version data through dynamic proxy of HST Content Beans, generated at runtime automatically. ○ Instead of low-level JCR Version API: VersionManager, Frozen Nodes, etc. ● No need to have separate Java code and FreeMarker templates. ○ Just stick with HST Content Beans API, even for versioned, frozen nodes. 25 * More at https://onehippo-forge.github.io/hst-content-version-utils/
  • 26. Gem #5: Live Version As-Of via HST Content Version Utils ● Retrieve a specific version of content using HST Content Beans API. ○ Dynamic proxying, and automatic link resolutions between versioned documents. ○ cf) JcrVersionUtils , HippoBeanVersionUtils (see javadoc for details) 26 HstRequestContext requestContext = RequestContextProvider.get(); // First, get the current live news document. News curNewsDoc = requestContext.getContentBean(); // Then let’s get the specific version, live as of December 6, 2017 if any. Calendar asOfDate = ISO8601.parse("2017-12-06T00:00:00-04:00"); News newsDocAsOf = HippoBeanVersionUtils.getVersionedBeanAsOf(news.getCanonicalHandlePath(), News.class, asOfDate); // Pass along the News (dynamically proxied) bean to template! request.setAttribute("document", newsDocAsOf);
  • 27. Gem #6: Spring Boot Deploy Support 27 “Package and deploy it onto PCF Cloud!”
  • 28. Gem #6: Why hipshoot Spring Boot Deploy Support*? ● Package a CMS project into single Spring Boot executable JAR. ○ Spring Boot is one of the best Framework for 12 Factor Apps (Cloud Native) development. ● Allow to deploy it to PCF (Pivotal Cloud Foundry) cloud env. ● Control the lifecycle of the application yourself. ○ E.g, environment initialization, Lucene index loading from storage, etc. 28 * https://onehippo-forge.github.io/hipshoot/
  • 29. Gem #6: Spring Boot Support Deploy Support 29 ● Build $ mvn clean verify ● Running Example $ java -Xms512m -Xmx1024m -Drepo.path="storage" -jar spring-boot-deploy/target/myhippoproject-deploy.jar ● Pushing Example to PCF (Pivotal Cloud Foundry) $ cf login -a https://api.run.pivotal.io $ cf push hippo-on-spring-boot -t 180 -f spring-boot-deploy/manifest.yml -p spring-boot-deploy/target/myhippoproject-deploy.jar
  • 30. Gem #6: What does hipshoot provide? 30 ● Extending TomcatEmbeddedServletContainerFactory ○ To support multi-wars packaging, JNDI resource configuration, etc. ● Demo project for details ○ https://github.com/woonsanko/hippo-on-spring-boot
  • 31. Gem #6: What does hipshoot provide? (cont.) 31 ● Example application.yaml with hipshoot configuration hipshoot: embedded: catalina: persistSession: 'false' appBase: '${server.tomcat.basedir}/webapps' wars: ${parameters.catalina.deployableWars} server: defaultContext: parameters: - name: 'repository-directory' value: '${catalina.base}/repository' override: 'false' # SNIP namingResources: - name: 'jdbc/repositoryDS' auth: 'Container' type: 'javax.sql.DataSource' properties: # SNIP
  • 32. Gem #6: Considering Lucene Index Rebuilding 32 ● Each cluster node needs local Lucene on each node. * Load Balancer Node 1 Node N DBMS Lucene Index on local FS Lucene Index on local FS Journal Global Revision Local Revision * https://wiki.apache.org/jackrabbit/Clustering
  • 33. Gem #6: Considering Lucene Index Rebuilding (cont.) 33 ● Solution Candidate * https://wiki.apache.org/jackrabbit/Clustering Node #N DBMS Lucene Index on local FS Journal Global Revision Local Revision S3, SFTP, WebDAV, ... Download and Restore Lucene Index From New Node Export and Backup Lucene Index From Existing Node Node #M
  • 34. Gem #6: Considering Lucene Index Rebuilding (cont.) 34 ● Solution Candidate, using Lucene Index Export/Import feature* (v12.1) * https://www.onehippo.org/library/administration/export-the-lucene-index-from-a-running-production-environment.html @SpringBootApplication @RestController public class Application { // --->8--- SNIP --->8--- @PostConstruct public void synchronizeLuceneIndex() { // 1. Check if local lucene index directory exists. // 2. If not existing, download the latest stable lucene export zip file. } @RequestMapping(path = "/backup-lucene-index") public String backupLuceneIndex() { // 1. Download lucene index export from https://{hostname}/cms/ws/indexexport. // 2. Backup to a cloud storage such as S3, SFTP, WebDAV, etc. } }
  • 35. Gem #7: Content HAL API 35 “Consume Content Right Away in your Apps!”
  • 36. Gem #7: Why Content HAL API*? ● Another Built-in Generic Content REST API based on HAL (Hypertext Application Language), a specification draft as a HATEOAS (Hypermedia as the Engine of Application State). ● Much easier, more performant and more extensible. 36 * More at https://tools.ietf.org/html/draft-kelly-json-hal-08 and http://stateless.co/hal_specification.html
  • 37. Gem #7: Content HAL API 37 ● What is HAL? ○ A specification draft for HATEOAS (Hypermedia as the Engine of Application State), a constraint of the REST application architecture. ○ Minimum Valid HAL Resource: an empty JSON object ○ Mostly, a resource SHOULD have a self link ("_links" is reserved): {} { "_links": { "self": { "href" : "/orders/523" } } }
  • 38. Gem #7: Content HAL API (cont.) 38 ● You can have domain specific links and properties: { "_links": { "self": { "href": "/orders/523" }, "invoice": { "href": "/invoices/873" } }, "currency": "USD", "status": "shipped", "total": 10.20 }
  • 39. Gem #7: Content HAL API (cont.) 39 ● You can embed other resources in "_embedded" that is reserved: { "_links": { "self": { "href": "/orders" } }, "_embedded": { "orders": [{ "_links": { "self": { "href": "/orders/523" } }, "total": 30.00 },{ "_links": { "self": { "href": "/orders/524" } }, "total": 20.00 }] } "currentlyProcessing": 14, "shippedToday": 20 }
  • 40. Gem #7: Content HAL API (cont.) 40 ● Better use logical field names which are already defined in Document Types!
  • 41. Gem #7: Content HAL API (cont.) 41 ● Better use logical field names which are already defined in Document Types! { "_links": { "self": { "href": "/site/api/events/b8f5eb45-7200-3118a0dc60b8" } }, "title": "Breakfast", "introduction": "Start the day with a nice breakfast.", "date": 1478292471762, "enddate": 1478292570000 }
  • 42. Gem #7: Content HAL API (cont.) 42 ● URL Patterns ○ Collection ■ /{type}/ ■ e.g. http://localhost:8080/site/api/documents , http://localhost:8080/site/api/folders , http://localhost:8080/site/api/newsdocument http://localhost:8080/site/api/resourcebundles ○ Item ■ /{type}/{id} or /{type}/{relPath} ■ e.g. http://localhost:8080/site/api/documents/{id }, http://localhost:8080/site/api/documents/{relPath }, http://localhost:8080/site/api/folders/{id }, http://localhost:8080/site/api/folders/{relPath }, http://localhost:8080/site/api/resourcebundles/{basename }
  • 43. Gem #7: Content HAL API (cont.) 43 ● Common Query Parameters Name Description Examples _scope Search scope node ID or path _scope=a_UUID or _scope=/content _offset Offset of the iterating query result _offset=10 _limit Limit of the iterating query result _limit=10 _fields Field names to include or exclude _fields=title,introduction,-content _sort Sort field names _sort=title,-date _q Full text search query term _q=lorem+ipsum _expr Custom JCR XPath expression to narrow the search result _expr=jcr:contains(@my:title,'hippo')
  • 44. Gem #7: Content HAL API (cont.) 44 ● Comparison with other options Content REST API HST Plain JAX-RS REST Content HAL API Standard Hippo Specific Custom HAL Specification Built-in Yes No Yes Chatty Communication Chatty Up to implementation Not Chatty (w/ option to be chatty) Logical Model Support No Yes Yes Need Java Beans No Yes No Extensible Yes No Yes
  • 46. Stay in Touch! ● www.onehippo.org ● slideshare.net/woonsan ● woonsanko.blogspot.com