Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introducing Liferay Standalone Applications
Search
Eduardo Lundgren
November 06, 2014
3
510
Introducing Liferay Standalone Applications
Eduardo Lundgren
November 06, 2014
Tweet
Share
More Decks by Eduardo Lundgren
See All by Eduardo Lundgren
WeDeploy
eduardolundgren
0
43
Single Page Applications in Liferay
eduardolundgren
5
2.5k
Single Page Applications done right
eduardolundgren
10
750
tracking.js with Maira Bello
eduardolundgren
0
110
Single Page Application
eduardolundgren
0
400
Getting Started with YUI3 and AlloyUI
eduardolundgren
0
72
Getting started with AlloyUI
eduardolundgren
0
70
Augmented Reality.js
eduardolundgren
0
150
Liferay UI revolution
eduardolundgren
0
180
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.5k
The Language of Interfaces
destraynor
154
24k
Music & Morning Musume
bryan
46
6.2k
Into the Great Unknown - MozCon
thekraken
33
1.5k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
GitHub's CSS Performance
jonrohan
1030
460k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Side Projects
sachag
452
42k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
Transcript
Standalone Applications in Liferay @eduardolundgren
“Liferay isn't sexy...”
None
One of the most efficient animal in the kingdom
None
None
They have 360-degree view
360-degree view
They are immortal
None
None
The most deadly creature on earth
None
None
None
None
None
What is the secret behind the jellyfish ? ? ?
? ? ? ? ? ? ? ? ?
None
“Teams with a better distribution of skills, not segmented by
roles, produce better results” Jared Spool User Interface Engineering
None
@rotty3000 (he also loves cars)
Standalone app is our Jellyfish
2013
None
None
None
None
None
None
!
None
Datastore
Datastore " Liferay A B Schemaless NoSQL Robust Scalable
A B " Datastore Liferay
Datastore ( your code goes here ) A B Deploy
Liferay
Datastore ( your code goes here ) A B Deploy
Liferay
Datastore API Clients A B Cross domain requests Promises Error
handling Batch Real time Liferay HTTP JavaScript Java ObjectiveC
Datastore RESTful Web Services API Clients A B Restful Liferay
HTTP JavaScript Java ObjectiveC
<script src="//apis.liferay.com/client.js" /> 8KB
lfr.request('http://api.example.com/v1/users') .then(function(response) { // success }) .catch(function(reason) { // failure
});
Your clients can talk directly to the back end services
without needing to go through your server side code
Autogenerated RESTful apis
The secret to machines talking to machines is to speak
human first
None
None
Users
Users https://api.example.com/v1/users Version Entity
Users /v1/users/ec557f-b045-0bad-5130-1347
Users /v1/users/559743231794
App id = 1, 2, 3... Normal DB
App id = 7 Sharded id = 46 id =
wat? DB DB DB
App id = 7 Sharded id = 46 id =
wat? DB 1) Random 2) Ordered 3) Unique 4) Distributed 5) Human Readable DB DB
64 bits IDs 0000000000000000000000000000000000000000000 0 00000000000000000000 |------------------------------------------| |---| |------------------| timestamp
sequence random bits safety bit bits Liferay's Simpleflake IDs /v1/users/559743231794
64 bits IDs 0000000000000000000000000000000000000000000 0 00000000000000000000 |------------------------------------------| |---| |------------------| timestamp
sequence random bits safety bit bits Chances of collision Liferay's Simpleflake IDs
Places for data: method and url, headers and body
POST https://api.example.com/v1/users PUT https://api.example.com/v1/users ! { "about": "Start simple. Dream
big. Do good. Be well.", "city": "Recife", "country": "BR" } ! HTTP 1.1/201 Created HTTP 1.1/202 Accepted (pending) Create
PUT https://api.example.com/v1/users/1 PATCH https://api.example.com/v1/users/1 ! { "about": "Updated", "city": "Recife",
"country": "BR" } ! HTTP 1.1/200 OK HTTP 1.1/202 Accepted (pending) Update
DELETE https://api.example.com/v1/users/1 ! HTTP 1.1/204 No content Delete
GET https://api.example.com/v1/users ! HTTP/1.1 200 OK Content-Type: application/json ! {
"users": [ { "about": "Start simple. Dream big. Do good. Be well.", "city": "Recife", "country": "BR" } ]} GET
GET https://api.example.com/v1/users.json ! HTTP/1.1 200 OK Content-Type: application/json ! {
"users": [ { "about": "Start simple. Dream big. Do good. Be well.", "city": "Recife", "country": "BR" } ]} GET JSON output
GET https://api.example.com/v1/users.xml ! HTTP/1.1 200 OK Content-Type: text/xml ! <?xml
version="1.0" encoding="UTF-8" ?> <users> <about>Start simple. Dream big. Do good. Be well.</aboutMe> <city>Recife</city> <country>BR</country> </users> GET XML output
POST https://api.example.com/v1/users/1/publish POST https://api.example.com/v1/users/1/star ! HTTP 1.1/200 OK HTTP 1.1/202
Accepted (pending) ! Custom verbs
Real-time
RESTful Web Services API Clients Restful HTTP JavaScript Java ObjectiveC
None
lfr.subscribe('http://api.example.com/v1/users') .on('data', function(response) { // data has arrived... });
Push notifications for all your services for free
Routing !
http://example.com/special/women
http://example.com/special/men
routes.txt
None
Automated tools
None
None
None
None
Management
Quota, Billing, Security policies, Reports, available at one click
Architecture
Database Service Builder Portlet Portlet Portlet JSON Web Services
RESTful Web Services Real-time Datastore MongoDB Elasticsearch RID Generator Auth
Permissions
Service Builder RESTful Web Services JSON Web Services Database Real-time
Datastore MongoDB Elasticsearch RID Generator Auth Permissions Portlet Portlet Portlet
None
Concrete Abstract "
" Concrete Abstract
Concrete Abstract "
None
" Concrete Abstract
DATASTORE RESTFUL REAL TIME ROUTING MANAGEMENT AUTHENTICATION TOOLS
We wanna be more than sexy.
Thank you! @eduardolundgren