Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)
1. 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
2. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Two Perspectives
(1) How can PHP developers benefit
from the emerging Semantic Web
(technologies)?
(2) How can Semantic Web projects
benefit from PHP (developers)?
3. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Scripting Languages
● Templating
● Request handlers
● Controllers
● Framework extensions
● Glue code
● Prototyping
4. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
PHP/Ruby/... Developers
● talk with designers and UX teams
● understand data models
● talk with (or are) back-end
developers
● know agency processes
● are efficient and cost-effective
5. 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!
6. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Win-Win
● demand will grow, good investment
● more interesting, possibly better
paid projects
●
improved productivity
●
more (usable) semantic web apps
● reduced time to market
7. 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...
8. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Two Other SemWeb Perspectives
(1) A Web of machine-processable data
(2) A collection of powerful technologies
9. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Technical Issues
● 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
10. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Semantic Web technologies address
these technical limitations and
related productivity issues.
11. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
SemWeb for Web Development
● 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
12. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Technical Opportunities
● 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
13. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
However...
14. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
The ROI has to justify the initial
friction loss!
15. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
When SemWeb Tech (or not)?
● 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
16. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Re Friction Loss
● 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
17. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
ARC RDF Classes: Motivation
● 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)
18. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Pure-PHP RDF Software
● RAP (RDF toolkit)
● pOWL (CMS, app framework)
● ARC (RDF toolkit)
● OntoWiki / Erfurt (CMS, API)
●
Drupal (soon w/ RDF in core)
● Trice (CMS, app framework)
19. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
More PHP(ish) RDF Software
● 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)
20. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
ARC
● 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
21. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Trice
● 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)
22. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
ARC / Trice
Software requirements:
ARC: Web server, PHP, MySQL (storage)
Trice: ARC, mod_rewrite, .htaccess
Setup:
ARC: upload
Trice: sys.php / upload / file cache /
first request creates RDF store(s)
and admin account
23. 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)
24. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
25. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
26. 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)
27. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
28. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
29. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
30. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
31. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Some Lessons Learned (the hard way)
32. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
• Start small.
33. 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.)
34. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
• Partition data when possible.
35. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
• Resist the „I could automate this
even further, right now“ reflex.
36. 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).
37. 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.
38. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
39. RDF and SPARQL for PHP Developers – NY Semantic Web Meetup - May 21, 2009
Thank You
● http://arc.semsol.org/
● http://trice.semsol.org/ (soon)
● http://semsol.com/
● http://bnode.org/