39
RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009 RDF and SPARQL for PHP Developers Benjamin Nowack bnode.org / semsol.com

RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

Embed Size (px)

DESCRIPTION

Slides from Semantic Web Meetup talk at New York City on May 21st, 2009 about Semantic Web technologies for PHP developers

Citation preview

Page 1: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

RDF and SPARQL for PHP Developers

Benjamin Nowackbnode.org / semsol.com

Page 2: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

(1) How can PHP developers benefit from the emerging Semantic Web (technologies)?

(2) How can Semantic Web projects benefit from PHP (developers)?

Two Perspectives

Page 3: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● Templating● Request handlers● Controllers● Framework extensions● Glue code● Prototyping

Scripting Languages

Page 4: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● talk with designers and UX teams● understand data models● talk with (or are) back-end

developers● know agency processes● are efficient and cost-effective

PHP/Ruby/... Developers

Page 5: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Scripting language developers have strong and multidisciplinary front-end skills that lack in the

current SemWeb landscape!

Page 6: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● demand will grow, good investment● more interesting, possibly better

paid projects● improved productivity● more (usable) semantic web apps● reduced time to market

Win-Win

Page 7: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

But there is more to the Semantic Web than „just“ direct business

opportunities...

Page 8: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

(1) A Web of machine-processable data

(2) A collection of powerful technologies

Two Other SemWeb Perspectives

Page 9: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● Templating/UI: back-end-dependent● Request handlers: custom code and APIs● Controllers: local, fixed models only● Framework extensions: no standards● Glue code: many one-off conversions● Prototypes: schema changes are painful

Technical Issues

Page 10: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Semantic Web technologies address these technical limitations and

related productivity issues.

Page 11: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● a simple, unifying data model (RDF)● standardized data exchange formats● lossless data portability● a powerful, simple data API (SPARQL)● re-mixable schemas (RDFS/OWL)● automated data processing

SemWeb for Web Development

Page 12: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● Templating/UI: back-end independence● Request handlers: reusable code / APIs● Controllers: distributed models● Framework extensions: standards, reuse● Glue code: less conversion code● Prototypes: less painful schema changes

Technical Opportunities

Page 13: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

However...

Page 14: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

The ROI has to justify the initial friction loss!

Page 15: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● My projects integrate data from the Web● (Semantic) web standards and openness

matter to me and/or my clients● I often work with non-stable schemas ● I can afford betting on an evolving

technology stack

When SemWeb Tech (or not)?

Page 16: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● There is almost no developer-oriented learning material

● Some things work differently in RDF (validation, data quality, API control, ...)

● Identifying and getting used to needed specs and vocabularies takes time

● All toolkits have non-standard extensions

Re Friction Loss

Page 17: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● something light-weight and optimized for PHP environments (and mindsets)

● tools that are easy to combine with existing software

● support for Web 2.0 data formats, too (microformats, RSS2, Atom, JSON)

ARC RDF Classes: Motivation

Page 18: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● RAP (RDF toolkit)● pOWL (CMS, app framework)● ARC (RDF toolkit)● OntoWiki / Erfurt (CMS, API)● Drupal (soon w/ RDF in core)● Trice (CMS, app framework)

Pure-PHP RDF Software

Page 19: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● Redland (RDF toolkit w/ PHP bindings)● Semantic MediaWiki (PHP-based)● Talis platform (has lots of PHP tools)● Virtuoso (PHP interpreter built in)● paget (Linked Data publishing)● Loomp (Semantic publishing)

More PHP(ish) RDF Software

Page 20: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● A pick-what-you-need RDF toolkit● HTTP reading/posting● Parsing (RDF formats, Atom, RSS, MFs)● Serializing (XML, JSON, Turtle)● Storage & Querying (local or remote)● SPARQL Scripting

ARC

Page 21: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● A basic app framework on top of ARC● Working with RDF stores made easy● Path-based request handlers● Forms with automatic RDF generation● Sessions (OpenID or local user:pass)● Themes (per request handler)

Trice

Page 22: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Software requirements:ARC: Web server, PHP, MySQL (storage)Trice: ARC, mod_rewrite, .htaccess

Setup:ARC: uploadTrice: sys.php / upload / file cache /

first request creates RDF store(s)and admin account

ARC / Trice

Page 23: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Examples & Demos● Accelerated prototyping (Data First)● Less painful schema changes (RDF)● Reusable template sections (URIs)● The page is a (standardized) API (RDFa)● Less custom glue code (RDF formats)● A powerful API for free (SPARQL)

Page 24: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Page 25: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Page 26: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Examples & Demos (ctd.)● Lossless Backup/Deploy (UghRIs!)● Simple remote data integration (LOD)● Remote model access (LOD + SPARQL)● Increasing data value (RDFa <=> LOAD)● Inference scripts (Sparqlets)● Putting it all together (Paggr/ConfX)

Page 27: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Page 28: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Page 29: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Page 30: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Page 31: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Some Lessons Learned (the hard way)

Page 32: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

• Start small.

Page 33: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

• Focus on the use cases at hand.(The „potential“ ones will come early enough.)

Page 34: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

• Partition data when possible.

Page 35: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

• Resist the „I could automate this even further, right now“ reflex.

Page 36: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

• Respect the core standards, but expect the need for custom solutions here and there (and let the community know).

Page 37: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

• Don't pick more from the SemWeb Menu than you can consume.

Page 38: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

Page 39: RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)

RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009

● http://arc.semsol.org/● http://trice.semsol.org/ (soon)● http://semsol.com/● http://bnode.org/

Thank You