After Seam stopped at version 3, affecting related modules like Seam Social, a number of people started to work on Agorava, a "reference implementation" for Social Network integration in Java.
In this session, you will see examples from a number of frameworks that help developers to integrate their projects with existing Social Networks, both Public (Facebook, Twitter, Google+, LinkedIn, Xing, Yammer,...) and Corporate, e.g. within the Enterprise or Institution (University, Hospital, Library, Museum or individual Artists...) It also aims to assist Java Enterprise technologies and frameworks by adding social media features to web sites or services developed using Java or running on a JVM. Agorava is intended to be part of JDF 2.next alongside full DeltaSpike support or PicketLink SSO and more, e.g. JSR 330, allowing Agorava to also run on Android or Java SE.
7. Twitter4J
• Twitter4J is an unofficial Java library for Twitter API.
With Twitter4J, you can easily integrate your Java
application with Twitter.
• Its author, Yusuke Yamamoto used to work at
Twitter.
While he did, he was briefly meant to represent
Twitter in the Social JSR (357) EG.
• It’s light and compatible even with Java 1.4 to be
integrated e.g. in mobile apps
8. Scribe Java
• Scribe is Java framework that provides basic OAuth
function
• It also contains configuration for a lot of Social Media
• Only one dependency on Apache Common Codec
• Was at the heart of Agorava 0.5
9. DaliCore – CMS
• More than a CMS → DaliCore
• Adds functionality common to users, content and
permissions on top of Java EE 6.
• Focus on Users and Permissions.
• In about every DaliCore project, users should be able
to login with existing credentials (Facebook, Twitter,
Google Connect,...)
• Dali modules extend DaliCore
10. Spring Social
• Spring social somewhat inspirational to Seam
Social and Agorava has been around a bit longer
• Spring Social module were used to create first
Agorava modules (thanks to OSS and ASL2)
• But it’s Spring a only module....
16. 16
Standard part in
Social Media
•All social medias use REST as transmission
protocol
•Most of them transmit data in JSON format and
some in XML
•Identification & Authentication are almost entirely
based on OAuth protocol
17. 17
REST
•REpresentational State Transfer : Requests
about resource representation (customer, book,
order)
•REST is based on low level HTTP
•Each resource has a unique identifier (URI). 4
HTTP verbs can be applied to a URI : GET,
POST, PUT, DELETE
•Java has REST standard: JAX-RS. Version 1.0
didn’t provide client API yet, JAX-RS 2.0 does
18. 18
1: {
2: "firstName": "John",
3: "lastName" : "Smith",
4: "age" : 25,
5: "address" :
6: {
7: "streetAddress": "21 2nd Street",
8: "city" : "New York",
9: "state" : "NY",
10: "postalCode" : "10021"
11: },
12: "phoneNumber":
13: [
14: {
15: "type" : "home",
16: "number": "212 555-1234"
17: },
18: {
19: "type" : "fax",
20: "number": "646 555-4567"
21: }
22: ]
23: }
JSON
•JavaScript Object
Notation: Data format
inspired by JavaScript. It
became a standard for
online services including
Social Media.
19. 19
OAuth
•OAuth is a protocol to delegate rights
for an application to act on the behalf of a user
who granted its rights without giving away login /
password
•Developed by Twitter, Magnolia and Google, it
was made standard by IETF in April 2010 under
RFC 5849
20. 20
OAuth (2)
•Version 2.0, simpler to use but often criticized for
too many implementation was standardized in
October 2012 under RFC 6749 and 6750.
Already widely used (Facebook, Google,
Microsoft)
•All Social Media services are based on
OAuth 1.0a or 2.0.
•To use OAuth, one has to create an application
on the targeted service to have an entry point for
consumer
23. 23
OpenSocial Container
•Become an
OpenSocial Container
Get Shindig (PHP or Java)
or Google implementations*
• http://shindig.apache.org
• Look at examples & documentation
• http://code.google.com/p/opensocial-resources/wiki/SampleApps
• * See later why
OpenSocial
24. 24
• Open source implementation of OpenSocial &
Gadgets specification
• An Apache Software project
• Available in Java & PHP
• http://shindig.apache.org
It’s Goal: “Shindig's goal was to allow new sites to
start hosting social apps in under an hour's worth of
work“
•Those who tried it confirm, this failed
•And in 2015 Apache archived Shindig
OpenSocial – Shindig
28. 28
Who does not use
OpenSocial?
•Big “Fish”
• Facebook
• Twitter
• LinkedIn
• XING*
• Yammer
• Foursquare
• Google+
...
* Abandoned it for lack of Security among other reasons
29. 29
• OpenSocial is what Google created for MySpace
(Yammer CTO and co-founder Adam Pisoni)
• Out of the box, most gadgets are publicly available
content that do not require authentication and
authorization.
(ThoughtWorks Studios about OpenSocial gadgets)
What’s said about
OpenSocial
30. 30
• OpenSocial is a specification that provides a
standard way to share content between semi-trusted
applications.
• While initially proposed for public facing social
networking sites, it has possibly more potential
within the corporate firewall
(ThoughtWorks Radar, March 2012)
• Latest twist: OpenSocial was proposed as W3C
recommendation
What’s said about
OpenSocial (2)
31. 31
Sun Microsystems
Socialsite: Shindig + gadget based UI written in Java
Open Source https://socialsite.dev.java.net/
SocialSite –
Sun’s Approach to Social
32. 32
The non Standard parts
•No standard identity management or any other
API across Social Media
(for Java JSR 351 tries to establish that)
•More than that. There is no Social Media that
guarantee:
• Its API won’t change for a given period
• Backward compatibility when its API changes
33. 33
•A basic heart providing basic services :
• OAuth and Rest request
• Multi Social Media connections
• Polymorphic services to enforce standard on social Media
• Connector definition for Social module
•So this standard would be a kind Java Social
Connector definition standard
What would be a standard
for Social?
34. 34
From JSR 357 to Agorava
•Before Agorava there was Seam Social, part of
the JBoss Seam 3 project
•Early 2012, Seam was stopped to be merged in
Apache DeltaSpike
•Agorava was born mainly from Seam Social after
JSR 357 attempt
•One of it’s goals is to be the missing POC
for a new Java Social Standard
35. Differences to
Spring Social
•Spring Social works primarily with Spring
•Other UI frameworks than Spring MVC are
harder to integrate
•Focus on Facebook, so far examples only
provide Single Service support, unlike Agorava
Multiservice approach
36. Differences to
Spring Social (2)
•Despite otherwise still somewhat active
Spring community, even at Pivotal / Vmware
there’s doubt about support and activity,
especially after some people left
•Currently supports .NET, too
40. 40
Agorava 0.7
Macro architecture
• Agorava core is the «smart
module» of the framework
• Modules are mainly REST
API and JSON mapping
• Agorava provides full CDI
implementation
• In progress from 0.7 on:
• Full Java SE support (e.g. CDI 2)
• JSR 330 (Guice | Dagger, maybe
Spring) support