-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
1/32
Portal 2.0: Bringing Social, Web 2.0
and SOA together for the Enterprise
Thursday, April 9, 2009
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
2/32
Part One:
Overview
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
3/32
Built-in Collaboration Suite
Liferay Collaboration brings the best collaboration tools together in a single package with all
the benefits of Liferays group workspaces, including roles, permissions, page
management, and social computing features.
Message Boards, Blogs, Wikis
WebMail
Shared Calendars
Enterprise Chat
RSS Feeds
Tagging, Ratings, Comments
Building on a Tradition of Value
See developer.cisco.com, www.webjunction.org, click.lavalife.com
http://www.developer.cisco.com/http://www.webjunction.org/http://www.click.lavalife.com/http://www.webjunction.org/http://www.webjunction.org/http://www.developer.cisco.com/http://www.developer.cisco.com/http://www.click.lavalife.com/http://www.click.lavalife.com/ -
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
4/32
Built-in Social Computing and Mashups
Liferay includes tools to help enterprises create functional social networks and easily deploy
widgets and mashups to meet business needs.
Build a social network for your enterprise with a singleplugin.
Find knowledge and expertise in your organization withprofiles.
Familiar social features: Friend List, Facebook-style Wall,and Activity Tracker.
TheActivity Tracker API makes it easy to integrate thirdparty portlets and applications.
Integrated instant messagingand presence forcompliancepersists across all pages.
Publish Liferay portlets to Facebook, Myspace, iGoogleor any website.
Building on a Tradition of Value
See www.miniunited.com, www.thecradle.com, www.pjoon.com
http://www.miniunited.com/http://www.thecradle.com/http://www.pjoon.com/http://www.thecradle.com/http://www.thecradle.com/http://www.miniunited.com/http://www.miniunited.com/http://www.pjoon.com/http://www.pjoon.com/ -
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
5/32
Part Two:
Liferays Social Networking API
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
6/32
SocialActivity
A SocialActivity is any discrete action a user took that others might want to know
about. Out of the box, Liferay tracks:
Liferay Portal:
Blog Entries
Message Board posts
Calendar event creation
Wiki page edits
Adding of Friends
Document Library actions
Liferay Social Networking API
World of Liferay adds:
Wall posts
JIRA activity
SVN activity
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
7/32
SocialActivity SocialActivityLocalService.addActivity()
Call the addActivity() method from within the business logic that generates the activity. This
simply adds an activity entry to the activities table. For example, in
BlogsEntryLocalServiceImpl.java:
package com.liferay.portlet.blogs.service.impl;
...
public class BlogsEntryLocalServiceImpl ... {public BlogsEntry addEntry(
...
// Social
if (!draft) {socialActivityLocalService.addActivity(
userId, groupId, BlogsEntry.class.getName(), entryId,BlogsActivityKeys.ADD_ENTRY, StringPool.BLANK, 0);
}...
}...
}
Liferay Social Networking API
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
8/32
SocialActivity SocialActivityLocalService.addActivity()
public SocialActivity addActivity(
! long userId: the userId of the activity doer
! long groupId:the groupId (community or organization) of the activity doer
! String className: qualifies the type of the activity (to allow for specific interpretation)
! long classPK: identifies the object associated with this activity; e.g., the blog entry added
! int type: allows for multiple types of activity within a class; e.g. Blogs: addEntry or addComment
! String extraData: catch-all field for providing extra data to the interpreter; e.g. commentId
! long receiverUserId: the userId of the recipient of the activity; e.g., friend added
)
Liferay Social Networking API
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
9/32
SocialActivityInterpreter
SocialActivityInterpreterLocalServiceUtil.interpret()
Call the interpret() method over a Collection of activities to display them. For example, in the
social-activities taglib (portal-web/docroot/html/taglib/ui/social_activities/page.jsp):
...
for (SocialActivity activity : activities) {SocialActivityFeedEntry activityFeedEntry
= SocialActivityInterpreterLocalServiceUtil.interpret(activity, themeDisplay);...
...
...
Liferay Social Networking API
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
10/32
SocialActivityInterpreter {Custom}ActivityInterpreter
Create a custom *ActivityInterpreter class to determine how your activity will be displayed.
For example, in BlogsActivityInterpreter.java:
package com.liferay.portlet.blogs.social;
...
public class BlogsActivityInterpreter extends BaseSocialActivityInterpreter {
protected SocialActivityFeedEntry doInterpret(SocialActivity activity, ThemeDisplay themeDisplay) ... {...// Check permissionsif (!BlogsEntryPermission.contains(
permissionChecker, activity.getClassPK(), ActionKeys.VIEW)) {
return null;}
// Get userIds; Create Link, Activity Title, Body, etc.}
private static final String[] _CLASS_NAMES = new String[] {BlogsEntry.class.getName()
};
}
Liferay Social Networking API
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
11/32
SocialActivityInterpreter {Custom}ActivityInterpreter
You could also create:
! SalesForceActivityInterpreter
! SharePointActivityInterpreter
! SAPActivityInterpreter
! YourCustomOrLegacyAppActivityInterpreter
Liferay Social Networking API
Activities
Jane completed a nightly batch process on HAL9000.Yesterday at 4:23 PM
Bryan closed a $40,000 Liferay Subscription with ABCCompany. March 7, 2009 at 10:13 AM
Matt uploaded a new version ofPortal Pricing Sheet toSales Community. March 7, 2009 at 8:07 AM
Matt and Bryan are now friends. March 7, 2009 at 10:13 AM
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
12/32
SocialRequest SocialRequestLocalServiceUtil.addRequest()
A SocialRequest is similar to a SocialActivity, but requires action by the other party.
The basic example is a request for someone to add you as a friend. In this case, call
the addRequest() method.
For example, in the WOL (World of Liferay) Summary portlet, you can request a friend:
Liferay Social Networking API
package com.liferay.wol.summary.portlet;
...
public class SummaryPortlet extends JSPPortlet {...public void addFriend() {
SocialRequestLocalServiceUtil.addRequest(themeDisplay.getUserId(), 0, User.class.getName(),themeDisplay.getUserId(), FriendsRequestKeys.ADD_FRIEND,StringPool.BLANK, user.getUserId());
...}...
}
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
13/32
SocialRequest SocialRequestInterpreterLocalServiceUtil.interpret()
... and in the Requests portlet, you can interpret, and accept a friend request:
Liferay Social Networking API
......
...
...
...
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
14/32
SocialRequestInterpreter {Custom}RequestInterpreter
Create a Custom *RequestInterpreter class to interpret custom requests.
For example, FriendsRequestInterpreter.java:
Liferay Social Networking API
package com.liferay.wol.friends.social;
...
public class FriendsRequestInterpreter extends BaseSocialRequestInterpreter {
protected SocialRequestFeedEntry doInterpret(...) {
// Do Request presentation processing}
protected boolean doProcessConfirmation(...) {
SocialRelationLocalServiceUtil.addRelation(...);
SocialActivityLocalServiceUtil.addActivity(...);}
private static final String[] _CLASS_NAMES = new String[] {User.class.getName()
};}
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
15/32
SocialRelation
A SocialRelation basically model relationships between two users. They can either be
bi-directional (friends, co-workers, group members, etc.) or uni-directional (child,
parent, boss, employee).
In our last example, doProcessConfirmation actually adds a SocialRelation:
Liferay Social Networking API
package com.liferay.wol.friends.social;
...
public class FriendsRequestInterpreter extends BaseSocialRequestInterpreter {
...protected boolean doProcessConfirmation(...) {
SocialRelationLocalServiceUtil.addRelation(request.getUserId(), request.getReceiverUserId(),SocialRelationConstants.TYPE_BI_FRIEND);
...}...
}
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
16/32
SocialRelation
A SocialRelation can also be deleted by calling:
SocialRelationLocalServiceUtil.deleteRelation(
long userId1, long userId2, int type
);
Liferay Social Networking API
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
17/32
Part Three:
Mashups and Scripting
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
18/32
Easy Sharing / Mashups
Liferay > Facebook
Google Gadgets > Liferay
Liferay > Web page (JS Widget)
Liferay > iGoogle
XML / XSL > Liferay
iPhone Site > Liferay
Flickr > Liferay
Google Maps > Liferay
IFrame / Web Proxy
Mashups and Scripting
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
19/32
Scripting Languages
! Velocity
! Ruby (uses JRuby)
! PHP (uses Quercus)
! Python (uses Jython?)
! Groovy
... and you can access Liferay Java
APIs through these languages!
So you could create Social Networking portlets using Liferays Social API and Ruby, for
example.
Mashups and Scripting
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
20/32
Replace java.rb in sample-ruby portlet with: (Tested in LP5.2.3)require 'java'
include_class 'com.liferay.portal.service.OrganizationServiceUtil'include_class 'com.liferay.portal.service.UserLocalServiceUtil'include_class 'com.liferay.portlet.social.service.SocialActivityLocalServiceUtil'include_class 'com.liferay.portlet.social.model.SocialActivityFeedEntry'include_class 'com.liferay.portlet.social.service.SocialActivityInterpreterLocalServiceUtil'
$renderResponse.setContentType "text/html"
out = $renderResponse.getPortletOutputStream
out.println """Invoking Liferay Services
"""if ($userInfo != nil)
userId = $userInfo['liferay.user.id'].to_iactivitiesCount = SocialActivityLocalServiceUtil.getUserActivitiesCount(userId)organizations = OrganizationServiceUtil.getUserOrganizations(userId)activities = SocialActivityLocalServiceUtil.getUserActivities(userId, 0, activitiesCount)
out.println "You belong to #{organizations.size} organizations:"
organizations.each do |organization|out.println "Organization Name: #{organization.getName()}"
end
out.println "You have #{activities.size} activities:"
themeDisplay = $renderRequest.getAttribute("THEME_DISPLAY")
activities.each do |activity|activityFeedEntry = SocialActivityInterpreterLocalServiceUtil.interpret(activity, themeDisplay);out.println "#{activityFeedEntry.getTitle}
#{activityFeedEntry.getBody}"endout.println ""
elsifout.println "You do not belong to any organizations."
endout.println Custom.navigation
Mashups and Scripting
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
21/32
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
22/32
Liferay goes beyond providing a superficial Javascript layer for social networking
Liferay processes on the server side for more robustness and scalability
Single HTTP request rather than multiple
Also automatically exposes to Javascript (portlet sharing and JSON services)
Specifically for Social Networking:
Liferay for Developers
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
23/32
Pervasive compatibilityLiferay runs on all major app servers, databases andoperating systems. Minimizes new spending on infrastructure.
Can run PHP, Ruby, Python, and moreprotect training and skills investments.
Pre-integrated with leading open source offerings.
Liberal MIT license is very flexible toward business use.
Liferay uses what you already use:
Liferay for Developers
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
24/32
0
10000
20000
30000
40000
50000
60000
70000
#ofDownloads*
03/02 03/03 03/04 03/05 03/06 09/0609/07
09/08Date
JBoss Portal Liferay Portal
*statistics taken from SourceForge.net
In its 10th year of development, Liferay Portal is todaysmost popular and widely downloaded open source portal.
Over 2.2 Million downloads and 75,000downloads per month
~66% of downloads Liferay Portal
~33% of downloads Liferay IDE & Plug-ins
Over 17,000 registered community members
Over 50 active volunteer contributors
Liferay for Developers
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
25/32
IBM / Oracle Comparison
Significant Savings
Customers that deployed Liferay Portal to production systems can savean average of93%in the first year over retail pricing for solutions from IBM and Oracle.
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
26/32
Liferay offers a nimble approach to implementation to provideshort-term ROI without compromising long-term viability.
Phased agile approach to development: add capability as needed withimmediate feedback
Liferay provides direct access to highest levels of product development team
Assets can be quickly reused and deployed (e.g. WebEx community)
Sponsored development reduces maintenance costs
Website
Website
Intranet
Website
Intranet
Website
Intranet
EAI
EAI
Collab Collab
Social
EAI
Implementation Agility
Agile development
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
27/32
Flexible, Easy Integration
Pervasive compatibilityLiferay runs on all major app servers,databases and operating systems. Minimizes new spending oninfrastructure.
SOA Approach:Portal services can be easily integrated into ESBcomponents and portal can easily integrate other non-portal servicesdeployed to the ESB
Compliance to open standards: Portlet 2.0 (member), JSR-170
(content), JBI (ESB), WSRP 1.0/2.0, JSR-88Useable Infrastructure: Built-in application capability with EAIframework to expand
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
28/32
Granular security and role-based authorization
Unlike other portals that maintain a simplified role-based permissions scheme, Liferay allows for granular, role-basedauthorizations. Portal administrators can assign individual users or groups of users different "roles" that grant varying
levels of access and editing rights to specific communities, files, applications and tools.
Built-in content tagging
Most pieces of content within the portal are treated as assets and can be tagged to help better group them together. Thisincludes blog entries, message board threads, and even web content. Admins can then optionally manage the tags within theportal using the Tags Admin Portlet, or even publish specific types of assets based on the tags that they do or do not have
using the Asset Publisher Portlet.
RSS and email subscriptions
In many cases, Liferay allows users to either subscribe to RSS feeds or via email. This includes things as specific as messageboard threads, user blogs, user activities, etc.
Liferay Portal - Features
Features
F
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
29/32
Application Scripts
Unlike other portlets that require development and deployment, Application Scripts enable users to createapplications on-the-fly.
Dynamic Datasets
By leveraging a framework called Expandos, Liferay provides a service that allows the creation of dynamic datasetswithout any change to the database schema. This data can be:
typed (boolean, Date, double, int, long, short, String, and arrays of all those)
associated with a specific entity (e.g. 'com.liferay.portal.model.User')
arranged into any number of "columns"
available to plugins
accessed from Velocity templates
accessed via Liferay's JSON API through AJAX
Liferay Portal - Features
Features
F
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
30/32
Multi-tenancy
Liferay provides the ability to host multiple sites on one deployment of Liferay Portal. In fact, adding anothersite is as simple as a few mouse-clicks and doesnot require additional deployments or the assistance of aSystem Administrator. Each community or organization can have its own:
Virtual hostSet of users
Content
Pages
Look-and-feel
Roles
Liferay Portal - Features
Features
Lif f D l
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
31/32
Industry AttentionNamed a Visionary in Gartners Magic Quadrant for PortalProducts
InfoWorlds Best of Open Source Software (2007, 2008)
EContent 100 (2006, 2007, 2008)
CIO 100 Award (Goodwill Industries)
Liferay Portal was by far the most cost effective and efficient portal technology we considered. Steve Bergman, CIOGoodwill Industries International
There are a number of well-known open source portal solutions, including JBoss, Metadot, and MindTouch Deki.But when looking for enterprise strength, Liferay Portal stands apart.InfoWorld 2008
Liferay for Developers
-
8/6/2019 Portal 2.0_Bringing Social Web 2.0 and SOA Together for the Enterprise
32/32
For more information, please contact:
Alice ChengLiferay, [email protected]
Property of Liferay, Inc.Please do not distribute.
mailto:[email protected]:[email protected]