SlideShare a Scribd company logo
N Hidden Gems You Didn't Know
Hippo Delivery Tier and Hippo Forge Could Give
Woonsan Ko
Solution Architect
w.ko @ onehippo.com
Sharing Information
● SlideShare.net/woonsan
● WoonsanKo.blogspot.com
OSS
Libraries
Forge
Plugins
Enterprise
Plugins
Around Hippo Delivery Tier
OSS*
Frameworks
More Hippo specific
More
feature-rich
* OSS: Open Source Software
OSS
Libraries
Forge
Plugins
Enterprise
Plugins
Around Hippo Delivery Tier
OSS*
Frameworks
More Hippo specific
More
feature-rich
Hippo
Delivery
Tier
* OSS: Open Source Software
OSS
Libraries
Forge
Plugins
Enterprise
Plugins
Around Hippo Delivery Tier
OSS*
Frameworks
More Hippo specific
More
feature-rich
Hippo
Delivery
Tier
* OSS: Open Source Software
Gems in Hippo Delivery Tier
Gems in Hippo Delivery Tier
#1 Fluent Query
“Made up with fluent style.
Don’t confuse me with the flats!”
Fluent Query
HstRequestContext requestContext = RequestContextProvider.get();
HstQueryManager qm = requestContext.getQueryManager();
HstQuery hstQuery = qm.createQuery(scope, BaseDocument.class);
hstQuery.setOffset(0);
hstQuery.setLimit(10);
hstQuery.addOrderByDescending("my:date");
Filter filter = hstQuery.createFilter();
filter.addContains(".", "hippo");
hstQuery.setFilter(filter);
HstQueryResult result = hstQuery.execute();
Old, Non-Fluent Style
HstRequestContext requestContext = RequestContextProvider.get();
HstQueryManager qm = requestContext.getQueryManager();
HstQuery hstQuery = qm.createQuery(scope, BaseDocument.class);
hstQuery.setOffset(0);
hstQuery.setLimit(10);
hstQuery.addOrderByDescending("my:date");
Filter filter = hstQuery.createFilter();
filter.addContains(".", "hippo");
hstQuery.setFilter(filter);
HstQueryResult result = hstQuery.execute();
Fluent Query
Filter filter = hstQuery.createFilter();
filter.addContains(".", "hippo");
Filter sub1 = hstQuery.createFilter();
sub1.addGreaterOrEqualThan("my:date", date, DAY);
filter.addAndFilter(sub1);
Filter sub2 = hstQuery.createFilter();
sub2.addEqualTo("my:createdBy", "editor1");
filter.addAndFilter(sub2);
Old, Non-Fluent Style
Nested Filter
Fluent Query
* More at https://www.onehippo.org/library/concepts/fluent-search/hst-fluent-search.html
New, Fluent Style
HstQuery hstQuery = HstQueryBuilder.create(scope) // varargs
.ofTypes(BaseDocument.class) // varargs
.where(constraint(".").contains("hippo")) // varargs
.offset(0)
.limit(10)
.orderByDescending("my:date") // varargs
.build();
HstQueryResult result = hstQuery.execute();
Fluent Query
HstQuery hstQuery = HstQueryBuilder.create(scope)
.ofTypes(BaseDocument.class)
.where(constraint(".").contains("hippo"))
.offset(0)
.limit(10)
.orderByDescending("my:date")
.build();
HstQueryResult result = hstQuery.execute();
.where(
and(
constraint(".").contains("hippo"),
constraint("my:date").greaterOrEqualThan(date, DAY),
constraint("my:createdBy").equalTo("editor1")
)
)
* More at https://www.onehippo.org/library/concepts/fluent-search/hst-fluent-search.html
New, Fluent Style
Nested Constraints
Gems in Hippo Delivery Tier
#2 HDC (Hierarchical
Diagnostic Context) API
“Determine performance problems faster!”
HDC API
● Lightweight performance diagnostic tool, for both SITE and CMS.
● Hierarchical Diagnostics Reporting on request processing:
- HstFilter (3011ms): {hostName=www.example.com, uri=/site/, query=null}
`- Pipeline processing (3002ms): {pipeline=null}
|- HstComponentInvokerProfiler (0ms): {method=doBeforeRender, window=main,
component=com.example.components.BaseComponent, ref=r46_r1}
|- HstComponentInvokerProfiler (471ms): {method=doBeforeRender, window=latestjobs,
component=com.example.components.common.LatestItems, ref=r46_r1_r1_r1,
HippoBeanIterationCount=1}
| `- query (466ms):
{statement=//*[(@hippo:paths='a5a24dd3-04a0-4ed1-a59a-ffc960ae69f2') and
(@hippo:availability='live') and ((@jcr:primaryType='hippogogreen:job'))] order by
@hippogogreen:closingdate descending}
...
HDC API
● Lightweight performance diagnostic tool, for both SITE and CMS.
● Hierarchical Diagnostics Reporting on request processing:
- HstFilter (3011ms): {hostName=www.example.com, uri=/site/, query=null}
`- Pipeline processing (3002ms): {pipeline=null}
|- HstComponentInvokerProfiler (0ms): {method=doBeforeRender, window=main,
component=com.example.components.BaseComponent, ref=r46_r1}
|- HstComponentInvokerProfiler (471ms): {method=doBeforeRender, window=latestjobs,
component=com.example.components.common.LatestItems, ref=r46_r1_r1_r1,
HippoBeanIterationCount=1}
| `- query (466ms):
{statement=//*[(@hippo:paths='a5a24dd3-04a0-4ed1-a59a-ffc960ae69f2') and
(@hippo:availability='live') and ((@jcr:primaryType='hippogogreen:job'))] order by
@hippogogreen:closingdate descending}
...
Runtime Configuration
HDC API
● What if I want to measure the performance of my own business logic?
* More at https://www.onehippo.org/library/concepts/request-handling/hst-page-diagnostics.html
// RelatedArticles.java
public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException {
// ...
List<Articles> articles = getRelatedArticlesIntelligently();
req.setAtttribute("articles", articles);
// ...
}
HDC API
● What if I want to measure the performance of my own business logic?
* More at https://www.onehippo.org/library/concepts/request-handling/hst-page-diagnostics.html
// RelatedArticles.java
public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException {
Task relDocsTask = null;
try {
if (HDC.isStarted()) relDocsTask = HDC.getCurrentTask().startSubtask("relDocs");
List<Articles> articles = getRelatedArticlesIntelligently();
req.setAtttribute("articles", articles);
relDocsTask.setAttribute("count", articles.size());
} finally {
if (relDocsTask != null) relDocsTask.stop();
}
}
HDC API
● What if I want to measure the performance of my own business logic?
// RelatedArticles.java
public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException {
Task relDocsTask = null;
try {
if (HDC.isStarted()) relDocsTask = HDC.getCurrentTask().startSubtask("relDocs");
List<Articles> articles = getRelatedArticlesIntelligently();
req.setAtttribute("articles", articles);
relDocsTask.setAttribute("count", articles.size());
} finally {
if (relDocsTask != null) relDocsTask.stop();
}
}
* More at https://www.onehippo.org/library/concepts/request-handling/hst-page-diagnostics.html
|- HstComponentInvokerProfiler (1235ms):
{component=c.e.c.RelatedArticles, ...}
| `- relDocs (1117ms): {count=330}
...
Outcome
Gems in Hippo Delivery Tier
#3 Spring Managed
HstComponent
“Cleaner with Real Dependency Injection!”
Spring Managed HstComponent
package com.example.components;
public class Search extends AbstractSearchComponent {
public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException {
// Manual look up the service component, 'catalogServiceBean' ...
CatalogService catService =
HstServices.getComponentManager().getComponent("catalogServiceBean");
request.setAttribute("item", catService.getItem(req.getParameter("pid")));
}
}
Old, Manual Style
Spring Managed HstComponent
package com.example.components;
@Component // for auto-scanning!
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) // "prototype" always!
@Service("com.example.components.Search") // FQCN as @Service!
public class Search extends AbstractSearchComponent {
@Autowired
private CatalogService catService;
public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException {
request.setAttribute("item", catService.getItem(req.getParameter("pid")));
}
}
New, Auto-wiring Style
● Annotation scanning on Spring managed HST Components
<!-- e.g. site/src/main/resources/META-INF/hst-assembly/overrides/base.xml-->
<!-- (HST)Components Annotation Scanning -->
<context:component-scan base-package="com.example.components" />
Spring Managed HstComponent
* More at https://www.onehippo.org/library/concepts/web-application/spring-managed-hst-components.html
● Special Attentions!
○ Always set @Scope to prototype!
○ Always set @Service to the FQCN of the component class!
Gems in Hippo Delivery Tier
#4 Asynchronous Rendering
“Better Render Later!”
● Client-side Asynchronous Rendering
○ E.g. A component accessing external services.
○ AJAX code, retrieving HST Component Rendering URL
● Server-side Asynchronous Rendering
○ E.g. A non-cacheable component in the server side.
○ ESI or SSI, retrieving HST Component Rendering URL
Asynchronous Component Rendering
<<header>>
<<footer>>
<<left>> <<content>>
<Store Locator>
● Client-side Asynchronous Component Rendering
○ @hst:async = true
Asynchronous Component Rendering
Browser
HST
Container
<<header>>
<<footer>>
<<left>> <<content>>
<Store Locator>
(1) HST Page Request
(5) HST Component
Rendering URL
(2) Default Pipeline
(6) HST Component
Rendering Pipeline
(3) Page(4) AJAX script seeded
(8) Component
Window Response
(7) Component
Window
● Server-side Asynchronous Component Rendering
○ @hst:async = true, @hst:asyncmode = "esi"
Asynchronous Component Rendering
* More at https://www.onehippo.org/library/concepts/component-development/asynchronous-hst-components-and-containers.html
Browser
HST
Container
(1) HST Page Request
<<header>>
<<footer>>
<<left>> <<content>>
<Store Locator>
(3) Default Pipeline
Page
Cache
(2) Get Page
ESI
Processor
(4) Page
(6) HST Component
Rendering Pipeline
(7) Component
Window
(5) Put Page
(8) Dynamically
Aggregated Page
HST ESI Processor
Browser ESI
Processor Dispatchable
local path
Page
Cache
<html>
<h1>Hello, World!</h1>
<!--esi:include src="/special..." -->
</html>
<div>Hi ${user}! Here’s a
special deal for you!</div>
<html>
<h1>Hello, World!</h1>
</html>
<div>Hi Hippo! Here’s a
special deal for you!</div>
HST HST
Component
● HST ESI Processor dispatches to . . .
a Component Rendering URL or Local URI Path (Servlet/JSP).
○ Note: HST ESI does NOT support Remote URLs for simplicity!
HST ESI Processor
● What if I want to include remote URLs using ESI tags?
○ APA Reverse Proxy Project:
■ Java Servlet or Filter library as Reverse Proxy
■ portals.apache.org/applications/webcontent2/reverse-proxy-module.html
○ Map Local Path to Remote URLs!
■ e.g. /site/products/ → http://example.com/products/ ,
/site/products/123 → http://example.com/products/123
* More at https://www.onehippo.org/library/concepts/web-application/hst-2-edge-side-includes-support.html
<!--esi:include src="/site/products/123" -->
Gems in Hippo Forge Projects
Gems in Hippo Forge Projects
#1 Integration with
External Content
“Link Document to External Content with Metadata
(e.g. in CMIS, Commerce, DB, … ).”
Integration with External Content
● External Document Picker Forge Plugin:
○ Concept: Separation of UI and Data Service.
■ UI Plugin
● UI for searching and displaying of external document item(s), retrieved by
ExternalDocumentServiceFacade component.
■ ExternalDocumentServiceFacade Data Service interface
● Configured for the UI Plugin; Invoked by the UI Plugin.
● All Data Handling under the hood against backend.
○ Title, icon and description for each external document.
○ Store metadata of selected item(s) into Hippo document.
* More at http://exdocpickerbase.forge.onehippo.org/
Integration with External Content
Integration with External Content
ExternalDocumentServiceFacade
is responsible for data to
display each item.
Integration with External Content
Again,
ExternalDocumentServiceFacade
is responsible for data to
display each selection.
Gems in Hippo Forge Projects
#2 Content EXIM
“Import Document / Binary Data to Hippo!”
Content EXIM
● Lightweight Library to EXport/IMport
Documents and Binaries to/from JSON or XML
● Uses Standard Hippo Workflow/Gallery APIs.
● Groovy Updater as primary execution engine
● Example Groovy Scripts to start with:
○ to export/import documents and image/assets.
○ to create documents from CSV.
○ to create image sets from image files.
* More at http://content-exim.forge.onehippo.org/
Content EXIM
Content EXIM
* More at http://content-exim.forge.onehippo.org/
Gems in Hippo Forge Projects
#3 Apache Camel Integration
“Synchronize Content with External System
through Enterprise Message Bus!”
Apache Camel Integration
● An example use case
Apache Camel Integration
● Apache Camel (camel.apache.org):
○ Lightweight framework for the Enterprise Integration Patterns
○ Production-ready components:
■ JMS, ActiveMQ, Kafka, File, SFTP, HTTP4, SQL, NoSQLs, ElasticSearch, XMPP, . . .
● Apache Camel Integration Forge:
○ Provides a Camel Component to consume Hippo Events (from Hippo Event Bus).
■ Component URI: hippoevent:
* More at http://camel-hippoevt.forge.onehippo.org/
<camelContext>
<route id="Route-HippoEventBus-to-Queue">
<from uri="hippoevent:?category=workflow&amp;action=publish,depublish" />
<convertBodyTo type="java.lang.String" />
<to uri="activemq:queue:hippo" />
</route>
</camelContext>
Gems in Hippo Forge Projects
#4 Spring Security Integration
“Secure My Services through JWT, SAML or OAuth!”
Spring Security Integration
● Spring Security Framework:
○ Powerful and highly customizable authentication and access-control framework.
○ Basic Auth, Spring Security SAML, Spring Security OAuth, etc.
● HST Spring Security Framework Integration Forge adds:
○ Hippo Authentication Provider with Hippo UserDetailsService.
○ Spring Security Valve injected in HST pipeline.
■ Sitemap Item with @hst:authenticated, @hst:roles, @hst:users.
■ JAX-RS Services with JEE Security Annotations such as @RolesAllowed.
* More at http://hst-springsec.forge.onehippo.org/
OSS
Libraries
Forge
Plugins
Enterprise
Plugins
Gems in Summary
OSS*
Frameworks
More Hippo specific
More
feature-rich
Hippo
Delivery
Tier
* OSS: Open Source Software
OSS
Libraries
Forge
Plugins
Enterprise
Plugins
Gems in Summary
OSS*
Frameworks
More Hippo specific
More
feature-rich
Hippo
Delivery
Tier
● Delivery Tier
○ HST Fluent Query
○ HDC
○ Spring Managed Components
○ Async Components
■ HST ESI Processor
* OSS: Open Source Software
OSS
Libraries
Forge
Plugins
Enterprise
Plugins
Gems in Summary
OSS*
Frameworks
More Hippo specific
More
feature-rich
Hippo
Delivery
Tier
● Delivery Tier
○ HST Fluent Query
○ HDC
○ Spring Managed Components
○ Async Components
■ HST ESI Processor
● Forges
○ External Document Picker
○ Content EXIM
○ Apache Camel Integration
○ Spring Security Integration
* OSS: Open Source Software
Stay in Touch
NORTH AMERICA
71 Summer Street
Boston, MA 02110
USA
EUROPE
Oosteinde 11
1017 WT Amsterdam
The Netherlands
CALL US
+31 20 522 44 66
+44 20 35 14 99 60
+49 69 80 88 40 67
+1 877 414 47 76
WEB & EMAIL
www.onehippo.com
sales@onehippo.com
● SlideShare.net/woonsan
● WoonsanKo.blogspot.com

More Related Content

What's hot

Web Scrapping with Python
Web Scrapping with PythonWeb Scrapping with Python
Web Scrapping with Python
Miguel Miranda de Mattos
 
How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...
How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...
How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...
Anton
 
Downloading the internet with Python + Scrapy
Downloading the internet with Python + ScrapyDownloading the internet with Python + Scrapy
Downloading the internet with Python + Scrapy
Erin Shellman
 
Web Scraping with Python
Web Scraping with PythonWeb Scraping with Python
Web Scraping with Python
Paul Schreiber
 
Pydata-Python tools for webscraping
Pydata-Python tools for webscrapingPydata-Python tools for webscraping
Pydata-Python tools for webscraping
Jose Manuel Ortega Candel
 
ElasticSearch
ElasticSearchElasticSearch
ElasticSearch
Luiz Rocha
 
第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディングnobu_k
 
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
Jeongkyu Shin
 
Selenium&amp;scrapy
Selenium&amp;scrapySelenium&amp;scrapy
Selenium&amp;scrapy
Arcangelo Saracino
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
Remy Sharp
 
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
 
How to scraping content from web for location-based mobile app.
How to scraping content from web for location-based mobile app.How to scraping content from web for location-based mobile app.
How to scraping content from web for location-based mobile app.Diep Nguyen
 
Elk stack @inbot
Elk stack @inbotElk stack @inbot
Elk stack @inbot
Jilles van Gurp
 
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
Peter Friese
 
Introducing CouchDB
Introducing CouchDBIntroducing CouchDB
Introducing CouchDB
Hatem Ben Yacoub
 
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
WorkFlow:  An Inquiry Into Productivity by Timothy BoltonWorkFlow:  An Inquiry Into Productivity by Timothy Bolton
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
Miva
 
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Replacing Oracle with MongoDB for a templating application at the Bavarian go...Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Comsysto Reply GmbH
 
MongoDB Munich 2012: MongoDB for official documents in Bavaria
MongoDB Munich 2012: MongoDB for official documents in BavariaMongoDB Munich 2012: MongoDB for official documents in Bavaria
MongoDB Munich 2012: MongoDB for official documents in Bavaria
MongoDB
 

What's hot (19)

Web Scrapping with Python
Web Scrapping with PythonWeb Scrapping with Python
Web Scrapping with Python
 
How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...
How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...
How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...
 
Downloading the internet with Python + Scrapy
Downloading the internet with Python + ScrapyDownloading the internet with Python + Scrapy
Downloading the internet with Python + Scrapy
 
Web Scraping with Python
Web Scraping with PythonWeb Scraping with Python
Web Scraping with Python
 
Pydata-Python tools for webscraping
Pydata-Python tools for webscrapingPydata-Python tools for webscraping
Pydata-Python tools for webscraping
 
ElasticSearch
ElasticSearchElasticSearch
ElasticSearch
 
第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング
 
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
 
Selenium&amp;scrapy
Selenium&amp;scrapySelenium&amp;scrapy
Selenium&amp;scrapy
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
 
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)
 
How to scraping content from web for location-based mobile app.
How to scraping content from web for location-based mobile app.How to scraping content from web for location-based mobile app.
How to scraping content from web for location-based mobile app.
 
Elk stack @inbot
Elk stack @inbotElk stack @inbot
Elk stack @inbot
 
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
 
Introducing CouchDB
Introducing CouchDBIntroducing CouchDB
Introducing CouchDB
 
Lumberjack XPath 101
Lumberjack XPath 101Lumberjack XPath 101
Lumberjack XPath 101
 
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
WorkFlow:  An Inquiry Into Productivity by Timothy BoltonWorkFlow:  An Inquiry Into Productivity by Timothy Bolton
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
 
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Replacing Oracle with MongoDB for a templating application at the Bavarian go...Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
 
MongoDB Munich 2012: MongoDB for official documents in Bavaria
MongoDB Munich 2012: MongoDB for official documents in BavariaMongoDB Munich 2012: MongoDB for official documents in Bavaria
MongoDB Munich 2012: MongoDB for official documents in Bavaria
 

Similar to N hidden gems you didn't know hippo delivery tier and hippo (forge) could give

Azure Functions @ global azure day 2017
Azure Functions  @ global azure day 2017Azure Functions  @ global azure day 2017
Azure Functions @ global azure day 2017
Sean Feldman
 
Make BDD great again
Make BDD great againMake BDD great again
Make BDD great again
Yana Gusti
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
Skills Matter
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen LjuSkills Matter
 
nodejs_at_a_glance.ppt
nodejs_at_a_glance.pptnodejs_at_a_glance.ppt
nodejs_at_a_glance.ppt
WalaSidhom1
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST API
Caldera Labs
 
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Arun Gupta
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component libraryMax Katz
 
Angular - Improve Runtime performance 2019
Angular - Improve Runtime performance 2019Angular - Improve Runtime performance 2019
Angular - Improve Runtime performance 2019
Eliran Eliassy
 
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
James Titcumb
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Pantheon
 
Unit Testing from Setup to Deployment
Unit Testing from Setup to DeploymentUnit Testing from Setup to Deployment
Unit Testing from Setup to Deployment
Mark Niebergall
 
Saving Time And Effort With QuickBase Api - Sergio Haro
Saving Time And Effort With QuickBase Api - Sergio HaroSaving Time And Effort With QuickBase Api - Sergio Haro
Saving Time And Effort With QuickBase Api - Sergio Haro
QuickBase, Inc.
 
HTML5: huh, what is it good for?
HTML5: huh, what is it good for?HTML5: huh, what is it good for?
HTML5: huh, what is it good for?Remy Sharp
 
4.2 PHP Function
4.2 PHP Function4.2 PHP Function
4.2 PHP Function
Jalpesh Vasa
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Arun Gupta
 
GraphConnect 2014 SF: From Zero to Graph in 120: Scale
GraphConnect 2014 SF: From Zero to Graph in 120: ScaleGraphConnect 2014 SF: From Zero to Graph in 120: Scale
GraphConnect 2014 SF: From Zero to Graph in 120: Scale
Neo4j
 
Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...
Red Hat Developers
 
Logstash
LogstashLogstash
Logstash
琛琳 饶
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
Hiroshi SHIBATA
 

Similar to N hidden gems you didn't know hippo delivery tier and hippo (forge) could give (20)

Azure Functions @ global azure day 2017
Azure Functions  @ global azure day 2017Azure Functions  @ global azure day 2017
Azure Functions @ global azure day 2017
 
Make BDD great again
Make BDD great againMake BDD great again
Make BDD great again
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
nodejs_at_a_glance.ppt
nodejs_at_a_glance.pptnodejs_at_a_glance.ppt
nodejs_at_a_glance.ppt
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST API
 
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
 
Angular - Improve Runtime performance 2019
Angular - Improve Runtime performance 2019Angular - Improve Runtime performance 2019
Angular - Improve Runtime performance 2019
 
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
 
Unit Testing from Setup to Deployment
Unit Testing from Setup to DeploymentUnit Testing from Setup to Deployment
Unit Testing from Setup to Deployment
 
Saving Time And Effort With QuickBase Api - Sergio Haro
Saving Time And Effort With QuickBase Api - Sergio HaroSaving Time And Effort With QuickBase Api - Sergio Haro
Saving Time And Effort With QuickBase Api - Sergio Haro
 
HTML5: huh, what is it good for?
HTML5: huh, what is it good for?HTML5: huh, what is it good for?
HTML5: huh, what is it good for?
 
4.2 PHP Function
4.2 PHP Function4.2 PHP Function
4.2 PHP Function
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 
GraphConnect 2014 SF: From Zero to Graph in 120: Scale
GraphConnect 2014 SF: From Zero to Graph in 120: ScaleGraphConnect 2014 SF: From Zero to Graph in 120: Scale
GraphConnect 2014 SF: From Zero to Graph in 120: Scale
 
Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...
 
Logstash
LogstashLogstash
Logstash
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
 

Recently uploaded

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 

N hidden gems you didn't know hippo delivery tier and hippo (forge) could give

  • 1. N Hidden Gems You Didn't Know Hippo Delivery Tier and Hippo Forge Could Give Woonsan Ko Solution Architect w.ko @ onehippo.com
  • 3. OSS Libraries Forge Plugins Enterprise Plugins Around Hippo Delivery Tier OSS* Frameworks More Hippo specific More feature-rich * OSS: Open Source Software
  • 4. OSS Libraries Forge Plugins Enterprise Plugins Around Hippo Delivery Tier OSS* Frameworks More Hippo specific More feature-rich Hippo Delivery Tier * OSS: Open Source Software
  • 5. OSS Libraries Forge Plugins Enterprise Plugins Around Hippo Delivery Tier OSS* Frameworks More Hippo specific More feature-rich Hippo Delivery Tier * OSS: Open Source Software
  • 6. Gems in Hippo Delivery Tier
  • 7. Gems in Hippo Delivery Tier #1 Fluent Query “Made up with fluent style. Don’t confuse me with the flats!”
  • 8. Fluent Query HstRequestContext requestContext = RequestContextProvider.get(); HstQueryManager qm = requestContext.getQueryManager(); HstQuery hstQuery = qm.createQuery(scope, BaseDocument.class); hstQuery.setOffset(0); hstQuery.setLimit(10); hstQuery.addOrderByDescending("my:date"); Filter filter = hstQuery.createFilter(); filter.addContains(".", "hippo"); hstQuery.setFilter(filter); HstQueryResult result = hstQuery.execute(); Old, Non-Fluent Style
  • 9. HstRequestContext requestContext = RequestContextProvider.get(); HstQueryManager qm = requestContext.getQueryManager(); HstQuery hstQuery = qm.createQuery(scope, BaseDocument.class); hstQuery.setOffset(0); hstQuery.setLimit(10); hstQuery.addOrderByDescending("my:date"); Filter filter = hstQuery.createFilter(); filter.addContains(".", "hippo"); hstQuery.setFilter(filter); HstQueryResult result = hstQuery.execute(); Fluent Query Filter filter = hstQuery.createFilter(); filter.addContains(".", "hippo"); Filter sub1 = hstQuery.createFilter(); sub1.addGreaterOrEqualThan("my:date", date, DAY); filter.addAndFilter(sub1); Filter sub2 = hstQuery.createFilter(); sub2.addEqualTo("my:createdBy", "editor1"); filter.addAndFilter(sub2); Old, Non-Fluent Style Nested Filter
  • 10. Fluent Query * More at https://www.onehippo.org/library/concepts/fluent-search/hst-fluent-search.html New, Fluent Style HstQuery hstQuery = HstQueryBuilder.create(scope) // varargs .ofTypes(BaseDocument.class) // varargs .where(constraint(".").contains("hippo")) // varargs .offset(0) .limit(10) .orderByDescending("my:date") // varargs .build(); HstQueryResult result = hstQuery.execute();
  • 11. Fluent Query HstQuery hstQuery = HstQueryBuilder.create(scope) .ofTypes(BaseDocument.class) .where(constraint(".").contains("hippo")) .offset(0) .limit(10) .orderByDescending("my:date") .build(); HstQueryResult result = hstQuery.execute(); .where( and( constraint(".").contains("hippo"), constraint("my:date").greaterOrEqualThan(date, DAY), constraint("my:createdBy").equalTo("editor1") ) ) * More at https://www.onehippo.org/library/concepts/fluent-search/hst-fluent-search.html New, Fluent Style Nested Constraints
  • 12. Gems in Hippo Delivery Tier #2 HDC (Hierarchical Diagnostic Context) API “Determine performance problems faster!”
  • 13. HDC API ● Lightweight performance diagnostic tool, for both SITE and CMS. ● Hierarchical Diagnostics Reporting on request processing: - HstFilter (3011ms): {hostName=www.example.com, uri=/site/, query=null} `- Pipeline processing (3002ms): {pipeline=null} |- HstComponentInvokerProfiler (0ms): {method=doBeforeRender, window=main, component=com.example.components.BaseComponent, ref=r46_r1} |- HstComponentInvokerProfiler (471ms): {method=doBeforeRender, window=latestjobs, component=com.example.components.common.LatestItems, ref=r46_r1_r1_r1, HippoBeanIterationCount=1} | `- query (466ms): {statement=//*[(@hippo:paths='a5a24dd3-04a0-4ed1-a59a-ffc960ae69f2') and (@hippo:availability='live') and ((@jcr:primaryType='hippogogreen:job'))] order by @hippogogreen:closingdate descending} ...
  • 14. HDC API ● Lightweight performance diagnostic tool, for both SITE and CMS. ● Hierarchical Diagnostics Reporting on request processing: - HstFilter (3011ms): {hostName=www.example.com, uri=/site/, query=null} `- Pipeline processing (3002ms): {pipeline=null} |- HstComponentInvokerProfiler (0ms): {method=doBeforeRender, window=main, component=com.example.components.BaseComponent, ref=r46_r1} |- HstComponentInvokerProfiler (471ms): {method=doBeforeRender, window=latestjobs, component=com.example.components.common.LatestItems, ref=r46_r1_r1_r1, HippoBeanIterationCount=1} | `- query (466ms): {statement=//*[(@hippo:paths='a5a24dd3-04a0-4ed1-a59a-ffc960ae69f2') and (@hippo:availability='live') and ((@jcr:primaryType='hippogogreen:job'))] order by @hippogogreen:closingdate descending} ... Runtime Configuration
  • 15. HDC API ● What if I want to measure the performance of my own business logic? * More at https://www.onehippo.org/library/concepts/request-handling/hst-page-diagnostics.html // RelatedArticles.java public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException { // ... List<Articles> articles = getRelatedArticlesIntelligently(); req.setAtttribute("articles", articles); // ... }
  • 16. HDC API ● What if I want to measure the performance of my own business logic? * More at https://www.onehippo.org/library/concepts/request-handling/hst-page-diagnostics.html // RelatedArticles.java public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException { Task relDocsTask = null; try { if (HDC.isStarted()) relDocsTask = HDC.getCurrentTask().startSubtask("relDocs"); List<Articles> articles = getRelatedArticlesIntelligently(); req.setAtttribute("articles", articles); relDocsTask.setAttribute("count", articles.size()); } finally { if (relDocsTask != null) relDocsTask.stop(); } }
  • 17. HDC API ● What if I want to measure the performance of my own business logic? // RelatedArticles.java public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException { Task relDocsTask = null; try { if (HDC.isStarted()) relDocsTask = HDC.getCurrentTask().startSubtask("relDocs"); List<Articles> articles = getRelatedArticlesIntelligently(); req.setAtttribute("articles", articles); relDocsTask.setAttribute("count", articles.size()); } finally { if (relDocsTask != null) relDocsTask.stop(); } } * More at https://www.onehippo.org/library/concepts/request-handling/hst-page-diagnostics.html |- HstComponentInvokerProfiler (1235ms): {component=c.e.c.RelatedArticles, ...} | `- relDocs (1117ms): {count=330} ... Outcome
  • 18. Gems in Hippo Delivery Tier #3 Spring Managed HstComponent “Cleaner with Real Dependency Injection!”
  • 19. Spring Managed HstComponent package com.example.components; public class Search extends AbstractSearchComponent { public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException { // Manual look up the service component, 'catalogServiceBean' ... CatalogService catService = HstServices.getComponentManager().getComponent("catalogServiceBean"); request.setAttribute("item", catService.getItem(req.getParameter("pid"))); } } Old, Manual Style
  • 20. Spring Managed HstComponent package com.example.components; @Component // for auto-scanning! @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) // "prototype" always! @Service("com.example.components.Search") // FQCN as @Service! public class Search extends AbstractSearchComponent { @Autowired private CatalogService catService; public void doBeforeRender(HstRequest req, HstResponse res) throws HstComponentException { request.setAttribute("item", catService.getItem(req.getParameter("pid"))); } } New, Auto-wiring Style
  • 21. ● Annotation scanning on Spring managed HST Components <!-- e.g. site/src/main/resources/META-INF/hst-assembly/overrides/base.xml--> <!-- (HST)Components Annotation Scanning --> <context:component-scan base-package="com.example.components" /> Spring Managed HstComponent * More at https://www.onehippo.org/library/concepts/web-application/spring-managed-hst-components.html ● Special Attentions! ○ Always set @Scope to prototype! ○ Always set @Service to the FQCN of the component class!
  • 22. Gems in Hippo Delivery Tier #4 Asynchronous Rendering “Better Render Later!”
  • 23. ● Client-side Asynchronous Rendering ○ E.g. A component accessing external services. ○ AJAX code, retrieving HST Component Rendering URL ● Server-side Asynchronous Rendering ○ E.g. A non-cacheable component in the server side. ○ ESI or SSI, retrieving HST Component Rendering URL Asynchronous Component Rendering <<header>> <<footer>> <<left>> <<content>> <Store Locator>
  • 24. ● Client-side Asynchronous Component Rendering ○ @hst:async = true Asynchronous Component Rendering Browser HST Container <<header>> <<footer>> <<left>> <<content>> <Store Locator> (1) HST Page Request (5) HST Component Rendering URL (2) Default Pipeline (6) HST Component Rendering Pipeline (3) Page(4) AJAX script seeded (8) Component Window Response (7) Component Window
  • 25. ● Server-side Asynchronous Component Rendering ○ @hst:async = true, @hst:asyncmode = "esi" Asynchronous Component Rendering * More at https://www.onehippo.org/library/concepts/component-development/asynchronous-hst-components-and-containers.html Browser HST Container (1) HST Page Request <<header>> <<footer>> <<left>> <<content>> <Store Locator> (3) Default Pipeline Page Cache (2) Get Page ESI Processor (4) Page (6) HST Component Rendering Pipeline (7) Component Window (5) Put Page (8) Dynamically Aggregated Page
  • 26. HST ESI Processor Browser ESI Processor Dispatchable local path Page Cache <html> <h1>Hello, World!</h1> <!--esi:include src="/special..." --> </html> <div>Hi ${user}! Here’s a special deal for you!</div> <html> <h1>Hello, World!</h1> </html> <div>Hi Hippo! Here’s a special deal for you!</div> HST HST Component ● HST ESI Processor dispatches to . . . a Component Rendering URL or Local URI Path (Servlet/JSP). ○ Note: HST ESI does NOT support Remote URLs for simplicity!
  • 27. HST ESI Processor ● What if I want to include remote URLs using ESI tags? ○ APA Reverse Proxy Project: ■ Java Servlet or Filter library as Reverse Proxy ■ portals.apache.org/applications/webcontent2/reverse-proxy-module.html ○ Map Local Path to Remote URLs! ■ e.g. /site/products/ → http://example.com/products/ , /site/products/123 → http://example.com/products/123 * More at https://www.onehippo.org/library/concepts/web-application/hst-2-edge-side-includes-support.html <!--esi:include src="/site/products/123" -->
  • 28. Gems in Hippo Forge Projects
  • 29. Gems in Hippo Forge Projects #1 Integration with External Content “Link Document to External Content with Metadata (e.g. in CMIS, Commerce, DB, … ).”
  • 30. Integration with External Content ● External Document Picker Forge Plugin: ○ Concept: Separation of UI and Data Service. ■ UI Plugin ● UI for searching and displaying of external document item(s), retrieved by ExternalDocumentServiceFacade component. ■ ExternalDocumentServiceFacade Data Service interface ● Configured for the UI Plugin; Invoked by the UI Plugin. ● All Data Handling under the hood against backend. ○ Title, icon and description for each external document. ○ Store metadata of selected item(s) into Hippo document. * More at http://exdocpickerbase.forge.onehippo.org/
  • 32. Integration with External Content ExternalDocumentServiceFacade is responsible for data to display each item.
  • 33. Integration with External Content Again, ExternalDocumentServiceFacade is responsible for data to display each selection.
  • 34. Gems in Hippo Forge Projects #2 Content EXIM “Import Document / Binary Data to Hippo!”
  • 35. Content EXIM ● Lightweight Library to EXport/IMport Documents and Binaries to/from JSON or XML ● Uses Standard Hippo Workflow/Gallery APIs. ● Groovy Updater as primary execution engine ● Example Groovy Scripts to start with: ○ to export/import documents and image/assets. ○ to create documents from CSV. ○ to create image sets from image files. * More at http://content-exim.forge.onehippo.org/
  • 37. Content EXIM * More at http://content-exim.forge.onehippo.org/
  • 38. Gems in Hippo Forge Projects #3 Apache Camel Integration “Synchronize Content with External System through Enterprise Message Bus!”
  • 39. Apache Camel Integration ● An example use case
  • 40. Apache Camel Integration ● Apache Camel (camel.apache.org): ○ Lightweight framework for the Enterprise Integration Patterns ○ Production-ready components: ■ JMS, ActiveMQ, Kafka, File, SFTP, HTTP4, SQL, NoSQLs, ElasticSearch, XMPP, . . . ● Apache Camel Integration Forge: ○ Provides a Camel Component to consume Hippo Events (from Hippo Event Bus). ■ Component URI: hippoevent: * More at http://camel-hippoevt.forge.onehippo.org/ <camelContext> <route id="Route-HippoEventBus-to-Queue"> <from uri="hippoevent:?category=workflow&amp;action=publish,depublish" /> <convertBodyTo type="java.lang.String" /> <to uri="activemq:queue:hippo" /> </route> </camelContext>
  • 41. Gems in Hippo Forge Projects #4 Spring Security Integration “Secure My Services through JWT, SAML or OAuth!”
  • 42. Spring Security Integration ● Spring Security Framework: ○ Powerful and highly customizable authentication and access-control framework. ○ Basic Auth, Spring Security SAML, Spring Security OAuth, etc. ● HST Spring Security Framework Integration Forge adds: ○ Hippo Authentication Provider with Hippo UserDetailsService. ○ Spring Security Valve injected in HST pipeline. ■ Sitemap Item with @hst:authenticated, @hst:roles, @hst:users. ■ JAX-RS Services with JEE Security Annotations such as @RolesAllowed. * More at http://hst-springsec.forge.onehippo.org/
  • 43. OSS Libraries Forge Plugins Enterprise Plugins Gems in Summary OSS* Frameworks More Hippo specific More feature-rich Hippo Delivery Tier * OSS: Open Source Software
  • 44. OSS Libraries Forge Plugins Enterprise Plugins Gems in Summary OSS* Frameworks More Hippo specific More feature-rich Hippo Delivery Tier ● Delivery Tier ○ HST Fluent Query ○ HDC ○ Spring Managed Components ○ Async Components ■ HST ESI Processor * OSS: Open Source Software
  • 45. OSS Libraries Forge Plugins Enterprise Plugins Gems in Summary OSS* Frameworks More Hippo specific More feature-rich Hippo Delivery Tier ● Delivery Tier ○ HST Fluent Query ○ HDC ○ Spring Managed Components ○ Async Components ■ HST ESI Processor ● Forges ○ External Document Picker ○ Content EXIM ○ Apache Camel Integration ○ Spring Security Integration * OSS: Open Source Software
  • 46. Stay in Touch NORTH AMERICA 71 Summer Street Boston, MA 02110 USA EUROPE Oosteinde 11 1017 WT Amsterdam The Netherlands CALL US +31 20 522 44 66 +44 20 35 14 99 60 +49 69 80 88 40 67 +1 877 414 47 76 WEB & EMAIL www.onehippo.com sales@onehippo.com ● SlideShare.net/woonsan ● WoonsanKo.blogspot.com