Portal Development with Liferay

   Presented by Ayan Dave @ COJUG
             on 01/13/2009
What is Liferay Portal?
• Liferay Portal is world’s leading open
  source enterprise portal application
• It is built on top of Java 1.5, Open Source
  and Web 2.0 technologies
• Latest stable release is 5.1.2
• JSR-286 compliant – Liferay is in the expert
  group of the jsr


                                             2
What technical features does it
                     provide?
Technologies supported and
used                              Standards
•   AJAX
•   Apache ServiceMix             • AJAX
•   ehcache
•   Groovy                        • iCalendar & Microformat
•   Hibernate
•
•
    ICEfaces
    Java J2EE/JEE
                                  • JSR-168 (Portlets 1.0)
•   jBPM
•   JGroups
                                  • JSR-127 (JSF 1.0)
•   jQuery JavaScript Framework
•   Lucene                        • JSR-170 (Content Rep)
•   MuleSource ESB
•   PHP                           • JSR-286 (Portlet 2.0)*
•   Ruby
•   Seam                          • JSF-314 (JSF 2.0)
•   Spring & AOP
•
•
    Struts & Tiles
    Tapestry
                                  • OpenSearch
•   Velocity


                                                              3
What application features does it
             provide?
• Out of box tools – including wiki, blogs,
  cms, document management
• Communities and Organization Structure
• Customized personal user pages
• SOA Framework
• Easy one click configuration



                                              4
Why use Liferay?
• Need a portal based application
• Need rapid development and / or
  prototyping (Well, most projects do !)
• Need collaboration, e-commerce,
  internationalization




                                           5
“Hmm, Interesting. I need to see
   the application now ….”
“Wow, this has some good features.
So how do I get my hands dirty with
             code …”
Using the plugins sdk
• Plugins sdk can be used to create portlets and
  themes and deploy them to the Liferay portal
• Easiest and fastest way to start building the
  enterprise portal application
• Plugins are hot deployed to tomcat
• Plugins are fully JSR compliant and plugins
  developed outside sdk can also be used
•   ant -Dportlet.name="hello-world" -Dportlet.display.name="Hello World" create
•   ant -Dtheme.name="sample-theme" -Dtheme.display.name="Sample Theme" create
•   ant deploy




                                                                                   8
Creating an extension environment
• An extension environment can be created from
  Liferay portal source
• The ext environment gives us complete control over
  the way the system behaves with ways to
  reconfigure default Liferay behavior
• release.adave.properties
• app.server.adave.properties
• ant clean start build-ext (takes 7-8 mins)
• ant clean deploy (takes 1-2 mins)
• Configure root.xml on tomcat to connect to database
• Run the app …

                                                    9
Service Builder
• Liferay has very good service builder
  utility. We can specify our domain model in
  a service.xml file and run an ant task. The
  utility will create Java files, Hibernate files,
  and service classes
• Service Builder is a RAD tool, we may
  choose to use our own service framework
  and layer instead

                                                 10
“Ahaa, this looks good. So who
         has used it?”
Examples
• http://www.webjunction.org/
• http://www.worldvision.org/
• http://www.liferay.com/web/guest/products/
  portal/stories




                                           12
“What about security and
    performance?”
Security
• Liferay Portal uses industry standard, government-
  grade encryption technologies including advanced
  algorithms such as DES, MD5 and RSA. Liferay
  was benchmarked as among the most secure portal
  platforms using LogicLibrary's Logiscan suite.
• Pluggable Authentication
• Email Verification
• Granular Permissioning
• LDAP Authentication
• Session Management

                                                       14
Performance
• Multi-tier clustering at any combination of multiple tiers
  (presentation, service, business logic, and database)
• Advanced Caching
• Page Caching
• Load Balancing
• Session Replication
• Distributed Cache
• Static Content Export
• *Liferay Portal has been deployed to Amazon EC2
  which uses virtualization and cloud computing
  technologies to scale dynamically to geographically
  specific areas of demand.

                                                          15
“I went to codemash last week and
learned these cool new technologies.
  Is Liferay cool enough? (Gotcha
                !!!)”
Liferay supports Web Services
•   JSON
•   Hessian
•   Burlap
•   REST
•   RMI
•   Spring HTTP
•   WSRP
•   WebDAV
                                    17
Liferay with Groovy, Ruby, PHP
• We can create Groovy, Ruby or PHP
  portlets and use them with Liferay
• Liferay plugins repository has several
  examples of these




                                           18
In the news …
• In 2008 Sun Microsystems and Liferay
  teamed up to develop a common web
  presentation technology




                                         19
Shortcomings
• The ext-impl and ext-service structure – I
  would like to use a web – app – domain
  project structure
• Need more integration with other enterprise
  systems




                                            20
Q&A
Contact: daveayan@gmail.com

01/2009 - Portral development with liferay

  • 1.
    Portal Development withLiferay Presented by Ayan Dave @ COJUG on 01/13/2009
  • 2.
    What is LiferayPortal? • Liferay Portal is world’s leading open source enterprise portal application • It is built on top of Java 1.5, Open Source and Web 2.0 technologies • Latest stable release is 5.1.2 • JSR-286 compliant – Liferay is in the expert group of the jsr 2
  • 3.
    What technical featuresdoes it provide? Technologies supported and used Standards • AJAX • Apache ServiceMix • AJAX • ehcache • Groovy • iCalendar & Microformat • Hibernate • • ICEfaces Java J2EE/JEE • JSR-168 (Portlets 1.0) • jBPM • JGroups • JSR-127 (JSF 1.0) • jQuery JavaScript Framework • Lucene • JSR-170 (Content Rep) • MuleSource ESB • PHP • JSR-286 (Portlet 2.0)* • Ruby • Seam • JSF-314 (JSF 2.0) • Spring & AOP • • Struts & Tiles Tapestry • OpenSearch • Velocity 3
  • 4.
    What application featuresdoes it provide? • Out of box tools – including wiki, blogs, cms, document management • Communities and Organization Structure • Customized personal user pages • SOA Framework • Easy one click configuration 4
  • 5.
    Why use Liferay? •Need a portal based application • Need rapid development and / or prototyping (Well, most projects do !) • Need collaboration, e-commerce, internationalization 5
  • 6.
    “Hmm, Interesting. Ineed to see the application now ….”
  • 7.
    “Wow, this hassome good features. So how do I get my hands dirty with code …”
  • 8.
    Using the pluginssdk • Plugins sdk can be used to create portlets and themes and deploy them to the Liferay portal • Easiest and fastest way to start building the enterprise portal application • Plugins are hot deployed to tomcat • Plugins are fully JSR compliant and plugins developed outside sdk can also be used • ant -Dportlet.name="hello-world" -Dportlet.display.name="Hello World" create • ant -Dtheme.name="sample-theme" -Dtheme.display.name="Sample Theme" create • ant deploy 8
  • 9.
    Creating an extensionenvironment • An extension environment can be created from Liferay portal source • The ext environment gives us complete control over the way the system behaves with ways to reconfigure default Liferay behavior • release.adave.properties • app.server.adave.properties • ant clean start build-ext (takes 7-8 mins) • ant clean deploy (takes 1-2 mins) • Configure root.xml on tomcat to connect to database • Run the app … 9
  • 10.
    Service Builder • Liferayhas very good service builder utility. We can specify our domain model in a service.xml file and run an ant task. The utility will create Java files, Hibernate files, and service classes • Service Builder is a RAD tool, we may choose to use our own service framework and layer instead 10
  • 11.
    “Ahaa, this looksgood. So who has used it?”
  • 12.
    Examples • http://www.webjunction.org/ • http://www.worldvision.org/ •http://www.liferay.com/web/guest/products/ portal/stories 12
  • 13.
    “What about securityand performance?”
  • 14.
    Security • Liferay Portaluses industry standard, government- grade encryption technologies including advanced algorithms such as DES, MD5 and RSA. Liferay was benchmarked as among the most secure portal platforms using LogicLibrary's Logiscan suite. • Pluggable Authentication • Email Verification • Granular Permissioning • LDAP Authentication • Session Management 14
  • 15.
    Performance • Multi-tier clusteringat any combination of multiple tiers (presentation, service, business logic, and database) • Advanced Caching • Page Caching • Load Balancing • Session Replication • Distributed Cache • Static Content Export • *Liferay Portal has been deployed to Amazon EC2 which uses virtualization and cloud computing technologies to scale dynamically to geographically specific areas of demand. 15
  • 16.
    “I went tocodemash last week and learned these cool new technologies. Is Liferay cool enough? (Gotcha !!!)”
  • 17.
    Liferay supports WebServices • JSON • Hessian • Burlap • REST • RMI • Spring HTTP • WSRP • WebDAV 17
  • 18.
    Liferay with Groovy,Ruby, PHP • We can create Groovy, Ruby or PHP portlets and use them with Liferay • Liferay plugins repository has several examples of these 18
  • 19.
    In the news… • In 2008 Sun Microsystems and Liferay teamed up to develop a common web presentation technology 19
  • 20.
    Shortcomings • The ext-impland ext-service structure – I would like to use a web – app – domain project structure • Need more integration with other enterprise systems 20
  • 21.