SlideShare a Scribd company logo
1 of 57
Download to read offline
Leveraging OSGi to Create
Extensible Plugins for Liferay 6.2
Eduardo García edupgv@
Julio Camarero juliocamarero@
Core Engineers at Liferay, Inc
Milen Dyankov milendyankov@
Senior Consultant at Liferay, Inc
OSGi is about
modularity
... and Liferay already
allowed for
modularity ...
PortletsPortlets
HooksHooks
ThemesThemes
LayoutsLayouts
......
... but modules are
not modular !!!
OSGi brings into
Liferay
modularity of
modules !!!
...
Microservices
Supported in
Liferay marketplace
Let’s see an example…
A Shipping Cost Calculator
https://github.com/epgarcia/liferay-plugins/commits/LRNAS2014.OSGI
final price
common features
for all countries
specific features
for each country
we could…
Develop a very complex and
laborious application that
covers all possible cases
Release a new version every
time any shipping cost
algorithm changes or we add
new countries
Develop a simple core application
that covers only the common features
Make the application extensible
with country modules“ ”
If a shipping algorithm changes,
our core application remains
the same and only that specific
extension must be changed
will be the future of all
Liferay 7 applications ...
... because it’s all advantages!
improves
maintainability
maximizes
reusability
simplification of
releases
(independent)
new market
opportunities
(extensions)
App
ver. 1
App
ver. 2
App
ver. 3
time
size
...
App
ver. 1
App
ver. 2
time
size
...
ext 1
ver. 1
ext 1
ver. 2
ext 1
ver. 3
ext 2
ver. 3
ext 2
ver. 1
ext 2
ver. 2
ext 3
ver. 1
ext 1
ver. 4
ext 3
ver. 2
But OSGi makes this
possible already in
Liferay 6.2 !
In fact, Audience Targeting,
the first Liferay 6.2 application
following this approach, is already
available on Marketplace!
Sounds great,
but I have no idea
about OSGi…
OSGi basic concepts
in 3 minutes!
(or what you need to understand
before we continue)
OSGi bundles
(this is what our plug-ins are)
manifestmanifestmanifestmanifest manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Shipping Impl
Bundle-SymbolicName: com.liferay.shipping.impl
Bundle-Vendor: Liferay, Inc.
Bundle-Version: 1.0.0
Private-Package: com.liferay.shipping.impl.model,com.liferay.shipping.impl.util
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"
. . .
#1
#1 OSGi bundles
(this is what our plug-ins are)
manifestmanifestmanifestmanifest manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Shipping Impl
Bundle-SymbolicName: com.liferay.shipping.impl
Bundle-Vendor: Liferay, Inc.
Bundle-Version: 1.0.0
Private-Package: com.liferay.shipping.impl.model,com.liferay.shipping.impl.util
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"
. . .
All modern build tools (Ant, Maven, Gradle, ...)
can build OSGi bundles!
So can Liferay SDK !
Package dependencies
(this is how we describe what we provide and expect)
Import-Package:
com.liferay.shipping.api.model,
com.liferay.shipping.api.util,
com.liferay.portal.kernel.io.unsync;resolution:=optional,
com.liferay.portal.kernel.util;resolution:=optional,
freemarker.cache;resolution:=optional,
freemarker.template;resolution:=optional
Export-Package:
com.liferay.shipping.api.model;version="1.0.0",
com.liferay.shipping.api.util;version="1.0.0"
manifestmanifestmanifestmanifest manifest
EXPORT EXPORT
#2
manifestmanifestmanifestmanifest manifest
EXPORT EXPORT
Package dependencies
(this is how we describe what we provide and expect)
Import-Package:
com.liferay.shipping.api.model,
com.liferay.shipping.api.util,
com.liferay.portal.kernel.io.unsync;resolution:=optional,
com.liferay.portal.kernel.util;resolution:=optional,
freemarker.cache;resolution:=optional,
freemarker.template;resolution:=optional
Export-Package:
com.liferay.shipping.api.model;version="1.0.0",
com.liferay.shipping.api.util;version="1.0.0"
#2
#2
manifestmanifestmanifestmanifest manifest
EXPORT EXPORT
Package dependencies
(this is how we describe what we provide and expect)
Import-Package:
com.liferay.shipping.api.model,
com.liferay.shipping.api.util,
com.liferay.portal.kernel.io.unsync;resolution:=optional,
com.liferay.portal.kernel.util;resolution:=optional,
freemarker.cache;resolution:=optional,
freemarker.template;resolution:=optional
Export-Package:
com.liferay.shipping.api.model;version="1.0.0",
com.liferay.shipping.api.util;version="1.0.0"
The BND tool (bnd.bndtools.org) can discover dependencies
and automatically generate export/import manifest headers!
Liferay SDK also allows you to use BND tool!
OSGi services
(this is how we provide and consume functionality)
manifestmanifestmanifest manifest
OSGi service registry
Interface
Service 1
...
Service N
#3
OSGi services
(this is how we provide and consume functionality)
manifestmanifestmanifest
OSGi service registry
Interface
Service 1
...
Service N
REGISTER
REGISTER
USE
manifest
#3
#3 OSGi services
(this is how we provide and consume functionality)
manifestmanifestmanifest
OSGi service registry
Interface
Service 1
...
Service N
REGISTER
REGISTER
USE
manifest
There are number of component frameworks on top of OSGi
(Declarative Services and Blueprint being part of the specs)
which greatly simplify the usage of services!
Sounds great,
but how OSGi fits
into Liferay ?
Application server / Servlet container
Liferay 6.2
Liferay CORE
Portlet Portlet...
Application server / Servlet container
Liferay 6.2
Portlet application
Portlet application
Portlet application
Portlet application
Liferay CORE
Portlet Portlet...
Application server / Servlet container
Liferay 6.2
Portlet application
Portlet application
Portlet application
Portlet application
Liferay CORE
Portlet Portlet
OSGi container
...
Application server / Servlet container
Liferay 6.2
Portlet application
Portlet application
Portlet application
Portlet application
Liferay CORE
Portlet Portlet
OSGi container
OSGi core services
HTTP Service Configuration Admin Service
...
...
Liferay core OSGi services
Application server / Servlet container
Liferay 6.2
Portlet application
Portlet application
Portlet application
Portlet application
Liferay CORE
Portlet Portlet
OSGi container
API Bundle
API Bundle
Service Bundle
Extension bundle
Service Bundle
Portlet Bundle
Extension Bundle
Portlet Bundle
OSGi core services
HTTP Service Configuration Admin Service
...
...
Liferay core OSGi services
Application server / Servlet container
Liferay 6.2
Portlet application
Portlet application
Portlet application
Portlet application
Liferay CORE
Portlet Portlet
OSGi container
API Bundle
API Bundle
Service Bundle
Extension bundle
Service Bundle
Portlet Bundle
Extension Bundle
Portlet Bundle
OSGi core services
HTTP Service Configuration Admin Service
...
...
Liferay core OSGi services
In Liferay 6.2 portlets inside OSGi
container have certain limitations!
shipping-api
shipping-impl
shipping-web
Shipping application
shipping-extension-europe
shipping-extension-usa
Shipping application
extensions
Shipping application modules (bundles)
There is an extra step in Liferay 6.2
as not all dependencies are
provided!
You will NOT need to do this in
Liferay 7!
#0 Shipping application modules (bundles)
#1 Shipping application modules (bundles)
#1 Shipping application modules (bundles)
#1 Shipping application modules (bundles)
#2 Shipping application modules (bundles)
#2 Shipping application modules (bundles)
#2 Shipping application modules (bundles)
#2 Shipping application modules (bundles)
#2 Shipping application modules (bundles)
#3 Shipping application modules (bundles)
This approach is for Liferay 6.2 only !
It will change in Liferay 7 !
This approach is for Liferay 6.2 only !
It will change in Liferay 7 !
#3 Shipping application modules (bundles)
Our main application
is ready!
Let's try it !
#4 Shipping application modules (bundles)
#4 Shipping application modules (bundles)
Let's try it !
#5 Shipping application modules (bundles)
#5 Shipping application modules (bundles)
Let's try it !
Where you go from
here?
Send feedback!
Build your own OSGi modules
Learn more about OSGi
Try the samples yourself
https://github.com/epgarcia/liferay-plugins/commits/LRNAS2014.OSGI
Thank you!
milen.dyankov@liferay.com
http://www.liferay.com/web/milen.dyankov/
@milendyankov
@LiferayPL
http://www.liferay.com
@Liferay
http://www.facebook.com/Liferay

More Related Content

What's hot

01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferaydaveayan
 
Liferay portal – moving beyond content management
Liferay portal – moving beyond content managementLiferay portal – moving beyond content management
Liferay portal – moving beyond content managementAmbientia
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projectsIBACZ
 
Liferay Developer Best Practices for a Successful Deployment
Liferay Developer Best Practices for a Successful DeploymentLiferay Developer Best Practices for a Successful Deployment
Liferay Developer Best Practices for a Successful Deploymentrivetlogic
 
Using Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onUsing Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onFirelay
 
2013.devcon3 liferay and google authenticator integration rafik_harabi
2013.devcon3 liferay and google authenticator integration rafik_harabi2013.devcon3 liferay and google authenticator integration rafik_harabi
2013.devcon3 liferay and google authenticator integration rafik_harabiRafik HARABI
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixMarcel Offermans
 
Jakarta EE and MicroProfile - EclipseCon 2020
Jakarta EE and MicroProfile - EclipseCon 2020Jakarta EE and MicroProfile - EclipseCon 2020
Jakarta EE and MicroProfile - EclipseCon 2020Josh Juneau
 
Monoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityMonoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityGraham Charters
 
Liferay UI (R)evolution
Liferay UI (R)evolutionLiferay UI (R)evolution
Liferay UI (R)evolutionZeno Rocha
 
RIA with Flex & PHP - Tulsa TechFest 2009
RIA with Flex & PHP  - Tulsa TechFest 2009RIA with Flex & PHP  - Tulsa TechFest 2009
RIA with Flex & PHP - Tulsa TechFest 2009Jason Ragsdale
 
Microservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro FrontendsMicroservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro Frontendsandrejusb
 
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloakDevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloakHitachi, Ltd. OSS Solution Center.
 
Liferay plugin customization to change the behavior in portal
Liferay plugin customization to change the behavior in portalLiferay plugin customization to change the behavior in portal
Liferay plugin customization to change the behavior in portalAegis Software Canada
 

What's hot (20)

01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
 
Liferay portal – moving beyond content management
Liferay portal – moving beyond content managementLiferay portal – moving beyond content management
Liferay portal – moving beyond content management
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projects
 
Liferay Developer Best Practices for a Successful Deployment
Liferay Developer Best Practices for a Successful DeploymentLiferay Developer Best Practices for a Successful Deployment
Liferay Developer Best Practices for a Successful Deployment
 
Using Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onUsing Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-on
 
2013.devcon3 liferay and google authenticator integration rafik_harabi
2013.devcon3 liferay and google authenticator integration rafik_harabi2013.devcon3 liferay and google authenticator integration rafik_harabi
2013.devcon3 liferay and google authenticator integration rafik_harabi
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache Felix
 
Beyond OSGi Software Architecture
Beyond OSGi Software ArchitectureBeyond OSGi Software Architecture
Beyond OSGi Software Architecture
 
Osgi platform
Osgi platformOsgi platform
Osgi platform
 
Jakarta EE and MicroProfile - EclipseCon 2020
Jakarta EE and MicroProfile - EclipseCon 2020Jakarta EE and MicroProfile - EclipseCon 2020
Jakarta EE and MicroProfile - EclipseCon 2020
 
Monoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityMonoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is Modularity
 
Liferay UI (R)evolution
Liferay UI (R)evolutionLiferay UI (R)evolution
Liferay UI (R)evolution
 
Yii Framework
Yii FrameworkYii Framework
Yii Framework
 
RIA with Flex & PHP - Tulsa TechFest 2009
RIA with Flex & PHP  - Tulsa TechFest 2009RIA with Flex & PHP  - Tulsa TechFest 2009
RIA with Flex & PHP - Tulsa TechFest 2009
 
Microservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro FrontendsMicroservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro Frontends
 
Yii framework
Yii frameworkYii framework
Yii framework
 
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloakDevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
 
Liferay plugin customization to change the behavior in portal
Liferay plugin customization to change the behavior in portalLiferay plugin customization to change the behavior in portal
Liferay plugin customization to change the behavior in portal
 
Liferay
LiferayLiferay
Liferay
 

Viewers also liked

Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...Milen Dyankov
 
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7Milen Dyankov
 
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...Milen Dyankov
 
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmxMoved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmxMilen Dyankov
 
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-javaMoved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-javaMilen Dyankov
 
Moved to https://slidr.io/azzazzel/osgi-fundamentals
Moved to https://slidr.io/azzazzel/osgi-fundamentalsMoved to https://slidr.io/azzazzel/osgi-fundamentals
Moved to https://slidr.io/azzazzel/osgi-fundamentalsMilen Dyankov
 
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMoved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMilen Dyankov
 
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Milen Dyankov
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankovmfrancis
 
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMoved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMilen Dyankov
 
Social Networking Presentation For Chamber Of Commerce
Social Networking Presentation For Chamber Of CommerceSocial Networking Presentation For Chamber Of Commerce
Social Networking Presentation For Chamber Of CommerceBARBARA ROZGONYI
 
Liferay 6.2 theme premium
Liferay 6.2 theme premiumLiferay 6.2 theme premium
Liferay 6.2 theme premiumWeekServices
 
Building an Enterprise Content Management solution on top of liferay
Building an Enterprise Content Management solution on top of liferayBuilding an Enterprise Content Management solution on top of liferay
Building an Enterprise Content Management solution on top of liferayAndrea Di Giorgi
 
CTO School Networking Presentation
CTO School Networking PresentationCTO School Networking Presentation
CTO School Networking PresentationScott Britton
 
Introducing the new calendar app in liferay 6.2
Introducing the new calendar app in liferay 6.2Introducing the new calendar app in liferay 6.2
Introducing the new calendar app in liferay 6.2Andrea Di Giorgi
 
Implementing AutoComplete for Freemarker and Velocity languages in ACE Editor
Implementing AutoComplete for Freemarker and Velocity languages in ACE EditorImplementing AutoComplete for Freemarker and Velocity languages in ACE Editor
Implementing AutoComplete for Freemarker and Velocity languages in ACE Editorpeychevi
 
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Milen Dyankov
 
Social Media Marketing
Social Media MarketingSocial Media Marketing
Social Media MarketingJoris Roebben
 
Liferay architecture By Navin Agarwal
Liferay architecture By Navin AgarwalLiferay architecture By Navin Agarwal
Liferay architecture By Navin AgarwalNavin Agarwal
 

Viewers also liked (20)

Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
 
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
 
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
 
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmxMoved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
 
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-javaMoved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
 
Moved to https://slidr.io/azzazzel/osgi-fundamentals
Moved to https://slidr.io/azzazzel/osgi-fundamentalsMoved to https://slidr.io/azzazzel/osgi-fundamentals
Moved to https://slidr.io/azzazzel/osgi-fundamentals
 
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMoved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
 
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankov
 
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMoved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
 
Social Networking Presentation For Chamber Of Commerce
Social Networking Presentation For Chamber Of CommerceSocial Networking Presentation For Chamber Of Commerce
Social Networking Presentation For Chamber Of Commerce
 
Liferay 6.2 theme premium
Liferay 6.2 theme premiumLiferay 6.2 theme premium
Liferay 6.2 theme premium
 
6.2 presentation
6.2 presentation6.2 presentation
6.2 presentation
 
Building an Enterprise Content Management solution on top of liferay
Building an Enterprise Content Management solution on top of liferayBuilding an Enterprise Content Management solution on top of liferay
Building an Enterprise Content Management solution on top of liferay
 
CTO School Networking Presentation
CTO School Networking PresentationCTO School Networking Presentation
CTO School Networking Presentation
 
Introducing the new calendar app in liferay 6.2
Introducing the new calendar app in liferay 6.2Introducing the new calendar app in liferay 6.2
Introducing the new calendar app in liferay 6.2
 
Implementing AutoComplete for Freemarker and Velocity languages in ACE Editor
Implementing AutoComplete for Freemarker and Velocity languages in ACE EditorImplementing AutoComplete for Freemarker and Velocity languages in ACE Editor
Implementing AutoComplete for Freemarker and Velocity languages in ACE Editor
 
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
 
Social Media Marketing
Social Media MarketingSocial Media Marketing
Social Media Marketing
 
Liferay architecture By Navin Agarwal
Liferay architecture By Navin AgarwalLiferay architecture By Navin Agarwal
Liferay architecture By Navin Agarwal
 

Similar to Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugins-for-liferay-6-2

Java Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJava Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJAX London
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi WebinarWSO2
 
OSGi Sticker Shock Eclipse Con 2010
OSGi Sticker Shock   Eclipse Con 2010OSGi Sticker Shock   Eclipse Con 2010
OSGi Sticker Shock Eclipse Con 2010ericjohnson
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiangmfrancis
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OpenBlend society
 
OSGi Overview TomTom DevDay May 2009
OSGi Overview TomTom DevDay May 2009OSGi Overview TomTom DevDay May 2009
OSGi Overview TomTom DevDay May 2009Toralf Richter
 
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in SecondsWSO2
 
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsPart 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsJasmine Conseil
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Introduction to OSGGi
Introduction to OSGGiIntroduction to OSGGi
Introduction to OSGGiMarek Koniew
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Peter R. Egli
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro ServicesMarcel Offermans
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiToni Epple
 
Os gi introduction made by Ly MInh Phuong-SOC team
Os gi introduction made by Ly MInh Phuong-SOC teamOs gi introduction made by Ly MInh Phuong-SOC team
Os gi introduction made by Ly MInh Phuong-SOC teamThuy_Dang
 
Paving the way to a native Sling
Paving the way to a native SlingPaving the way to a native Sling
Paving the way to a native SlingRadu Cotescu
 
IBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt IntegrationIBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt Integrationgjuljo
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMmukulobject
 

Similar to Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugins-for-liferay-6-2 (20)

Java Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJava Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily Jiang
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi Webinar
 
OSGi Sticker Shock Eclipse Con 2010
OSGi Sticker Shock   Eclipse Con 2010OSGi Sticker Shock   Eclipse Con 2010
OSGi Sticker Shock Eclipse Con 2010
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiang
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
 
OSGi Overview TomTom DevDay May 2009
OSGi Overview TomTom DevDay May 2009OSGi Overview TomTom DevDay May 2009
OSGi Overview TomTom DevDay May 2009
 
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
 
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsPart 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Introduction to OSGGi
Introduction to OSGGiIntroduction to OSGGi
Introduction to OSGGi
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)
 
OSGi
OSGiOSGi
OSGi
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro Services
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGi
 
Os gi introduction made by Ly MInh Phuong-SOC team
Os gi introduction made by Ly MInh Phuong-SOC teamOs gi introduction made by Ly MInh Phuong-SOC team
Os gi introduction made by Ly MInh Phuong-SOC team
 
Paving the way to a native Sling
Paving the way to a native SlingPaving the way to a native Sling
Paving the way to a native Sling
 
IBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt IntegrationIBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt Integration
 
Appium solution
Appium solutionAppium solution
Appium solution
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDM
 
OSGi tech session
OSGi tech sessionOSGi tech session
OSGi tech session
 

Recently uploaded

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 

Recently uploaded (20)

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 

Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugins-for-liferay-6-2

  • 1. Leveraging OSGi to Create Extensible Plugins for Liferay 6.2 Eduardo García edupgv@ Julio Camarero juliocamarero@ Core Engineers at Liferay, Inc Milen Dyankov milendyankov@ Senior Consultant at Liferay, Inc
  • 3. ... and Liferay already allowed for modularity ...
  • 5. ... but modules are not modular !!!
  • 7.
  • 8. ...
  • 10. Let’s see an example… A Shipping Cost Calculator https://github.com/epgarcia/liferay-plugins/commits/LRNAS2014.OSGI
  • 11. final price common features for all countries specific features for each country
  • 12. we could… Develop a very complex and laborious application that covers all possible cases Release a new version every time any shipping cost algorithm changes or we add new countries Develop a simple core application that covers only the common features Make the application extensible with country modules“ ” If a shipping algorithm changes, our core application remains the same and only that specific extension must be changed
  • 13. will be the future of all Liferay 7 applications ...
  • 14. ... because it’s all advantages! improves maintainability maximizes reusability simplification of releases (independent) new market opportunities (extensions)
  • 16. App ver. 1 App ver. 2 time size ... ext 1 ver. 1 ext 1 ver. 2 ext 1 ver. 3 ext 2 ver. 3 ext 2 ver. 1 ext 2 ver. 2 ext 3 ver. 1 ext 1 ver. 4 ext 3 ver. 2
  • 17. But OSGi makes this possible already in Liferay 6.2 !
  • 18. In fact, Audience Targeting, the first Liferay 6.2 application following this approach, is already available on Marketplace!
  • 19. Sounds great, but I have no idea about OSGi…
  • 20. OSGi basic concepts in 3 minutes! (or what you need to understand before we continue)
  • 21. OSGi bundles (this is what our plug-ins are) manifestmanifestmanifestmanifest manifest Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Shipping Impl Bundle-SymbolicName: com.liferay.shipping.impl Bundle-Vendor: Liferay, Inc. Bundle-Version: 1.0.0 Private-Package: com.liferay.shipping.impl.model,com.liferay.shipping.impl.util Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))" . . . #1
  • 22. #1 OSGi bundles (this is what our plug-ins are) manifestmanifestmanifestmanifest manifest Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Shipping Impl Bundle-SymbolicName: com.liferay.shipping.impl Bundle-Vendor: Liferay, Inc. Bundle-Version: 1.0.0 Private-Package: com.liferay.shipping.impl.model,com.liferay.shipping.impl.util Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))" . . . All modern build tools (Ant, Maven, Gradle, ...) can build OSGi bundles! So can Liferay SDK !
  • 23. Package dependencies (this is how we describe what we provide and expect) Import-Package: com.liferay.shipping.api.model, com.liferay.shipping.api.util, com.liferay.portal.kernel.io.unsync;resolution:=optional, com.liferay.portal.kernel.util;resolution:=optional, freemarker.cache;resolution:=optional, freemarker.template;resolution:=optional Export-Package: com.liferay.shipping.api.model;version="1.0.0", com.liferay.shipping.api.util;version="1.0.0" manifestmanifestmanifestmanifest manifest EXPORT EXPORT #2
  • 24. manifestmanifestmanifestmanifest manifest EXPORT EXPORT Package dependencies (this is how we describe what we provide and expect) Import-Package: com.liferay.shipping.api.model, com.liferay.shipping.api.util, com.liferay.portal.kernel.io.unsync;resolution:=optional, com.liferay.portal.kernel.util;resolution:=optional, freemarker.cache;resolution:=optional, freemarker.template;resolution:=optional Export-Package: com.liferay.shipping.api.model;version="1.0.0", com.liferay.shipping.api.util;version="1.0.0" #2
  • 25. #2 manifestmanifestmanifestmanifest manifest EXPORT EXPORT Package dependencies (this is how we describe what we provide and expect) Import-Package: com.liferay.shipping.api.model, com.liferay.shipping.api.util, com.liferay.portal.kernel.io.unsync;resolution:=optional, com.liferay.portal.kernel.util;resolution:=optional, freemarker.cache;resolution:=optional, freemarker.template;resolution:=optional Export-Package: com.liferay.shipping.api.model;version="1.0.0", com.liferay.shipping.api.util;version="1.0.0" The BND tool (bnd.bndtools.org) can discover dependencies and automatically generate export/import manifest headers! Liferay SDK also allows you to use BND tool!
  • 26. OSGi services (this is how we provide and consume functionality) manifestmanifestmanifest manifest OSGi service registry Interface Service 1 ... Service N #3
  • 27. OSGi services (this is how we provide and consume functionality) manifestmanifestmanifest OSGi service registry Interface Service 1 ... Service N REGISTER REGISTER USE manifest #3
  • 28. #3 OSGi services (this is how we provide and consume functionality) manifestmanifestmanifest OSGi service registry Interface Service 1 ... Service N REGISTER REGISTER USE manifest There are number of component frameworks on top of OSGi (Declarative Services and Blueprint being part of the specs) which greatly simplify the usage of services!
  • 29. Sounds great, but how OSGi fits into Liferay ?
  • 30. Application server / Servlet container Liferay 6.2 Liferay CORE Portlet Portlet...
  • 31. Application server / Servlet container Liferay 6.2 Portlet application Portlet application Portlet application Portlet application Liferay CORE Portlet Portlet...
  • 32. Application server / Servlet container Liferay 6.2 Portlet application Portlet application Portlet application Portlet application Liferay CORE Portlet Portlet OSGi container ...
  • 33. Application server / Servlet container Liferay 6.2 Portlet application Portlet application Portlet application Portlet application Liferay CORE Portlet Portlet OSGi container OSGi core services HTTP Service Configuration Admin Service ... ... Liferay core OSGi services
  • 34. Application server / Servlet container Liferay 6.2 Portlet application Portlet application Portlet application Portlet application Liferay CORE Portlet Portlet OSGi container API Bundle API Bundle Service Bundle Extension bundle Service Bundle Portlet Bundle Extension Bundle Portlet Bundle OSGi core services HTTP Service Configuration Admin Service ... ... Liferay core OSGi services
  • 35. Application server / Servlet container Liferay 6.2 Portlet application Portlet application Portlet application Portlet application Liferay CORE Portlet Portlet OSGi container API Bundle API Bundle Service Bundle Extension bundle Service Bundle Portlet Bundle Extension Bundle Portlet Bundle OSGi core services HTTP Service Configuration Admin Service ... ... Liferay core OSGi services In Liferay 6.2 portlets inside OSGi container have certain limitations!
  • 37. There is an extra step in Liferay 6.2 as not all dependencies are provided! You will NOT need to do this in Liferay 7! #0 Shipping application modules (bundles)
  • 38. #1 Shipping application modules (bundles)
  • 39. #1 Shipping application modules (bundles)
  • 40. #1 Shipping application modules (bundles)
  • 41. #2 Shipping application modules (bundles)
  • 42. #2 Shipping application modules (bundles)
  • 43. #2 Shipping application modules (bundles)
  • 44. #2 Shipping application modules (bundles)
  • 45. #2 Shipping application modules (bundles)
  • 46. #3 Shipping application modules (bundles)
  • 47. This approach is for Liferay 6.2 only ! It will change in Liferay 7 ! This approach is for Liferay 6.2 only ! It will change in Liferay 7 ! #3 Shipping application modules (bundles)
  • 48. Our main application is ready! Let's try it !
  • 49. #4 Shipping application modules (bundles)
  • 50. #4 Shipping application modules (bundles)
  • 52. #5 Shipping application modules (bundles)
  • 53. #5 Shipping application modules (bundles)
  • 55. Where you go from here?
  • 56. Send feedback! Build your own OSGi modules Learn more about OSGi Try the samples yourself https://github.com/epgarcia/liferay-plugins/commits/LRNAS2014.OSGI