Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for...

15
Aurelijus Banelis

Transcript of Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for...

Page 1: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

Aurelijus Banelis

Page 2: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

is W3C standard

2In short

Examples

Specification

Page 3: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

solves naming problem

3Problem

Service 3

Service 1 Service 2

Page 4: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

solves naming problem

4

“Apple”“Apple” Service 3

Service 1 Service 2

Problem

Page 5: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

solves naming problem

5

Service 3

Service 1 Service 2

“Apple”“Apple”

Problem

Page 6: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

solves naming problem

6

“https://www.apple.com/

v/home/bq/images/

og.jpg”

“http://dreamatico.com/

data_images/Apple/

apple-7.jpg”Service 3

Service 1 Service 2

Problem

Page 7: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

solves naming problem

7

“ac:og.jpg”“dc:apple-7.jpg”Service 3

Service 1 Service 2

Problem

Page 8: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

Linked data example

8

parent

posX posX posYposY

2 12345

12integer

13integer

14integer

15integer

Example

Page 9: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

From simple JSON

9

{ "nodes": [ { "id": "12345", "posX": 12, "posY": 14, "parent": null }, { "id": "2", "posX": 15, "posY": 16, "parent": "12345" } ]}

Example

Page 10: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

To JSON-LD

10

{ "@context": "http://auginte.com/ns/s.jsonld", "nodes": [ { "@id": "gn:12345", "posX": 12, "posY": 14, "parent": null }, { "@id": "gn:2", "posX": 15, "posY": 16, "parent": "gn:12345" } ]}

Example

@id

gn:

@context

Page 11: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

For computer

11

[{"http://auginte.com/ns/v0.6/node/list": [ {"@id": "auginte://localhost/zooming/nodes/12345", "http://auginte.com/ns/v0.6/node/x": [ {"@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": 12}], "http://auginte.com/ns/v0.6/node/y": [ {"@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": 14 }] }, {"@id": "auginte://localhost/zooming/nodes/2", "http://auginte.com/ns/v0.6/reference/node/parent": [ {"@id": "auginte://localhost/zooming/nodes/12345"}], "http://auginte.com/ns/v0.6/node/x": [ {"@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": 15}], "http://auginte.com/ns/v0.6/node/y": [ {"@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": 16 } ]}]}] https://github.com/aurelijusb/example-jsonld-php/

http://json-ld.org/playground/index.html

Representation

key

value

type

Page 12: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

Why and where (not) to use

Learn JSON-LD Playground

PHP Libraries

REST2nd fetchfor context

StorageOrientDBexport JSON

FrontendBackend

Scala.jsPrickle

Cross language

ProtobufThrift

Semantinc WEB

RDFcompatible

SEO As microdata(not all)

Pros & cons 12

*Personal opinion

Page 13: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

Conclusion

Do not reinvent the wheel

Use standardsFor right jobThere is no one-fits-all solution

So 13

Page 14: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

Questions?

Do not reinvent the wheel

Use standardsFor right jobThere is no one-fits-all solution

? 14

Slides already at: aurelijus.banelis.lt

Page 15: Aurelijus Banelis · 2017. 8. 1. · Learn JSON-LD Playground PHP Libraries 2nd fetch REST for context OrientDB Storage export JSON Frontend Backend Scala.js Prickle Cross language

References and useful links

15i

●http://json-ld.org/ ●https://github.com/aurelijusb/example-jsonld-php/●https://github.com/lanthaler/JsonLD●http://www.w3.org/TR/json-ld/●https://developers.google.com/webmasters/business-location-pages/schema.org-examples ●https://schema.org ●https://developers.google.com/structured-data/testing-tool/●https://github.com/json-ld/json-ld.org/wiki/Users-of-JSON-LD●http://www.markus-lanthaler.com/hydra/●