Graph databases come with enhanced connectivity of data and whiteboard friendly paradigm. Some, like Neo4j, also brings a gremlin in your code : it is one of the most powerful graph query langage. It brings a refreshing look at how we store web of data and search for it. Gremlin provides an abstract layer that make it easy to express your business logic without fighting with the code. It may even change your mind on object oriented programming.
21. Up to now
nodes and vertices : basic blocs
in and out (and both) : navigation
except(), retain(), in(‘label’) : filtering
Starting at the vertices
22. Traversing the graph
Finding nodes in the graph that satisfy criteria
Traversing involves listing nodes, following
links, applying filters, processing data until all
conditions are met
Starting point : g.V and g.E
31. Closures
Steps often offer possibility for closure
Closure is between {} , uses ‘it’ as current node,
is written in Groovy (or else)
Closure often have a standard default behavior,
so they are sometimes stealth
32. Applied to properties
Non standard functions
g.V.filter{ it.name != it.name.toLowerCase()}
.count() => 73
50. Gremlin For PHP
https://github.com/PommeVerte/gremlin-php
Get up and running with Tinkerpop 3 and PHP :
https://dylanmillikin.wordpress.com/2015/07/20/
get-up-and-running-with-tinkerpop-3-and-php/
Using with Neo4j : REST API
Older API : neo4jPHP, rexpro-php