SlideShare a Scribd company logo
Transparent Object
    Persistence
   (with FLOW3)
   Karsten Dambekalns <karsten@typo3.org>




                                            Inspiring people to
                                            share
Old school persistence
   DDD persistence
  FLOW3 persistence

                 Inspiring people to
                 share
An example to use...
 Let’s use a Blog

 A Blog project has

 •   a Blog

 •   some Posts,

 •   Comments and

 •   Tags

 Easy enough, eh?



                      Inspiring people to
                      share
Setting the stage
 A blog is requested

 We want to show posts

 We have data somewhere

 We use MVC and have a view waiting

 We only need to hand over the posts




                                       Inspiring people to
                                       share
Blog tables^Wrelations
       blogs
uid       name
 1        FLOW3
                                          posts
uid   blog_id      title       author                text                    date
 1       1        FLOW3       R. Lemke Mēs esam vissforšākie, tāpēc ka... 2008-10-07
                                                     comments
                                  uid   post_id       author                  text
                                   1       1      Kasper Skårhøj       Nice writeup, but...

                     posts_tags                                 tags
                post_id      tag_id                   uid          name
                   1            1                      1            PHP
                   1            3                      2            DDD
                                                       3           FLOW3
Straight DB usage
$row = mysql_fetch_assoc(
           mysql_query('SELECT uid FROM blogs WHERE name = '' .
                          mysql_real_escape_string($blog) .
                          ''')
       );
$blogId = $row['uid'];

$posts = array();
$res = mysql_query('SELECT * FROM posts WHERE blog_id = ' . $blogId);

while (($row = mysql_fetch_assoc($res)) !== FALSE) {
    $posts[] = $row;
}

$view->setPosts($posts);




                                                                   Inspiring people to
                                                                   share
Straight DB usage
$row = mysql_fetch_assoc(
           mysql_query('SELECT uid FROM blogs WHERE name = '' .
                          mysql_real_escape_string($blog) .
                          ''')
       );
$blogId = $row['uid'];

$posts = array();
                                        SQL injection!
                                        •
$res = mysql_query('SELECT * FROM posts WHERE blog_id = ' . $blogId);

while (($row = mysql_fetch_assoc($res)) !== FALSE) {
                                       •clumsy code
    $posts[] = $row;
}
                                       •other RDBMS
$view->setPosts($posts);
                                       •field changes?




                                                                   Inspiring people to
                                                                   share
Straight DB usage
$row = mysql_fetch_assoc(
           mysql_query('SELECT uid FROM blogs WHERE name = '' .
                          mysql_real_escape_string($blog) .
                          ''')
       );
$blogId = $row['uid'];

$posts = array();
                                        SQL injection!
                                        •
$res = mysql_query('SELECT * FROM posts WHERE blog_id = ' . $blogId);

while (($row = mysql_fetch_assoc($res)) !== FALSE) {
                                       •clumsy code
    $posts[] = $row;
}
                                       •other RDBMS
$view->setPosts($posts);
                                       •field changes?




                                                                   Inspiring people to
                                                                   share
DBAL in TYPO3v4
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'blogs', 'name = ' .
               $GLOBALS['TYPO3_DB']->fullQuoteStr($blog, 'blogs'));
$blogId = $rows[0]['uid'];

$posts = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'posts', 'blog_id = ' .
               $blogId);

$view->setPosts($posts);




                                                                 Inspiring people to
                                                                 share
DBAL in TYPO3v4
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'blogs', 'name = ' .
               $GLOBALS['TYPO3_DB']->fullQuoteStr($blog, 'blogs'));
$blogId = $rows[0]['uid'];

$posts = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'posts', 'blog_id = ' .
               $blogId);

$view->setPosts($posts);

                                        SQL injection!
                                        •
                                       •still clumsy...
                                       •field changes?




                                                                 Inspiring people to
                                                                 share
DBAL in TYPO3v4
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'blogs', 'name = ' .
               $GLOBALS['TYPO3_DB']->fullQuoteStr($blog, 'blogs'));
$blogId = $rows[0]['uid'];

$posts = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'posts', 'blog_id = ' .
               $blogId);

$view->setPosts($posts);

                                        SQL injection!
                                        •
                                       •still clumsy...
                                       •field changes?




                                                                 Inspiring people to
                                                                 share
ORM tools
 ORM means Object-Relational Mapping

 Objects represent a database row

 Most tools are rather ROM – still focus on relational thinking

 Implementations differ

 •   ORM base classes need to be extended

 •   Schema is used to generate code




                                                   Inspiring people to
                                                  share
Active Record
$blog = new Blog($blog);

$posts = $blog->getPosts();

$view->setPosts($posts);




                              Inspiring people to
                              share
Active Record
$blog = new Blog($blog);

$posts = $blog->getPosts();

$view->setPosts($posts);
                               very nice
                              •
                              •dependency on
                              ORM tool?
                              •save()/delete(
                                              )



                                             Inspiring people to
                                             share
Active Record
$blog = new Blog($blog);

$posts = $blog->getPosts();

$view->setPosts($posts);
                               very nice
                              •
                              •dependency on
$post->save();
                              ORM tool?
$post->delete();
                              •save()/delete(
                                              )



                                             Inspiring people to
                                             share
“DDD persistence”
 Domain Models encapsulate behavior and data

 Concerned about the problem – only

 Infrastructure is of no relevance




                                               Inspiring people to
                                               share
Entities
  Identity is important

  Are not defined by their attributes

  Examples could be...

 •   People

 •   Blog posts




                                       Inspiring people to
                                       share
Value objects
 Have no indentity

 Their value is of importance

 Are interchangeable

 Examples could be...

 •   Colors

 •   Numbers

 •   Tags in a blog



                                Inspiring people to
                                share
Aggregates
 Cluster associated objects

 Have a boundary and a root

 The root is a specific entity

 References from outside point to the root

 An example for an aggregate:

 •   Book




                                             Inspiring people to
                                             share
Repositories
 Provide access to entities (and aggregates)

 Allow to find a starting point for traversal

 Persisted objects can be searched for

 Queries can be built in various ways

 Handle storage of additions and updates




                                               Inspiring people to
                                               share
A Domain Model
   Blog
Repository

             Blog
                              Post


                    Comment                   Tag


                                Inspiring people to
                                share
A Domain Model
   Blog
Repository
      it


             Blog
 Repos



                              Post


                    Comment                   Tag


                                Inspiring people to
                                share
A Domain Model
   Blog
Repository
      it


             Blog
 Repos



                              Post


                    Comment                   Tag


                                Inspiring people to
                                share
A Domain Model
   Blog
Repository
      it


             Blog
 Repos



                              Post


                    Comment                   Tag


                                Inspiring people to
                                share
A Domain Model
   Blog
Repository
      it


                  Blog
 Repos



                                   Post
             Aggre-
             gates       Comment                   Tag


                                     Inspiring people to
                                     share
A Domain Model

              Post


    Comment          Tag



                           Inspiring people to
                           share
A Domain Model

              Post


    Comment          Tag



                           Inspiring people to
                           share
A Domain Model

              Post
         Entity
    Comment          Tag



                           Inspiring people to
                           share
A Domain Model

               Post
           Entity
    Comment           Tag
  Entity
                            Inspiring people to
                            share
A Domain Model

               Post
           Entity       Val
                            ue
    Comment           Tag
  Entity
                            Inspiring people to
                            share
Implementing this...




                  Inspiring people to
                  share
Implementing this...
   must be a lot of work!


                  Inspiring people to
                  share
Using FLOW3?




               Inspiring people to
               share
Using FLOW3?




               Inspiring people to
               share
Using FLOW3...
 You just implement the model

 No need to care about persisting your model

 FLOW3 handles this for you – transparently

 Even a Repository only needs little work

 Define relevant metadata in the source file




                                               Inspiring people to
                                               share
The Blog class
class Blog {

   /**
    * @var string
    */
   protected $name;

   /**
    * @var SplObjectStorage
    */
   protected $posts;

   /**
     * Constructs this blog
     *
     * @param string $name Name of this blog
     */
   public function __construct($name) {
        $this->name = $name;
   }




                                               Inspiring people to
                                               share
The Blog class
 /**
   * Adds a post to this blog
   *
   * @param F3BlogDomainModelPost $post
   * @return void
   * @author Karsten Dambekalns <karsten@typo3.org>
   */
 public function addPost(F3BlogDomainModelPost $post) {
      $this->posts->attach($post);
 }

 /**
   * Returns all posts in this blog
   *
   * @return SplObjectStorage containing F3BlogDomainModelPost
   * @author Karsten Dambekalns <karsten@typo3.org>
   */
 public function getPosts() {
      return clone $this->posts;
 }




                                                                   Inspiring people to
                                                                   share
The Post class
class Post {

   /**
    * @var string
    * @identity
    */
   protected $title;

   /**
    * @var SplObjectStorage
    */
   protected $comments;

   /**
     * Adds a comment to this post
     *
     * @param F3BlogDomainModelComment $comment
     * @return void
     * @author Robert Lemke <robert@typo3.org>
     */
   public function addComment(F3BlogDomainModelComment $comment) {
        $this->comments->attach($comment);
   }



                                                                    Inspiring people to
                                                                    share
The Tag class
class Tag {

   /**
    * @var string
    */
   protected $name;

   /**
     * Setter for name
     *
     * @param string $name
     * @author Karsten Dambekalns <karsten@typo3.org>
     */
   public function __construct($name) {
        $this->name = $name;
   }




                                                        Inspiring people to
                                                        share
The BlogRepository
 Now this really must be a complex piece of code, no?




                                                 Inspiring people to
                                                 share
The BlogRepository
 Now this really must be a complex piece of code, no?

 One word: No




                                                 Inspiring people to
                                                 share
The BlogRepository
        Now this really must be a complex piece of code, no?

        One word: No

class BlogRepository extends F3FLOW3PersistenceRepository {

    /**
     * Returns one or more Blogs with a matching name if found.
     *
     * @param string $name The name to match against
     * @return array
     */
    public function findByName($name) {
        $query = $this->createQuery();
        $blogs = $query->matching($query->equals('name', $name))->execute();

        return $blogs;
    }
}




                                                                     Inspiring people to
                                                                     share
The BlogRepository
        Now this really must be a complex piece of code, no?

        One word: No

class BlogRepository extends F3FLOW3PersistenceRepository {

    /**
     * Returns one or more Blogs with a matching name if found.
     *
     * @param string $name The name to match against
     * @return array
     */
    public function findByName($name) {
        $query = $this->createQuery();
        $blogs = $query->matching($query->equals('name', $name))->execute();

        return $blogs;
    }
}




                                                                     Inspiring people to
                                                                     share
@nnotations used




               Inspiring people to
               share
@nnotations used
 @entity




               Inspiring people to
               share
@nnotations used
 @entity

 @valueobject




                Inspiring people to
                share
@nnotations used
 @entity

 @valueobject

 @var




                Inspiring people to
                share
@nnotations used
 @entity

 @valueobject

 @var

 @transient




                Inspiring people to
                share
@nnotations used
 @entity

 @valueobject

 @var

 @transient

 @uuid




                Inspiring people to
                share
@nnotations used
 @entity

 @valueobject

 @var

 @transient

 @uuid

 @identity




                Inspiring people to
                share
@nnotations used
 @entity

 @valueobject

 @var

 @transient

 @uuid

 @identity

 @lazy



                Inspiring people to
                share
Persistence Manager
 Mostly invisible to developers

 Manages additions of and updates to objects

 Concerned only about objects in repositories

 Collects objects and hands over to backend

 Allows for objects being persisted at any time

 Automatically called to persist at end of script run




                                                   Inspiring people to
                                                   share
Simplified stack



 SQLite   PgSQL   MySQL   ...


                                Inspiring people to
                                share
Simplified stack


          PDO                   ...
 SQLite         PgSQL   MySQL         ...


                                            Inspiring people to
                                            share
Simplified stack


          TYPO3 Content Repository
          PDO                   ...
 SQLite         PgSQL   MySQL         ...


                                            Inspiring people to
                                            share
Simplified stack

             FLOW3 Persistence

          TYPO3 Content Repository
          PDO                    ...
 SQLite         PgSQL   MySQL          ...


                                             Inspiring people to
                                             share
Simplified stack
Application             Application

             FLOW3 Persistence

          TYPO3 Content Repository
          PDO                    ...
 SQLite         PgSQL   MySQL          ...


                                             Inspiring people to
                                             share
Simplified stack




                  Inspiring people to
                  share
Simplified stack



   TYPO3 Content Repository


                              Inspiring people to
                              share
Simplified stack

      FLOW3 Persistence




   TYPO3 Content Repository


                              Inspiring people to
                              share
Transparent persistence
 Explicit support for Domain-Driven Design

 Class Schemata are defined by the Domain Model class

 •   No need to write an XML or YAML schema definition

 •   No need to define the database model and object model
     multiple times at different places

 Automatic persistence in the JSR-283 based Content Repository

 Legacy data sources can be mounted




                                                Inspiring people to
                                                share
JSR-283 Repository
 Defines a uniform API for accessing content repositories

 A Content Repository

 •   is an object database for storage, search and retrieval of
     hierarchical data

 •   provides methods for versioning, transactions and
     monitoring

 TYPO3CR is the first PHP implementation of JSR-283

 Karsten Dambekalns is member of the JSR-283 expert group



                                                   Inspiring people to
                                                   share
Legacy databases
 Often you...

 •   still need to access some existing RDBMS

 •   need to put data somewhere for other systems to access

 The Content Repository will allow “mounting” of RDBMS tables

 Through this you can use the same persistence flow




                                                Inspiring people to
                                                share
Legacy databases
 Often you...
                                               future
 •    still need to access some existing RDBMS

                                               fun!
 •   need to put data somewhere for other systems to access

 The Content Repository will allow “mounting” of RDBMS tables

 Through this you can use the same persistence flow




                                                Inspiring people to
                                                share
Query Factory
 Creates a query for you

 Decouples persistence layer from backend

 Must be implemented by backend

 API with one method:

 •   public function create($className);




                                            Inspiring people to
                                            share
Query objects
 Represent a query for an object type

 Allow criteria to be attached

 Must be implemented by backend

 Simple API

 •   execute()

 •   matching()

 •   equals(), lessThan(), ...

 •   ...

                                        Inspiring people to
                                        share
Client code ignores
     Repository
 implementation;
Developers do not!
                        Eric Evans




                Inspiring people to
               share
Inspiring people to
share
Inspiring people to
share
Usability
  Repositories extending FLOW3’s base Repository

 •   have basic methods already

 •   only need to implement custom find methods

 •   already have a query object set up for “their” class

  No tables, no schema, no XML, no hassle

  No save calls, no fiddling with hierarchies

  Ready-to-use objects returned



                                                   Inspiring people to
                                                   share
Questions!

        Inspiring people to
        share
Inspiring people to
share
Links
   FLOW3
   http://flow3.typo3.org/



   TYPO3CR
   http://forge.typo3.org/projects/show/package-typo3cr



   JSR-283
   http://jcp.org/en/jsr/detail?id=283




                                            Inspiring people to
                                            share
Literature




             Inspiring people to
             share
Literature
   Domain-Driven Design
   Eric Evans, Addison-Wesley




                                Inspiring people to
                                share
Literature
   Domain-Driven Design
   Eric Evans, Addison-Wesley


   Applying Domain-Driven Design and Patterns
   Jimmy Nilsson, Addison-Wesley




                                            Inspiring people to
                                            share
Literature
   Domain-Driven Design
   Eric Evans, Addison-Wesley


   Applying Domain-Driven Design and Patterns
   Jimmy Nilsson, Addison-Wesley



   Patterns of Enterprise Application Architecture
   Martin Fowler, Addison-Wesley




                                                Inspiring people to
                                                share
Flickr photo credits:
megapixel13 (barcode), rmrayner (ring), Ducatirider (grapes), Here’s Kate (book shelf)
Pumpkin pictures:
http://ptnoticias.com/pumpkinway/


                                                                     Inspiring people to
                                                                     share

More Related Content

What's hot

Drupal & javascript
Drupal & javascriptDrupal & javascript
Drupal & javascript
Almog Baku
 
Introduction to Moose
Introduction to MooseIntroduction to Moose
Introduction to Moose
thashaa
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
Vineet Kumar Saini
 
Cleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQueryCleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQueryRebecca Murphey
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHP
Vineet Kumar Saini
 
DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009
Dirkjan Bussink
 
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingWhy Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
Chris Reynolds
 
究極のコントローラを目指す
究極のコントローラを目指す究極のコントローラを目指す
究極のコントローラを目指す
Yasuo Harada
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented Architecture
Luiz Messias
 
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptjQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
Darren Mothersele
 
Pagination in PHP
Pagination in PHPPagination in PHP
Pagination in PHP
Vineet Kumar Saini
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
Marco Vito Moscaritolo
 
Build your own entity with Drupal
Build your own entity with DrupalBuild your own entity with Drupal
Build your own entity with Drupal
Marco Vito Moscaritolo
 
Drupal Step-by-Step: How We Built Our Training Site, Part 1
Drupal Step-by-Step: How We Built Our Training Site, Part 1Drupal Step-by-Step: How We Built Our Training Site, Part 1
Drupal Step-by-Step: How We Built Our Training Site, Part 1Acquia
 
Daily notes
Daily notesDaily notes
Daily notes
meghendra168
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
Jeff Eaton
 
Your code sucks, let's fix it - DPC UnCon
Your code sucks, let's fix it - DPC UnConYour code sucks, let's fix it - DPC UnCon
Your code sucks, let's fix it - DPC UnCon
Rafael Dohms
 
Moose (Perl 5)
Moose (Perl 5)Moose (Perl 5)
Moose (Perl 5)
xSawyer
 
Contando uma história com O.O.
Contando uma história com O.O.Contando uma história com O.O.
Contando uma história com O.O.Vagner Zampieri
 
DBI
DBIDBI

What's hot (20)

Drupal & javascript
Drupal & javascriptDrupal & javascript
Drupal & javascript
 
Introduction to Moose
Introduction to MooseIntroduction to Moose
Introduction to Moose
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
 
Cleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQueryCleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQuery
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHP
 
DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009
 
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingWhy Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
 
究極のコントローラを目指す
究極のコントローラを目指す究極のコントローラを目指す
究極のコントローラを目指す
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented Architecture
 
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptjQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
 
Pagination in PHP
Pagination in PHPPagination in PHP
Pagination in PHP
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Build your own entity with Drupal
Build your own entity with DrupalBuild your own entity with Drupal
Build your own entity with Drupal
 
Drupal Step-by-Step: How We Built Our Training Site, Part 1
Drupal Step-by-Step: How We Built Our Training Site, Part 1Drupal Step-by-Step: How We Built Our Training Site, Part 1
Drupal Step-by-Step: How We Built Our Training Site, Part 1
 
Daily notes
Daily notesDaily notes
Daily notes
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
Your code sucks, let's fix it - DPC UnCon
Your code sucks, let's fix it - DPC UnConYour code sucks, let's fix it - DPC UnCon
Your code sucks, let's fix it - DPC UnCon
 
Moose (Perl 5)
Moose (Perl 5)Moose (Perl 5)
Moose (Perl 5)
 
Contando uma história com O.O.
Contando uma história com O.O.Contando uma história com O.O.
Contando uma história com O.O.
 
DBI
DBIDBI
DBI
 

Viewers also liked

Self Discipline
Self DisciplineSelf Discipline
Self Discipline
UNIVERISTY STUDENT
 
Brands Features And Architecture
Brands Features And ArchitectureBrands Features And Architecture
Brands Features And Architecture
lukasz k
 
Lvw Model Kids
Lvw Model   KidsLvw Model   Kids
Lvw Model Kids
Josh Allen
 
Re&agri 2014 presentation of existing & planned projects - hichem
Re&agri 2014   presentation of existing & planned projects - hichemRe&agri 2014   presentation of existing & planned projects - hichem
Re&agri 2014 presentation of existing & planned projects - hichem
Mohamed Larbi BEN YOUNES
 
ABCs Of Roomparenting 2
ABCs Of Roomparenting 2ABCs Of Roomparenting 2
ABCs Of Roomparenting 2
Qlubb Info
 
01 Le Concept de la Stratégie de Spécialisation Intelligente
01   Le Concept de la Stratégie de Spécialisation Intelligente01   Le Concept de la Stratégie de Spécialisation Intelligente
01 Le Concept de la Stratégie de Spécialisation Intelligente
Mohamed Larbi BEN YOUNES
 
Introduction to SEO: Domain and Linking Structure
Introduction to SEO: Domain and Linking StructureIntroduction to SEO: Domain and Linking Structure
Introduction to SEO: Domain and Linking Structure
E-Web Marketing
 
Introduction to Search Engine Optimisation
Introduction to Search Engine OptimisationIntroduction to Search Engine Optimisation
Introduction to Search Engine Optimisation
E-Web Marketing
 
Developing a web presence 2012
Developing a web presence 2012Developing a web presence 2012
Developing a web presence 2012
Hack the Hood
 
1001 O N A Career Day Preso
1001  O N A Career Day Preso1001  O N A Career Day Preso
1001 O N A Career Day PresoHack the Hood
 
DB API Usage - How to write DBAL compliant code
DB API Usage - How to write DBAL compliant codeDB API Usage - How to write DBAL compliant code
DB API Usage - How to write DBAL compliant code
Karsten Dambekalns
 
Demystifying share point site definitions SharePoint 2007
Demystifying share point site definitions SharePoint 2007Demystifying share point site definitions SharePoint 2007
Demystifying share point site definitions SharePoint 2007Marwan Tarek
 
Hack the hood engage local
Hack the hood engage localHack the hood engage local
Hack the hood engage local
Hack the Hood
 

Viewers also liked (20)

Self Discipline
Self DisciplineSelf Discipline
Self Discipline
 
Brands Features And Architecture
Brands Features And ArchitectureBrands Features And Architecture
Brands Features And Architecture
 
Mnenieto na givotnite
Mnenieto na givotniteMnenieto na givotnite
Mnenieto na givotnite
 
Lvw Model Kids
Lvw Model   KidsLvw Model   Kids
Lvw Model Kids
 
E twinningbg
E twinningbgE twinningbg
E twinningbg
 
Re&agri 2014 presentation of existing & planned projects - hichem
Re&agri 2014   presentation of existing & planned projects - hichemRe&agri 2014   presentation of existing & planned projects - hichem
Re&agri 2014 presentation of existing & planned projects - hichem
 
ABCs Of Roomparenting 2
ABCs Of Roomparenting 2ABCs Of Roomparenting 2
ABCs Of Roomparenting 2
 
T3
T3T3
T3
 
01 Le Concept de la Stratégie de Spécialisation Intelligente
01   Le Concept de la Stratégie de Spécialisation Intelligente01   Le Concept de la Stratégie de Spécialisation Intelligente
01 Le Concept de la Stratégie de Spécialisation Intelligente
 
Introduction to SEO: Domain and Linking Structure
Introduction to SEO: Domain and Linking StructureIntroduction to SEO: Domain and Linking Structure
Introduction to SEO: Domain and Linking Structure
 
Introduction to Search Engine Optimisation
Introduction to Search Engine OptimisationIntroduction to Search Engine Optimisation
Introduction to Search Engine Optimisation
 
Radina the school
Radina the schoolRadina the school
Radina the school
 
Developing a web presence 2012
Developing a web presence 2012Developing a web presence 2012
Developing a web presence 2012
 
Zlatka
ZlatkaZlatka
Zlatka
 
1001 O N A Career Day Preso
1001  O N A Career Day Preso1001  O N A Career Day Preso
1001 O N A Career Day Preso
 
DB API Usage - How to write DBAL compliant code
DB API Usage - How to write DBAL compliant codeDB API Usage - How to write DBAL compliant code
DB API Usage - How to write DBAL compliant code
 
Demystifying share point site definitions SharePoint 2007
Demystifying share point site definitions SharePoint 2007Demystifying share point site definitions SharePoint 2007
Demystifying share point site definitions SharePoint 2007
 
Einar CéSar Portfolio
Einar  CéSar    PortfolioEinar  CéSar    Portfolio
Einar CéSar Portfolio
 
Hack the hood engage local
Hack the hood engage localHack the hood engage local
Hack the hood engage local
 
Tecnologia na educação e recursos
Tecnologia na educação e recursos Tecnologia na educação e recursos
Tecnologia na educação e recursos
 

Similar to Transparent Object Persistence with FLOW3

The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
Hugo Hamon
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
Adam Tomat
 
Doctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperDoctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document Mapper
Jonathan Wage
 
php2.pptx
php2.pptxphp2.pptx
php2.pptx
ElieNGOMSEU
 
DrupalCamp Foz - Novas APIs Drupal 7
DrupalCamp Foz - Novas APIs Drupal 7DrupalCamp Foz - Novas APIs Drupal 7
DrupalCamp Foz - Novas APIs Drupal 7chuvainc
 
Lithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate FrameworksLithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate Frameworks
Nate Abele
 
Introduction To Moco
Introduction To MocoIntroduction To Moco
Introduction To MocoNaoya Ito
 
Desarrollo de módulos en Drupal e integración con dispositivos móviles
Desarrollo de módulos en Drupal e integración con dispositivos móvilesDesarrollo de módulos en Drupal e integración con dispositivos móviles
Desarrollo de módulos en Drupal e integración con dispositivos móvilesLuis Curo Salvatierra
 
Mongo Presentation by Metatagg Solutions
Mongo Presentation by Metatagg SolutionsMongo Presentation by Metatagg Solutions
Mongo Presentation by Metatagg Solutions
Metatagg Solutions
 
Drupal II: The SQL
Drupal II: The SQLDrupal II: The SQL
Drupal II: The SQL
ddiers
 
Zf Zend Db by aida
Zf Zend Db by aidaZf Zend Db by aida
Zf Zend Db by aidawaraiotoko
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data Objects
Wez Furlong
 
PHP API
PHP APIPHP API
PHP API
Jon Meredith
 
San Francisco Java User Group
San Francisco Java User GroupSan Francisco Java User Group
San Francisco Java User Groupkchodorow
 
MTDDC 2010.2.5 Tokyo - Brand new API
MTDDC 2010.2.5 Tokyo - Brand new APIMTDDC 2010.2.5 Tokyo - Brand new API
MTDDC 2010.2.5 Tokyo - Brand new APISix Apart KK
 
You code sucks, let's fix it
You code sucks, let's fix itYou code sucks, let's fix it
You code sucks, let's fix it
Rafael Dohms
 
From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)Night Sailer
 
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
Azim Kurt
 
laravel tricks in 50minutes
laravel tricks in 50minuteslaravel tricks in 50minutes
laravel tricks in 50minutes
Barang CK
 
Doctrine and NoSQL
Doctrine and NoSQLDoctrine and NoSQL
Doctrine and NoSQL
Benjamin Eberlei
 

Similar to Transparent Object Persistence with FLOW3 (20)

The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
 
Doctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperDoctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document Mapper
 
php2.pptx
php2.pptxphp2.pptx
php2.pptx
 
DrupalCamp Foz - Novas APIs Drupal 7
DrupalCamp Foz - Novas APIs Drupal 7DrupalCamp Foz - Novas APIs Drupal 7
DrupalCamp Foz - Novas APIs Drupal 7
 
Lithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate FrameworksLithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate Frameworks
 
Introduction To Moco
Introduction To MocoIntroduction To Moco
Introduction To Moco
 
Desarrollo de módulos en Drupal e integración con dispositivos móviles
Desarrollo de módulos en Drupal e integración con dispositivos móvilesDesarrollo de módulos en Drupal e integración con dispositivos móviles
Desarrollo de módulos en Drupal e integración con dispositivos móviles
 
Mongo Presentation by Metatagg Solutions
Mongo Presentation by Metatagg SolutionsMongo Presentation by Metatagg Solutions
Mongo Presentation by Metatagg Solutions
 
Drupal II: The SQL
Drupal II: The SQLDrupal II: The SQL
Drupal II: The SQL
 
Zf Zend Db by aida
Zf Zend Db by aidaZf Zend Db by aida
Zf Zend Db by aida
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data Objects
 
PHP API
PHP APIPHP API
PHP API
 
San Francisco Java User Group
San Francisco Java User GroupSan Francisco Java User Group
San Francisco Java User Group
 
MTDDC 2010.2.5 Tokyo - Brand new API
MTDDC 2010.2.5 Tokyo - Brand new APIMTDDC 2010.2.5 Tokyo - Brand new API
MTDDC 2010.2.5 Tokyo - Brand new API
 
You code sucks, let's fix it
You code sucks, let's fix itYou code sucks, let's fix it
You code sucks, let's fix it
 
From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)
 
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
 
laravel tricks in 50minutes
laravel tricks in 50minuteslaravel tricks in 50minutes
laravel tricks in 50minutes
 
Doctrine and NoSQL
Doctrine and NoSQLDoctrine and NoSQL
Doctrine and NoSQL
 

More from Karsten Dambekalns

Updating Neos – Why, When and How - 2024 edition
Updating Neos – Why, When and How - 2024 editionUpdating Neos – Why, When and How - 2024 edition
Updating Neos – Why, When and How - 2024 edition
Karsten Dambekalns
 
The Perfect Neos Project Setup
The Perfect Neos Project SetupThe Perfect Neos Project Setup
The Perfect Neos Project Setup
Karsten Dambekalns
 
Sawubona! Content Dimensions with Neos
Sawubona! Content Dimensions with NeosSawubona! Content Dimensions with Neos
Sawubona! Content Dimensions with Neos
Karsten Dambekalns
 
Deploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using SurfDeploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using Surf
Karsten Dambekalns
 
Profiling TYPO3 Flow Applications
Profiling TYPO3 Flow ApplicationsProfiling TYPO3 Flow Applications
Profiling TYPO3 Flow Applications
Karsten Dambekalns
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
Karsten Dambekalns
 
FLOW3-Workshop F3X12
FLOW3-Workshop F3X12FLOW3-Workshop F3X12
FLOW3-Workshop F3X12
Karsten Dambekalns
 
Doctrine in FLOW3
Doctrine in FLOW3Doctrine in FLOW3
Doctrine in FLOW3
Karsten Dambekalns
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
Karsten Dambekalns
 
The agile future of a ponderous project
The agile future of a ponderous projectThe agile future of a ponderous project
The agile future of a ponderous projectKarsten Dambekalns
 
How Domain-Driven Design helps you to migrate into the future
How Domain-Driven Design helps you to migrate into the futureHow Domain-Driven Design helps you to migrate into the future
How Domain-Driven Design helps you to migrate into the futureKarsten Dambekalns
 
Content Repository, Versioning and Workspaces in TYPO3 Phoenix
Content Repository, Versioning and Workspaces in TYPO3 PhoenixContent Repository, Versioning and Workspaces in TYPO3 Phoenix
Content Repository, Versioning and Workspaces in TYPO3 PhoenixKarsten Dambekalns
 
Transparent Object Persistence (within FLOW3)
Transparent Object Persistence (within FLOW3)Transparent Object Persistence (within FLOW3)
Transparent Object Persistence (within FLOW3)
Karsten Dambekalns
 
TDD (with FLOW3)
TDD (with FLOW3)TDD (with FLOW3)
TDD (with FLOW3)
Karsten Dambekalns
 
Implementing a JSR-283 Content Repository in PHP
Implementing a JSR-283 Content Repository in PHPImplementing a JSR-283 Content Repository in PHP
Implementing a JSR-283 Content Repository in PHP
Karsten Dambekalns
 
Knowledge Management in der TYPO3 Community
Knowledge Management in der TYPO3 CommunityKnowledge Management in der TYPO3 Community
Knowledge Management in der TYPO3 Community
Karsten Dambekalns
 
Unicode & PHP6
Unicode & PHP6Unicode & PHP6
Unicode & PHP6
Karsten Dambekalns
 
Implementing a JSR-283 Content Repository in PHP
Implementing a JSR-283 Content Repository in PHPImplementing a JSR-283 Content Repository in PHP
Implementing a JSR-283 Content Repository in PHP
Karsten Dambekalns
 

More from Karsten Dambekalns (20)

Updating Neos – Why, When and How - 2024 edition
Updating Neos – Why, When and How - 2024 editionUpdating Neos – Why, When and How - 2024 edition
Updating Neos – Why, When and How - 2024 edition
 
The Perfect Neos Project Setup
The Perfect Neos Project SetupThe Perfect Neos Project Setup
The Perfect Neos Project Setup
 
Sawubona! Content Dimensions with Neos
Sawubona! Content Dimensions with NeosSawubona! Content Dimensions with Neos
Sawubona! Content Dimensions with Neos
 
Deploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using SurfDeploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using Surf
 
Profiling TYPO3 Flow Applications
Profiling TYPO3 Flow ApplicationsProfiling TYPO3 Flow Applications
Profiling TYPO3 Flow Applications
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 
i18n and L10n in TYPO3 Flow
i18n and L10n in TYPO3 Flowi18n and L10n in TYPO3 Flow
i18n and L10n in TYPO3 Flow
 
FLOW3-Workshop F3X12
FLOW3-Workshop F3X12FLOW3-Workshop F3X12
FLOW3-Workshop F3X12
 
Doctrine in FLOW3
Doctrine in FLOW3Doctrine in FLOW3
Doctrine in FLOW3
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
 
The agile future of a ponderous project
The agile future of a ponderous projectThe agile future of a ponderous project
The agile future of a ponderous project
 
How Domain-Driven Design helps you to migrate into the future
How Domain-Driven Design helps you to migrate into the futureHow Domain-Driven Design helps you to migrate into the future
How Domain-Driven Design helps you to migrate into the future
 
Content Repository, Versioning and Workspaces in TYPO3 Phoenix
Content Repository, Versioning and Workspaces in TYPO3 PhoenixContent Repository, Versioning and Workspaces in TYPO3 Phoenix
Content Repository, Versioning and Workspaces in TYPO3 Phoenix
 
Transparent Object Persistence (within FLOW3)
Transparent Object Persistence (within FLOW3)Transparent Object Persistence (within FLOW3)
Transparent Object Persistence (within FLOW3)
 
JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developers
 
TDD (with FLOW3)
TDD (with FLOW3)TDD (with FLOW3)
TDD (with FLOW3)
 
Implementing a JSR-283 Content Repository in PHP
Implementing a JSR-283 Content Repository in PHPImplementing a JSR-283 Content Repository in PHP
Implementing a JSR-283 Content Repository in PHP
 
Knowledge Management in der TYPO3 Community
Knowledge Management in der TYPO3 CommunityKnowledge Management in der TYPO3 Community
Knowledge Management in der TYPO3 Community
 
Unicode & PHP6
Unicode & PHP6Unicode & PHP6
Unicode & PHP6
 
Implementing a JSR-283 Content Repository in PHP
Implementing a JSR-283 Content Repository in PHPImplementing a JSR-283 Content Repository in PHP
Implementing a JSR-283 Content Repository in PHP
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 

Transparent Object Persistence with FLOW3

  • 1. Transparent Object Persistence (with FLOW3) Karsten Dambekalns <karsten@typo3.org> Inspiring people to share
  • 2. Old school persistence DDD persistence FLOW3 persistence Inspiring people to share
  • 3. An example to use... Let’s use a Blog A Blog project has • a Blog • some Posts, • Comments and • Tags Easy enough, eh? Inspiring people to share
  • 4. Setting the stage A blog is requested We want to show posts We have data somewhere We use MVC and have a view waiting We only need to hand over the posts Inspiring people to share
  • 5. Blog tables^Wrelations blogs uid name 1 FLOW3 posts uid blog_id title author text date 1 1 FLOW3 R. Lemke Mēs esam vissforšākie, tāpēc ka... 2008-10-07 comments uid post_id author text 1 1 Kasper Skårhøj Nice writeup, but... posts_tags tags post_id tag_id uid name 1 1 1 PHP 1 3 2 DDD 3 FLOW3
  • 6. Straight DB usage $row = mysql_fetch_assoc( mysql_query('SELECT uid FROM blogs WHERE name = '' . mysql_real_escape_string($blog) . ''') ); $blogId = $row['uid']; $posts = array(); $res = mysql_query('SELECT * FROM posts WHERE blog_id = ' . $blogId); while (($row = mysql_fetch_assoc($res)) !== FALSE) { $posts[] = $row; } $view->setPosts($posts); Inspiring people to share
  • 7. Straight DB usage $row = mysql_fetch_assoc( mysql_query('SELECT uid FROM blogs WHERE name = '' . mysql_real_escape_string($blog) . ''') ); $blogId = $row['uid']; $posts = array(); SQL injection! • $res = mysql_query('SELECT * FROM posts WHERE blog_id = ' . $blogId); while (($row = mysql_fetch_assoc($res)) !== FALSE) { •clumsy code $posts[] = $row; } •other RDBMS $view->setPosts($posts); •field changes? Inspiring people to share
  • 8. Straight DB usage $row = mysql_fetch_assoc( mysql_query('SELECT uid FROM blogs WHERE name = '' . mysql_real_escape_string($blog) . ''') ); $blogId = $row['uid']; $posts = array(); SQL injection! • $res = mysql_query('SELECT * FROM posts WHERE blog_id = ' . $blogId); while (($row = mysql_fetch_assoc($res)) !== FALSE) { •clumsy code $posts[] = $row; } •other RDBMS $view->setPosts($posts); •field changes? Inspiring people to share
  • 9. DBAL in TYPO3v4 $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'blogs', 'name = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($blog, 'blogs')); $blogId = $rows[0]['uid']; $posts = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'posts', 'blog_id = ' . $blogId); $view->setPosts($posts); Inspiring people to share
  • 10. DBAL in TYPO3v4 $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'blogs', 'name = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($blog, 'blogs')); $blogId = $rows[0]['uid']; $posts = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'posts', 'blog_id = ' . $blogId); $view->setPosts($posts); SQL injection! • •still clumsy... •field changes? Inspiring people to share
  • 11. DBAL in TYPO3v4 $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'blogs', 'name = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($blog, 'blogs')); $blogId = $rows[0]['uid']; $posts = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'posts', 'blog_id = ' . $blogId); $view->setPosts($posts); SQL injection! • •still clumsy... •field changes? Inspiring people to share
  • 12. ORM tools ORM means Object-Relational Mapping Objects represent a database row Most tools are rather ROM – still focus on relational thinking Implementations differ • ORM base classes need to be extended • Schema is used to generate code Inspiring people to share
  • 13. Active Record $blog = new Blog($blog); $posts = $blog->getPosts(); $view->setPosts($posts); Inspiring people to share
  • 14. Active Record $blog = new Blog($blog); $posts = $blog->getPosts(); $view->setPosts($posts); very nice • •dependency on ORM tool? •save()/delete( ) Inspiring people to share
  • 15. Active Record $blog = new Blog($blog); $posts = $blog->getPosts(); $view->setPosts($posts); very nice • •dependency on $post->save(); ORM tool? $post->delete(); •save()/delete( ) Inspiring people to share
  • 16. “DDD persistence” Domain Models encapsulate behavior and data Concerned about the problem – only Infrastructure is of no relevance Inspiring people to share
  • 17. Entities Identity is important Are not defined by their attributes Examples could be... • People • Blog posts Inspiring people to share
  • 18. Value objects Have no indentity Their value is of importance Are interchangeable Examples could be... • Colors • Numbers • Tags in a blog Inspiring people to share
  • 19. Aggregates Cluster associated objects Have a boundary and a root The root is a specific entity References from outside point to the root An example for an aggregate: • Book Inspiring people to share
  • 20. Repositories Provide access to entities (and aggregates) Allow to find a starting point for traversal Persisted objects can be searched for Queries can be built in various ways Handle storage of additions and updates Inspiring people to share
  • 21. A Domain Model Blog Repository Blog Post Comment Tag Inspiring people to share
  • 22. A Domain Model Blog Repository it Blog Repos Post Comment Tag Inspiring people to share
  • 23. A Domain Model Blog Repository it Blog Repos Post Comment Tag Inspiring people to share
  • 24. A Domain Model Blog Repository it Blog Repos Post Comment Tag Inspiring people to share
  • 25. A Domain Model Blog Repository it Blog Repos Post Aggre- gates Comment Tag Inspiring people to share
  • 26. A Domain Model Post Comment Tag Inspiring people to share
  • 27. A Domain Model Post Comment Tag Inspiring people to share
  • 28. A Domain Model Post Entity Comment Tag Inspiring people to share
  • 29. A Domain Model Post Entity Comment Tag Entity Inspiring people to share
  • 30. A Domain Model Post Entity Val ue Comment Tag Entity Inspiring people to share
  • 31. Implementing this... Inspiring people to share
  • 32. Implementing this... must be a lot of work! Inspiring people to share
  • 33. Using FLOW3? Inspiring people to share
  • 34. Using FLOW3? Inspiring people to share
  • 35. Using FLOW3... You just implement the model No need to care about persisting your model FLOW3 handles this for you – transparently Even a Repository only needs little work Define relevant metadata in the source file Inspiring people to share
  • 36. The Blog class class Blog { /** * @var string */ protected $name; /** * @var SplObjectStorage */ protected $posts; /** * Constructs this blog * * @param string $name Name of this blog */ public function __construct($name) { $this->name = $name; } Inspiring people to share
  • 37. The Blog class /** * Adds a post to this blog * * @param F3BlogDomainModelPost $post * @return void * @author Karsten Dambekalns <karsten@typo3.org> */ public function addPost(F3BlogDomainModelPost $post) { $this->posts->attach($post); } /** * Returns all posts in this blog * * @return SplObjectStorage containing F3BlogDomainModelPost * @author Karsten Dambekalns <karsten@typo3.org> */ public function getPosts() { return clone $this->posts; } Inspiring people to share
  • 38. The Post class class Post { /** * @var string * @identity */ protected $title; /** * @var SplObjectStorage */ protected $comments; /** * Adds a comment to this post * * @param F3BlogDomainModelComment $comment * @return void * @author Robert Lemke <robert@typo3.org> */ public function addComment(F3BlogDomainModelComment $comment) { $this->comments->attach($comment); } Inspiring people to share
  • 39. The Tag class class Tag { /** * @var string */ protected $name; /** * Setter for name * * @param string $name * @author Karsten Dambekalns <karsten@typo3.org> */ public function __construct($name) { $this->name = $name; } Inspiring people to share
  • 40. The BlogRepository Now this really must be a complex piece of code, no? Inspiring people to share
  • 41. The BlogRepository Now this really must be a complex piece of code, no? One word: No Inspiring people to share
  • 42. The BlogRepository Now this really must be a complex piece of code, no? One word: No class BlogRepository extends F3FLOW3PersistenceRepository { /** * Returns one or more Blogs with a matching name if found. * * @param string $name The name to match against * @return array */ public function findByName($name) { $query = $this->createQuery(); $blogs = $query->matching($query->equals('name', $name))->execute(); return $blogs; } } Inspiring people to share
  • 43. The BlogRepository Now this really must be a complex piece of code, no? One word: No class BlogRepository extends F3FLOW3PersistenceRepository { /** * Returns one or more Blogs with a matching name if found. * * @param string $name The name to match against * @return array */ public function findByName($name) { $query = $this->createQuery(); $blogs = $query->matching($query->equals('name', $name))->execute(); return $blogs; } } Inspiring people to share
  • 44. @nnotations used Inspiring people to share
  • 45. @nnotations used @entity Inspiring people to share
  • 46. @nnotations used @entity @valueobject Inspiring people to share
  • 47. @nnotations used @entity @valueobject @var Inspiring people to share
  • 48. @nnotations used @entity @valueobject @var @transient Inspiring people to share
  • 49. @nnotations used @entity @valueobject @var @transient @uuid Inspiring people to share
  • 50. @nnotations used @entity @valueobject @var @transient @uuid @identity Inspiring people to share
  • 51. @nnotations used @entity @valueobject @var @transient @uuid @identity @lazy Inspiring people to share
  • 52. Persistence Manager Mostly invisible to developers Manages additions of and updates to objects Concerned only about objects in repositories Collects objects and hands over to backend Allows for objects being persisted at any time Automatically called to persist at end of script run Inspiring people to share
  • 53. Simplified stack SQLite PgSQL MySQL ... Inspiring people to share
  • 54. Simplified stack PDO ... SQLite PgSQL MySQL ... Inspiring people to share
  • 55. Simplified stack TYPO3 Content Repository PDO ... SQLite PgSQL MySQL ... Inspiring people to share
  • 56. Simplified stack FLOW3 Persistence TYPO3 Content Repository PDO ... SQLite PgSQL MySQL ... Inspiring people to share
  • 57. Simplified stack Application Application FLOW3 Persistence TYPO3 Content Repository PDO ... SQLite PgSQL MySQL ... Inspiring people to share
  • 58. Simplified stack Inspiring people to share
  • 59. Simplified stack TYPO3 Content Repository Inspiring people to share
  • 60. Simplified stack FLOW3 Persistence TYPO3 Content Repository Inspiring people to share
  • 61. Transparent persistence Explicit support for Domain-Driven Design Class Schemata are defined by the Domain Model class • No need to write an XML or YAML schema definition • No need to define the database model and object model multiple times at different places Automatic persistence in the JSR-283 based Content Repository Legacy data sources can be mounted Inspiring people to share
  • 62. JSR-283 Repository Defines a uniform API for accessing content repositories A Content Repository • is an object database for storage, search and retrieval of hierarchical data • provides methods for versioning, transactions and monitoring TYPO3CR is the first PHP implementation of JSR-283 Karsten Dambekalns is member of the JSR-283 expert group Inspiring people to share
  • 63. Legacy databases Often you... • still need to access some existing RDBMS • need to put data somewhere for other systems to access The Content Repository will allow “mounting” of RDBMS tables Through this you can use the same persistence flow Inspiring people to share
  • 64. Legacy databases Often you... future • still need to access some existing RDBMS fun! • need to put data somewhere for other systems to access The Content Repository will allow “mounting” of RDBMS tables Through this you can use the same persistence flow Inspiring people to share
  • 65. Query Factory Creates a query for you Decouples persistence layer from backend Must be implemented by backend API with one method: • public function create($className); Inspiring people to share
  • 66. Query objects Represent a query for an object type Allow criteria to be attached Must be implemented by backend Simple API • execute() • matching() • equals(), lessThan(), ... • ... Inspiring people to share
  • 67. Client code ignores Repository implementation; Developers do not! Eric Evans Inspiring people to share
  • 70. Usability Repositories extending FLOW3’s base Repository • have basic methods already • only need to implement custom find methods • already have a query object set up for “their” class No tables, no schema, no XML, no hassle No save calls, no fiddling with hierarchies Ready-to-use objects returned Inspiring people to share
  • 71. Questions! Inspiring people to share
  • 73. Links FLOW3 http://flow3.typo3.org/ TYPO3CR http://forge.typo3.org/projects/show/package-typo3cr JSR-283 http://jcp.org/en/jsr/detail?id=283 Inspiring people to share
  • 74. Literature Inspiring people to share
  • 75. Literature Domain-Driven Design Eric Evans, Addison-Wesley Inspiring people to share
  • 76. Literature Domain-Driven Design Eric Evans, Addison-Wesley Applying Domain-Driven Design and Patterns Jimmy Nilsson, Addison-Wesley Inspiring people to share
  • 77. Literature Domain-Driven Design Eric Evans, Addison-Wesley Applying Domain-Driven Design and Patterns Jimmy Nilsson, Addison-Wesley Patterns of Enterprise Application Architecture Martin Fowler, Addison-Wesley Inspiring people to share
  • 78.
  • 79. Flickr photo credits: megapixel13 (barcode), rmrayner (ring), Ducatirider (grapes), Here’s Kate (book shelf) Pumpkin pictures: http://ptnoticias.com/pumpkinway/ Inspiring people to share