SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
PHPCR
Standard Interface for Content Repositories
http://bergie.iki.fi
henri.bergius@iki.fi

    @bergie
github.com/bergie/noflo

github.com/bergie/phpflo
Same API, multiple repositories
●
    Jackalope                        ●
                                         Midgard
    ●
        Apache Jackrabbit:               ●
                                             GObject-oriented
        Java-based repository                repository library
        server, accessible                   accessible through
        through WebDAV                       PHP extension
    ●
        Doctrine: pure-PHP               ●
                                             Python, JavaScript,
        repository library                   Java, ...
●
    github.com/jackalope/jackalope   ●
                                         github.com/bergie/phpcr-midgard2
Why use Midgard?
Developers write against a single API

Implementations can be chosen based on
          deployment needs
“Products in MySQL, blog entries in CouchDB”
Standard: JSR-283
Day Management AG, Switzerland                        10-August-2009

Release note

Product:         Specification for
                 Content Repository for Java(tm) Technology API 2.0
Version:         2.0
Type:            Full Release
----------------------------------------------------------------------

This package consists of the following components:

1)   Specification documents:    spec/
2)   Applicable Licenses:        license/
3)   API Source code:            src/
4)   pre-built API .jar-file:    lib/
5)   generated javadoc:          docs/

For questions or comments feel free to use jsr-283-comments@jcp.org

Further information about JSR 283 can be found at
http://www.jcp.org/en/jsr/detail?id=283
Content Management
            Interoperability Services
●   JCR-like API using HTTP and
    Atom (or SOAP)
●   Quite complicated, but
    language-agnostic
●   OASIS spec since 2010
●   Good implementations in
    enterprise document
    management systems
●   Proponents include Microsoft,
    Nuxeo and Alfresco
The next version of JCR will also include
  PHP scripting bindings, i.e. PHPCR
PHPCR is a collection of interfaces
...and API tests
bergie@AirDrone:~/Projects/phpcr-midgard2/api-test$ phpunit
PHPUnit 3.5.5 by Sebastian Bergmann.

I.IIISSSSSSSSS..S.............E..ESSSSSSSSSSSSSSSSSSSSSSSSEE    60   /   552
.........FFSSSSSSSSSSSSS.....E...........................I..   120   /   552
EEI...EEEE......F..........F..........F..........F..........   180   /   552
F..........F..........F......................F..........F...   240   /   552
.......F..........F..........F........ES.............S......   300   /   552
....F.EE..I...E..II......F..............................I...   360   /   552
..........E.I..I.........I............................E.E...   420   /   552
...EE.............................E.........................   480   /   552
........I....................E.EFEF...I.I.IEI..FEE.FF.FFF..F   540   /   552
S.....SSSSSS

Time: 03:53, Memory: 148.50Mb

There were 27 errors:

1) PHPCRTestsQueryQueryManagerTest::testGetQuery
PHPCRQueryInvalidQueryException: Unsupported 'xpath' language

/home/bergie/Projects/phpcr-midgard2/src/Midgard2CR/Query/QueryManager.php:24
/home/bergie/Projects/phpcr-midgard2/src/Midgard2CR/Query/QueryManager.php:62
/home/bergie/Projects/phpcr-midgard2/api-
test/suite/tests/06_Query/QueryManagerTest.php:37
...

FAILURES!
Tests: 536, Assertions: 2331, Failures: 25, Errors: 27, Incomplete: 18, Skipped: 56.
Repository capabilities
●
    Tree access              ●
                                 XML import and
●
    Access by UUID               export
●
    Workspaces
                             ●
                                 Permissions
●
    Versioning
                             ●
                                 Capability discovery
●
    Multi-value properties
                             ●
                                 Observation
●
    Queries: SQL2, QOM
                             ●
                                 Locking &
                                 Transactions
“Simple stuff should be easy, but complex stuff 
           should still be possible”
In PHPCR, all content is stored in a tree of nodes

    Nodes have a name, a type, and a set of
                  properties

        Nodes can also have child nodes
Including PHPCR in your application
●
    PHP 5.3 namespaced code
●
    Use PSR-0 standard autoloader
Connecting to a repository: Midgard
Connecting to a repository: Jackrabbit
●
    Start Jackrabbit:
    $ java -jar jackrabbit-standalone-2.2.5.jar
●
    Connect to repository:
This is the only repository-specific part
Working with the tree
About Node types
●   Node types determine what properties and what kind of
    child nodes a node can have
●   Some built-in types: nt:file, nt:folder, nt:resource,
    nt:unstructured
●   Node types can be amended with “mixin” types, like
    mix:lastModified, mix:language
●   Most repositories allow you to define your own types
●   Recommendation:
    Start with nt:unstructured, add more strict definitions
    when you know your data model
Queries: SQL2
Queries: Query Object Model
Versioning: enable
Versioning: commit
Versioning: restore
Export and import
Export and import
Some projects looking at PHPCR
Some projects looking at PHPCR
Questions?

henri.bergius@iki.fi
       @bergie

Contenu connexe

Tendances

Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
Dobrica Pavlinušić
 
How to build a Portofino application
How to build a Portofino applicationHow to build a Portofino application
How to build a Portofino application
Giampiero Granatella
 
Rubyonrails 090715105949-phpapp01
Rubyonrails 090715105949-phpapp01Rubyonrails 090715105949-phpapp01
Rubyonrails 090715105949-phpapp01
sagaroceanic11
 

Tendances (20)

Introduction to JavaScript Full Stack
Introduction to JavaScript Full StackIntroduction to JavaScript Full Stack
Introduction to JavaScript Full Stack
 
Create JS - A new kind of web editing interface
Create JS  - A new kind of web editing interfaceCreate JS  - A new kind of web editing interface
Create JS - A new kind of web editing interface
 
Віталій Бобров — Web components, Polymer and Drupal
Віталій Бобров — Web components, Polymer and DrupalВіталій Бобров — Web components, Polymer and Drupal
Віталій Бобров — Web components, Polymer and Drupal
 
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and GruntOpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
 
MongoDB SF Python
MongoDB SF PythonMongoDB SF Python
MongoDB SF Python
 
Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
 
Architecture of the Web browser
Architecture of the Web browserArchitecture of the Web browser
Architecture of the Web browser
 
Decoupling Content Management with Create.js
Decoupling Content Management with Create.jsDecoupling Content Management with Create.js
Decoupling Content Management with Create.js
 
01 intro #burningkeyboards
01 intro #burningkeyboards01 intro #burningkeyboards
01 intro #burningkeyboards
 
OpenCms Days 2016: Multilingual websites with OpenCms
OpenCms Days 2016:   Multilingual websites with OpenCmsOpenCms Days 2016:   Multilingual websites with OpenCms
OpenCms Days 2016: Multilingual websites with OpenCms
 
Spicing up JMX with Jolokia (Devoxx 2014)
Spicing up JMX with Jolokia (Devoxx 2014)Spicing up JMX with Jolokia (Devoxx 2014)
Spicing up JMX with Jolokia (Devoxx 2014)
 
How to build a Portofino application
How to build a Portofino applicationHow to build a Portofino application
How to build a Portofino application
 
Ruby on rails for beginers
Ruby on rails for beginersRuby on rails for beginers
Ruby on rails for beginers
 
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenutiSymfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
 
Why Drupal?
Why Drupal?Why Drupal?
Why Drupal?
 
Rubyonrails 090715105949-phpapp01
Rubyonrails 090715105949-phpapp01Rubyonrails 090715105949-phpapp01
Rubyonrails 090715105949-phpapp01
 
Drupal training-1-in-mumbai
Drupal training-1-in-mumbaiDrupal training-1-in-mumbai
Drupal training-1-in-mumbai
 
Going mobile with RichFaces
Going mobile with RichFacesGoing mobile with RichFaces
Going mobile with RichFaces
 
Avik_RailsTutorial
Avik_RailsTutorialAvik_RailsTutorial
Avik_RailsTutorial
 

Similaire à PHPCR - Standard Content Repository for PHP

Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
Marcos Quesada
 

Similaire à PHPCR - Standard Content Repository for PHP (20)

PHP Development Tools
PHP  Development ToolsPHP  Development Tools
PHP Development Tools
 
betterCode Workshop: Effizientes DevOps-Tooling mit Go
betterCode Workshop:  Effizientes DevOps-Tooling mit GobetterCode Workshop:  Effizientes DevOps-Tooling mit Go
betterCode Workshop: Effizientes DevOps-Tooling mit Go
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!
 
JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개
 
Node.js an Exectutive View
Node.js an Exectutive ViewNode.js an Exectutive View
Node.js an Exectutive View
 
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
Introducing Koki Short
Introducing Koki ShortIntroducing Koki Short
Introducing Koki Short
 
Tech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore RoadmapTech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore Roadmap
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
Extending JBoss EPP and Site Publisher your way
Extending JBoss EPP and Site Publisher your wayExtending JBoss EPP and Site Publisher your way
Extending JBoss EPP and Site Publisher your way
 
Real World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.xReal World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.x
 
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech TalkSpring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
 

Plus de Henri Bergius

Bisnesdata - Tietojärjestelmien kätköistä tableteille
Bisnesdata - Tietojärjestelmien kätköistä tableteilleBisnesdata - Tietojärjestelmien kätköistä tableteille
Bisnesdata - Tietojärjestelmien kätköistä tableteille
Henri Bergius
 
Proggis - Business Analytics with Linked Data
Proggis - Business Analytics with Linked DataProggis - Business Analytics with Linked Data
Proggis - Business Analytics with Linked Data
Henri Bergius
 
CreateJS hackathon in Zurich
CreateJS hackathon in ZurichCreateJS hackathon in Zurich
CreateJS hackathon in Zurich
Henri Bergius
 
NoFlo - Flow-Based Programming for Node.js
NoFlo - Flow-Based Programming for Node.jsNoFlo - Flow-Based Programming for Node.js
NoFlo - Flow-Based Programming for Node.js
Henri Bergius
 
Location awareness in MeeGo
Location awareness in MeeGoLocation awareness in MeeGo
Location awareness in MeeGo
Henri Bergius
 
Midgard2 Content Repository at FSCONS 2009
Midgard2 Content Repository at FSCONS 2009Midgard2 Content Repository at FSCONS 2009
Midgard2 Content Repository at FSCONS 2009
Henri Bergius
 
Midgard & Nemein - when an open source project and company evolve together
Midgard & Nemein - when an open source project and company evolve togetherMidgard & Nemein - when an open source project and company evolve together
Midgard & Nemein - when an open source project and company evolve together
Henri Bergius
 
Location-aware desktop
Location-aware desktopLocation-aware desktop
Location-aware desktop
Henri Bergius
 
Midgard2: Content repository for desktop and the web
Midgard2: Content repository for desktop and the webMidgard2: Content repository for desktop and the web
Midgard2: Content repository for desktop and the web
Henri Bergius
 
Midgard and the Interactive Knowledge System
Midgard and the Interactive Knowledge SystemMidgard and the Interactive Knowledge System
Midgard and the Interactive Knowledge System
Henri Bergius
 

Plus de Henri Bergius (20)

Bisnesdata - Tietojärjestelmien kätköistä tableteille
Bisnesdata - Tietojärjestelmien kätköistä tableteilleBisnesdata - Tietojärjestelmien kätköistä tableteille
Bisnesdata - Tietojärjestelmien kätköistä tableteille
 
Create - Decoupled CMS interface
Create - Decoupled CMS interfaceCreate - Decoupled CMS interface
Create - Decoupled CMS interface
 
Proggis - Business Analytics with Linked Data
Proggis - Business Analytics with Linked DataProggis - Business Analytics with Linked Data
Proggis - Business Analytics with Linked Data
 
CreateJS hackathon in Zurich
CreateJS hackathon in ZurichCreateJS hackathon in Zurich
CreateJS hackathon in Zurich
 
NoFlo - Flow-Based Programming for Node.js
NoFlo - Flow-Based Programming for Node.jsNoFlo - Flow-Based Programming for Node.js
NoFlo - Flow-Based Programming for Node.js
 
Symfony2 for Midgard Developers
Symfony2 for Midgard DevelopersSymfony2 for Midgard Developers
Symfony2 for Midgard Developers
 
Midgard Create and VIE
Midgard Create and VIEMidgard Create and VIE
Midgard Create and VIE
 
Location awareness in MeeGo
Location awareness in MeeGoLocation awareness in MeeGo
Location awareness in MeeGo
 
Semantic editor
Semantic editorSemantic editor
Semantic editor
 
Midgard2 - Content Repository for mobile applications
Midgard2 - Content Repository for mobile applicationsMidgard2 - Content Repository for mobile applications
Midgard2 - Content Repository for mobile applications
 
Midgard2 Content Repository at FSCONS 2009
Midgard2 Content Repository at FSCONS 2009Midgard2 Content Repository at FSCONS 2009
Midgard2 Content Repository at FSCONS 2009
 
Location-aware applications with GeoClue
Location-aware applications with GeoClueLocation-aware applications with GeoClue
Location-aware applications with GeoClue
 
Midgard & Nemein - when an open source project and company evolve together
Midgard & Nemein - when an open source project and company evolve togetherMidgard & Nemein - when an open source project and company evolve together
Midgard & Nemein - when an open source project and company evolve together
 
OSM2Go
OSM2GoOSM2Go
OSM2Go
 
Location-aware desktop
Location-aware desktopLocation-aware desktop
Location-aware desktop
 
Midgard2: Content repository for desktop and the web
Midgard2: Content repository for desktop and the webMidgard2: Content repository for desktop and the web
Midgard2: Content repository for desktop and the web
 
Midgard and the Interactive Knowledge System
Midgard and the Interactive Knowledge SystemMidgard and the Interactive Knowledge System
Midgard and the Interactive Knowledge System
 
Midgard 2 - The cloud you can control
Midgard 2 - The cloud you can controlMidgard 2 - The cloud you can control
Midgard 2 - The cloud you can control
 
Attention Profiling for smarter web services
Attention Profiling for smarter web servicesAttention Profiling for smarter web services
Attention Profiling for smarter web services
 
GeoClue - geo-information framework
GeoClue - geo-information frameworkGeoClue - geo-information framework
GeoClue - geo-information framework
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

PHPCR - Standard Content Repository for PHP

  • 1. PHPCR Standard Interface for Content Repositories
  • 4. Same API, multiple repositories ● Jackalope ● Midgard ● Apache Jackrabbit: ● GObject-oriented Java-based repository repository library server, accessible accessible through through WebDAV PHP extension ● Doctrine: pure-PHP ● Python, JavaScript, repository library Java, ... ● github.com/jackalope/jackalope ● github.com/bergie/phpcr-midgard2
  • 6. Developers write against a single API Implementations can be chosen based on deployment needs
  • 8. Standard: JSR-283 Day Management AG, Switzerland 10-August-2009 Release note Product: Specification for Content Repository for Java(tm) Technology API 2.0 Version: 2.0 Type: Full Release ---------------------------------------------------------------------- This package consists of the following components: 1) Specification documents: spec/ 2) Applicable Licenses: license/ 3) API Source code: src/ 4) pre-built API .jar-file: lib/ 5) generated javadoc: docs/ For questions or comments feel free to use jsr-283-comments@jcp.org Further information about JSR 283 can be found at http://www.jcp.org/en/jsr/detail?id=283
  • 9. Content Management Interoperability Services ● JCR-like API using HTTP and Atom (or SOAP) ● Quite complicated, but language-agnostic ● OASIS spec since 2010 ● Good implementations in enterprise document management systems ● Proponents include Microsoft, Nuxeo and Alfresco
  • 10. The next version of JCR will also include PHP scripting bindings, i.e. PHPCR
  • 11. PHPCR is a collection of interfaces
  • 12. ...and API tests bergie@AirDrone:~/Projects/phpcr-midgard2/api-test$ phpunit PHPUnit 3.5.5 by Sebastian Bergmann. I.IIISSSSSSSSS..S.............E..ESSSSSSSSSSSSSSSSSSSSSSSSEE 60 / 552 .........FFSSSSSSSSSSSSS.....E...........................I.. 120 / 552 EEI...EEEE......F..........F..........F..........F.......... 180 / 552 F..........F..........F......................F..........F... 240 / 552 .......F..........F..........F........ES.............S...... 300 / 552 ....F.EE..I...E..II......F..............................I... 360 / 552 ..........E.I..I.........I............................E.E... 420 / 552 ...EE.............................E......................... 480 / 552 ........I....................E.EFEF...I.I.IEI..FEE.FF.FFF..F 540 / 552 S.....SSSSSS Time: 03:53, Memory: 148.50Mb There were 27 errors: 1) PHPCRTestsQueryQueryManagerTest::testGetQuery PHPCRQueryInvalidQueryException: Unsupported 'xpath' language /home/bergie/Projects/phpcr-midgard2/src/Midgard2CR/Query/QueryManager.php:24 /home/bergie/Projects/phpcr-midgard2/src/Midgard2CR/Query/QueryManager.php:62 /home/bergie/Projects/phpcr-midgard2/api- test/suite/tests/06_Query/QueryManagerTest.php:37 ... FAILURES! Tests: 536, Assertions: 2331, Failures: 25, Errors: 27, Incomplete: 18, Skipped: 56.
  • 13. Repository capabilities ● Tree access ● XML import and ● Access by UUID export ● Workspaces ● Permissions ● Versioning ● Capability discovery ● Multi-value properties ● Observation ● Queries: SQL2, QOM ● Locking & Transactions
  • 15. In PHPCR, all content is stored in a tree of nodes Nodes have a name, a type, and a set of properties Nodes can also have child nodes
  • 16. Including PHPCR in your application ● PHP 5.3 namespaced code ● Use PSR-0 standard autoloader
  • 17. Connecting to a repository: Midgard
  • 18. Connecting to a repository: Jackrabbit ● Start Jackrabbit: $ java -jar jackrabbit-standalone-2.2.5.jar ● Connect to repository:
  • 19. This is the only repository-specific part
  • 21. About Node types ● Node types determine what properties and what kind of child nodes a node can have ● Some built-in types: nt:file, nt:folder, nt:resource, nt:unstructured ● Node types can be amended with “mixin” types, like mix:lastModified, mix:language ● Most repositories allow you to define your own types ● Recommendation: Start with nt:unstructured, add more strict definitions when you know your data model