SlideShare une entreprise Scribd logo
1  sur  79
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Drupal & javascript
Drupal & javascriptDrupal & javascript
Drupal & javascriptAlmog Baku
 
Introduction to Moose
Introduction to MooseIntroduction to Moose
Introduction to Moosethashaa
 
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 PHPVineet 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 PHPVineet Kumar Saini
 
DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009Dirkjan 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 ThingChris Reynolds
 
究極のコントローラを目指す
究極のコントローラを目指す究極のコントローラを目指す
究極のコントローラを目指すYasuo Harada
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented ArchitectureLuiz 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 JavascriptDarren Mothersele
 
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
 
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 UnConRafael 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
 

Tendances (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
 

En vedette

Brands Features And Architecture
Brands Features And ArchitectureBrands Features And Architecture
Brands Features And Architecturelukasz k
 
Lvw Model Kids
Lvw Model   KidsLvw Model   Kids
Lvw Model KidsJosh 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 - hichemMohamed Larbi BEN YOUNES
 
ABCs Of Roomparenting 2
ABCs Of Roomparenting 2ABCs Of Roomparenting 2
ABCs Of Roomparenting 2Qlubb 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 IntelligenteMohamed 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 StructureE-Web Marketing
 
Introduction to Search Engine Optimisation
Introduction to Search Engine OptimisationIntroduction to Search Engine Optimisation
Introduction to Search Engine OptimisationE-Web Marketing
 
Developing a web presence 2012
Developing a web presence 2012Developing a web presence 2012
Developing a web presence 2012Hack 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 codeKarsten 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 localHack the Hood
 

En vedette (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
 

Similaire à Transparent Object Persistence with FLOW3

The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistenceHugo 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 2018Adam Tomat
 
Doctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperDoctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperJonathan Wage
 
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 FrameworksNate 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 SolutionsMetatagg Solutions
 
Drupal II: The SQL
Drupal II: The SQLDrupal II: The SQL
Drupal II: The SQLddiers
 
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 ObjectsWez Furlong
 
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 itRafael Dohms
 
From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)Night Sailer
 
laravel tricks in 50minutes
laravel tricks in 50minuteslaravel tricks in 50minutes
laravel tricks in 50minutesBarang CK
 
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 MinutesAzim Kurt
 

Similaire à 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北京交流会)
 
laravel tricks in 50minutes
laravel tricks in 50minuteslaravel tricks in 50minutes
laravel tricks in 50minutes
 
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
 
Doctrine and NoSQL
Doctrine and NoSQLDoctrine and NoSQL
Doctrine and NoSQL
 

Plus de Karsten Dambekalns

The Perfect Neos Project Setup
The Perfect Neos Project SetupThe Perfect Neos Project Setup
The Perfect Neos Project SetupKarsten Dambekalns
 
Sawubona! Content Dimensions with Neos
Sawubona! Content Dimensions with NeosSawubona! Content Dimensions with Neos
Sawubona! Content Dimensions with NeosKarsten Dambekalns
 
Deploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using SurfDeploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using SurfKarsten Dambekalns
 
Profiling TYPO3 Flow Applications
Profiling TYPO3 Flow ApplicationsProfiling TYPO3 Flow Applications
Profiling TYPO3 Flow ApplicationsKarsten Dambekalns
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowKarsten 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 productiveKarsten 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
 
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 PHPKarsten Dambekalns
 
Knowledge Management in der TYPO3 Community
Knowledge Management in der TYPO3 CommunityKnowledge Management in der TYPO3 Community
Knowledge Management in der TYPO3 CommunityKarsten 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 PHPKarsten Dambekalns
 
A Content Repository for TYPO3 5.0
A Content Repository for TYPO3 5.0A Content Repository for TYPO3 5.0
A Content Repository for TYPO3 5.0Karsten Dambekalns
 

Plus de Karsten Dambekalns (20)

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
 
A Content Repository for TYPO3 5.0
A Content Repository for TYPO3 5.0A Content Repository for TYPO3 5.0
A Content Repository for TYPO3 5.0
 

Dernier

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Dernier (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

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