SlideShare ist ein Scribd-Unternehmen logo
1 von 95
Downloaden Sie, um offline zu lesen
EOEditingContext Best
        Practices
Mark Ritchie
Diamond Lake Consulting Inc.
EOF - The Big Picture
EOF - The Big Picture



     magic
Relational Database
  Title      Star WOB

Category      Drama
 Studio    Mariaʼs Movies
Relational Database
  Title      Star WOB

Category      Drama
 Studio    Mariaʼs Movies

               Title        EOF Next Gen

            Category           Surreal

             Studio         Mariaʼs Movies
Relational Database
  Title      Star WOB

Category      Drama
 Studio    Mariaʼs Movies

               Title        EOF Next Gen

            Category           Surreal

             Studio         Mariaʼs Movies

                                  Title      The Player

                                Category       Comedy

                                 Studio      Fredʼs Flicks
Relational Database
   Title              Star WOB
 Category     Title    DramaEOF Next Gen

  Studio        Mariaʼs Movies
            Category    Title Surreal The Player
             Studio Category Movies
                          Mariaʼs      Comedy

                         Studio      Fredʼs Flicks
Relational Database
          Title              Star WOB
        Category     Title    DramaEOF Next Gen

         Studio        Mariaʼs Movies
                   Category    Title Surreal The Player
                    Studio Category Movies
                                 Mariaʼs      Comedy

                                Studio      Fredʼs Flicks

Movie Table
Relational Database
          Title               Star WOB
        Category      Title    DramaEOF Next Gen

         Studio         Mariaʼs Movies
                    Category    Title Surreal The Player
                     Studio Category Movies
                                  Mariaʼs      Comedy

                                 Studio      Fredʼs Flicks

Movie Table
                     TITLE           CATEGORY
                   Star WOB            Drama
                  EOF Next Gen         Surreal
                   The Player         Comedy
Relational Database
              Title               Star WOB
         Category         Title    DramaEOF Next Gen

             Studio         Mariaʼs Movies
                        Category    Title Surreal The Player
                         Studio Category Movies
                                      Mariaʼs      Comedy

                                     Studio      Fredʼs Flicks

Movie Table
  MOVIE_ID               TITLE           CATEGORY
    12                 Star WOB            Drama
    14                EOF Next Gen         Surreal
    27                 The Player         Comedy
Relational Database
              Title               Star WOB
         Category         Title    DramaEOF Next Gen

             Studio         Mariaʼs Movies
                        Category    Title Surreal The Player
                         Studio Category Movies
                                      Mariaʼs      Comedy

                                     Studio      Fredʼs Flicks

Movie Table
  MOVIE_ID               TITLE           CATEGORY
    12                 Star WOB            Drama
    14                EOF Next Gen         Surreal
    27                 The Player         Comedy
Relational Database
                  Title        Star WOB
                Category
                  Title         Drama
                             EOF Next Gen
                 Studio
                Category     Mariaʼs Movies
                                Surreal
                  Title       The Player
                 Studio      Mariaʼs Movies
                Category       Comedy

                 Studio       Fredʼs Flicks

Movie Table
  MOVIE_ID       TITLE         CATEGORY
    12         Star WOB          Drama
    14        EOF Next Gen       Surreal
    27         The Player       Comedy
Relational Database
                  Title        Star WOB
                Category
                  Title         Drama
                              The Player
                 Studio
                Category     Mariaʼs Movies
                               Comedy

                 Studio       Fredʼs Flicks




Movie Table
  MOVIE_ID       TITLE         CATEGORY
    12         Star WOB          Drama
    14        EOF Next Gen       Surreal
    27         The Player       Comedy
Relational Database

                 Studio      Mariaʼs Movies

                 Studio       Fredʼs Flicks




Movie Table
  MOVIE_ID       TITLE         CATEGORY
    12         Star WOB          Drama
    14        EOF Next Gen       Surreal
    27         The Player       Comedy
Relational Database
              Studio Table
                STUDIO_ID         NAME
                   42         Mariaʼs Movies
                   69          Fredʼs Flicks




Movie Table
  MOVIE_ID        TITLE        CATEGORY
    12          Star WOB         Drama
    14         EOF Next Gen      Surreal
    27          The Player      Comedy
Relational Database
              Studio Table
                STUDIO_ID         NAME
                   42         Mariaʼs Movies
                   69          Fredʼs Flicks




Movie Table
  MOVIE_ID        TITLE        CATEGORY
    12          Star WOB         Drama
    14         EOF Next Gen      Surreal
    27          The Player      Comedy
Relational Database
              Studio Table
                STUDIO_ID         NAME
                   42         Mariaʼs Movies
                   69          Fredʼs Flicks




Movie Table
  MOVIE_ID        TITLE        CATEGORY
    12          Star WOB         Drama
    14         EOF Next Gen      Surreal
    27          The Player      Comedy
Relational Database
              Studio Table
                STUDIO_ID         NAME
                   42         Mariaʼs Movies
                   69          Fredʼs Flicks




Movie Table
  MOVIE_ID        TITLE        CATEGORY        STUDIO_ID
    12          Star WOB         Drama
    14         EOF Next Gen      Surreal
    27          The Player      Comedy
Relational Database
              Studio Table
                STUDIO_ID         NAME
                   42         Mariaʼs Movies
                   69          Fredʼs Flicks




Movie Table
  MOVIE_ID        TITLE        CATEGORY        STUDIO_ID
    12          Star WOB         Drama            42
    14         EOF Next Gen      Surreal
    27          The Player      Comedy
Relational Database
              Studio Table
                STUDIO_ID         NAME
                   42         Mariaʼs Movies
                   69          Fredʼs Flicks




Movie Table
  MOVIE_ID        TITLE        CATEGORY        STUDIO_ID
    12          Star WOB         Drama            42
    14         EOF Next Gen      Surreal
    27          The Player      Comedy
Relational Database
              Studio Table
                STUDIO_ID         NAME
                   42         Mariaʼs Movies
                   69          Fredʼs Flicks




Movie Table
  MOVIE_ID        TITLE        CATEGORY        STUDIO_ID
    12          Star WOB         Drama            42
    14         EOF Next Gen      Surreal          42
    27          The Player      Comedy
Relational Database
              Studio Table
                STUDIO_ID         NAME
                   42         Mariaʼs Movies
                   69          Fredʼs Flicks




Movie Table
  MOVIE_ID        TITLE        CATEGORY        STUDIO_ID
    12          Star WOB         Drama            42
    14         EOF Next Gen      Surreal          42
    27          The Player      Comedy            69
Fetching



Movie Table
  MOVIE_ID       TITLE       CATEGORY    STUDIO_ID
    12         Star WOB        Drama        42
    14        EOF Next Gen     Surreal      42
    27         The Player     Comedy        69
Fetching



Movie Table
  MOVIE_ID       TITLE       CATEGORY    STUDIO_ID
    12         Star WOB        Drama        42
    14        EOF Next Gen     Surreal      42
    27         The Player     Comedy        69
Fetching
                    title    Star WOB
                  category    Drama
                   studio




Movie Table
  MOVIE_ID       TITLE         CATEGORY    STUDIO_ID
    12         Star WOB          Drama        42
    14        EOF Next Gen       Surreal      42
    27         The Player       Comedy        69
What’s an EO?

•   An instance of a Java class
•   Which inherits from EOEnterpriseObject
•   It probably has custom behaviour
•   It’s uniquely identified by it’s GlobalID
•   Typically defined by the EOModel
EOModel
EOF Stack
EOF Stack
EOF Stack
 EO   EO   EO
EOF Stack
                EO   EO   EO


EOModelGroup
EOF Stack
                EO   EO   EO


EOModelGroup


  EOModel
EOF Stack
                EO     EO      EO


EOModelGroup     EOEditingContext


  EOModel
EOF Stack
                 EO      EO      EO


EOModelGroup       EOEditingContext


  EOModel      EOObjectStoreCoordinator
EOF Stack
                 EO      EO      EO


EOModelGroup       EOEditingContext


  EOModel      EOObjectStoreCoordinator


                  EODatabaseContext
EOF Stack
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext
EOF Stack
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext


      EOAdaptor
EOF Stack
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext


      EOAdaptor       EOAdaptorContext
EOF Stack
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext
EOF Stack
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
EOF Stack
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Handling Information
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Handling Information
                              EO      EO      EO
EOModelGroup

                               EOEditingContext
  EOModel

                            EOObjectStoreCoordinator



               EODatabase      EODatabaseContext       EODatabaseChannel



               EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Handling Information
                              EO      EO      EO
EOModelGroup

                               EOEditingContext
  EOModel

                            EOObjectStoreCoordinator



               EODatabase      EODatabaseContext       EODatabaseChannel



               EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Handling Information
                              EO      EO      EO
EOModelGroup

                               EOEditingContext
  EOModel       plist
                            EOObjectStoreCoordinator



               EODatabase      EODatabaseContext       EODatabaseChannel



               EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Handling Information
                              EO      EO      EO
EOModelGroup

                               EOEditingContext
  EOModel       plist
                            EOObjectStoreCoordinator



               EODatabase      EODatabaseContext       EODatabaseChannel



               EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Handling Information
                              EO      EO      EO
EOModelGroup

                               EOEditingContext
  EOModel       plist
                            EOObjectStoreCoordinator



               EODatabase      EODatabaseContext       EODatabaseChannel



               EOAdaptor       EOAdaptorContext        EOAdaptorChannel
                                                                           sql
Handling Information
                              EO      EO      EO
EOModelGroup

                               EOEditingContext
  EOModel       plist
                            EOObjectStoreCoordinator



               EODatabase      EODatabaseContext       EODatabaseChannel
                                                                           dictionaries
               EOAdaptor       EOAdaptorContext        EOAdaptorChannel
                                                                             sql
Handling Information
                              EO      EO      EO
EOModelGroup

                               EOEditingContext
  EOModel       plist
                            EOObjectStoreCoordinator



               EODatabase      EODatabaseContext       EODatabaseChannel
                                                                           dictionaries
               EOAdaptor       EOAdaptorContext        EOAdaptorChannel
                                                                             sql
Handling Information
                              EO      EO      EO
EOModelGroup

                               EOEditingContext
  EOModel       plist
                            EOObjectStoreCoordinator
                                                                    EnterpriseObjects
               EODatabase      EODatabaseContext       EODatabaseChannel
                                                                           dictionaries
               EOAdaptor       EOAdaptorContext        EOAdaptorChannel
                                                                             sql
Handling Information
                               EO      EO      EO
 EOModelGroup

                                EOEditingContext
   EOModel       plist
                             EOObjectStoreCoordinator
                                                                     EnterpriseObjects
Snapshots
                EODatabase      EODatabaseContext       EODatabaseChannel
                                                                            dictionaries
                EOAdaptor       EOAdaptorContext        EOAdaptorChannel
                                                                              sql
Object Stores
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Object Stores
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Peer EOEditingContexts
                     EO      EO      EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Peer EOEditingContexts
                             EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Peer EOEditingContexts
                             EO


EOModelGroup           EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Peer EOEditingContexts
                             EO                     EO


EOModelGroup           EOEditingContext       EOEditingContext


  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Peer EOEditingContexts
                             EO                     EO

                                                                  EO
EOModelGroup           EOEditingContext       EOEditingContext

                                                            EOEditingCon
  EOModel          EOObjectStoreCoordinator


      EODatabase      EODatabaseContext       EODatabaseChannel


      EOAdaptor       EOAdaptorContext        EOAdaptorChannel
Peer EOEditingContexts
         EO


   EOEditingContext             EO                     EO

                                                                     EO
EOModelGroup              EOEditingContext       EOEditingContext

                                                               EOEditingCon
  EOModel             EOObjectStoreCoordinator


      EODatabase         EODatabaseContext       EODatabaseChannel


       EOAdaptor         EOAdaptorContext        EOAdaptorChannel
Creating peer EC’s
EOEditingContext ec = session.defaultEditingContext();

EOEditingContext peer = new EOEditingContext();
Creating local copies
When you have a reference to an EOEnterpriseObject and
you want a local copy:

EOEnterpriseObject localObject =
        EOUtilities.localInstanceOfObject(newEC,
                                        remoteObject);
Object Stores
   EO      EO      EO


     EOEditingContext


 EOObjectStoreCoordinator


    EODatabaseContext
Nested EditingContexts
        EO      EO      EO


          EOEditingContext


          EOEditingContext


      EOObjectStoreCoordinator


         EODatabaseContext
Back here again?
     EO      EO      EO


       EOEditingContext


   EOObjectStoreCoordinator


      EODatabaseContext
Multiple Database
          EO        EO   EO


           EOEditingContext


       EOObjectStoreCoordinator


EODatabaseContext
Multiple Database
          EO        EO     EO


            EOEditingContext


        EOObjectStoreCoordinator


EODatabaseContext        EODatabaseContext
Back to Fetching
            title       Star WOB
       category           Drama
           studio



MOVIE_ID               TITLE       CATEGORY    STUDIO_ID
  12                 Star WOB        Drama        42
  14                EOF Next Gen     Surreal      42
Back to Fetching
                    Movie
            title       Star WOB
       category           Drama
           studio



MOVIE_ID               TITLE       CATEGORY    STUDIO_ID
  12                 Star WOB        Drama        42
  14                EOF Next Gen     Surreal      42
Back to Fetching
                    Movie
            title       Star WOB
       category           Drama
           studio



MOVIE_ID               TITLE       CATEGORY    STUDIO_ID
  12                 Star WOB        Drama        42
  14                EOF Next Gen     Surreal      42
Back to Fetching
                    Movie
            title       Star WOB
       category           Drama
           studio



MOVIE_ID               TITLE       CATEGORY         STUDIO_ID
  12                 Star WOB        Drama             42
  14                EOF Next Gen     Surreal           42




                     STUDIO_ID         TITLE          CATEGORY
                        42         Mariaʼs Movies     $5 000 000
Back to Fetching
                    Movie
            title       Star WOB
       category           Drama
           studio



MOVIE_ID               TITLE       CATEGORY         STUDIO_ID
  12                 Star WOB        Drama             42
  14                EOF Next Gen     Surreal           42




                     STUDIO_ID         TITLE          CATEGORY
                        42         Mariaʼs Movies     $5 000 000
It’s a relationship
                    Movie
            title       Star WOB
                                                           Studio
                                                    name    Mariaʼs Movies
       category           Drama
                                                income        $5 000 000
           studio
                                                movies


MOVIE_ID               TITLE       CATEGORY           STUDIO_ID
  12                 Star WOB        Drama               42
  14                EOF Next Gen     Surreal             42




                     STUDIO_ID         TITLE               CATEGORY
                        42         Mariaʼs Movies          $5 000 000
It’s a fault
                    Movie
            title       Star WOB
                                                           Studio
                                                    name    Mariaʼs Movies
       category           Drama
                                                income        $5 000 000
           studio
                                                movies


MOVIE_ID               TITLE       CATEGORY           STUDIO_ID
  12                 Star WOB        Drama               42
  14                EOF Next Gen     Surreal             42




                     STUDIO_ID         TITLE               CATEGORY
                        42         Mariaʼs Movies          $5 000 000
The Studio lives!
                    Movie
            title       Star WOB
                                                           Studio
                                                    name    Mariaʼs Movies
       category           Drama
                                                income        $5 000 000
           studio
                                                movies


MOVIE_ID               TITLE       CATEGORY           STUDIO_ID
  12                 Star WOB        Drama               42
  14                EOF Next Gen     Surreal             42




                     STUDIO_ID         TITLE               CATEGORY
                        42         Mariaʼs Movies          $5 000 000
The Studio lives!
                    Movie
            title       Star WOB
                                                           Studio
                                                    name    Mariaʼs Movies
       category           Drama
                                                income        $5 000 000
           studio
                                                movies


MOVIE_ID               TITLE       CATEGORY           STUDIO_ID
  12                 Star WOB        Drama               42
  14                EOF Next Gen     Surreal             42




                     STUDIO_ID         TITLE               CATEGORY
                        42         Mariaʼs Movies          $5 000 000
Looking at the movies
           Movie
   title     Star WOB
                               Studio
                        name     Mariaʼs Movies
 category     Drama
                        income    $5 000 000
  studio
                        movies
A to-many relationship
           Movie
   title     Star WOB
                               Studio
                        name     Mariaʼs Movies
 category     Drama
                        income    $5 000 000
  studio
                        movies
A to-many relationship
           Movie
   title     Star WOB
                               Studio
                        name     Mariaʼs Movies
 category     Drama
                        income    $5 000 000
  studio
                        movies




              Movie

              Movie
Don’t load them all

•   Faulting limits the number of objects fetched

•   We lazily load objects, as we need them

•   The EOModel can define the number to batch fault

•   Separate settings for to-one and to-many faults

•   Deferred faulting provides even more lazzzzzyness
Can you see that?

  EOAdaptorDebugEnabled
       Log4j controls
   Monitor at the database
  Shark, JProfiler, EOEvents
Locking?


•   Well, you really should however, there’s a
    better way...
ERXEC


•   Get ERXEC from Project Wonder!
           End of discussion.
Notifications


 Just give me a shout!
Notifications

•   These allow a single sender to broadcast
    notices that certain events have occured
•   There can be multiple listeners who
    subscribe to the notifications
•   Notification can carry custom UserInfo dict
•   There is no opportunity to change behaviour
Delegation

  This WILL happen.

What SHOULD happen?

  This DID happen.
Delegation
        editingContextShouldFetchObjects(...)
       editingContextShouldValidateChanges(...)
editingContextShouldUndoUserActionsAfterFailure(...)
       editingContextShouldInvalidateObject(...)
          editingContextWillSaveChanges(...)
Delegation
editingContextShouldMergeChangesForObject(...)

•   triggered by ObjectsChangedInStoreNotification

•   if implemented, the EOEditingContext will call it

•   the default behaviour is to merge the changes

•   ONLY record values in this method

•   make changes in editingContextDidMergeChanges(...)
Demo time!


 Freshness Explorer
Review
               Refaulting isn’t so useful


•   pending changes are discarded

•   no notifications

•   no effect on other EOEditingContexts
Review
              Refresh is the smarter way



•   the snapshot is updated by fetching from database

•   existing changes are merged over updated values
Review
                 Invalidate is brute force

•   invalidating effect the entire stack

•   all pending changes in all EOEditingContexts are lost

•   the snapshots are discarded since the EO’s went away

•   database trip needed when fault is touched

•   perhaps many, many database trips unless steps are
    taken
Review
               recovering from invalidate



•   left on their own, faults can be VERY inefficient

•   best to selectively fetch EO’s you’ll need

•   use prefetching paths for even more EO’s all at once
Review
        EOEditingContext’s Fetch timestamp



•   the default might not be what you want

•   default value is 1 hour prior to context creation

•   Never changed unless you do it
Q&A
Mark Ritchie
Diamond Lake Consulting Inc.

Weitere ähnliche Inhalte

Mehr von WO Community

D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful ControllersWO Community
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on WindowsWO Community
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnitWO Community
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache CayenneWO Community
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to WonderWO Community
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative versionWO Community
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" patternWO Community
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W WO Community
 
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languagesWO Community
 
D2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerD2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerWO Community
 
CMS / BLOG and SnoWOman
CMS / BLOG and SnoWOmanCMS / BLOG and SnoWOman
CMS / BLOG and SnoWOmanWO Community
 
Persistent Session Storage
Persistent Session StoragePersistent Session Storage
Persistent Session StorageWO Community
 

Mehr von WO Community (20)

D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
 
Life outside WO
Life outside WOLife outside WO
Life outside WO
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERREST
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W
 
WOver
WOverWOver
WOver
 
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
 
WOdka
WOdkaWOdka
WOdka
 
ERGroupware
ERGroupwareERGroupware
ERGroupware
 
D2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerD2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRoller
 
CMS / BLOG and SnoWOman
CMS / BLOG and SnoWOmanCMS / BLOG and SnoWOman
CMS / BLOG and SnoWOman
 
Using GIT
Using GITUsing GIT
Using GIT
 
Persistent Session Storage
Persistent Session StoragePersistent Session Storage
Persistent Session Storage
 
Back2 future
Back2 futureBack2 future
Back2 future
 

Kürzlich hochgeladen

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Kürzlich hochgeladen (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

EOEditingContext Best Practices

  • 1. EOEditingContext Best Practices Mark Ritchie Diamond Lake Consulting Inc.
  • 2.
  • 3. EOF - The Big Picture
  • 4. EOF - The Big Picture magic
  • 5. Relational Database Title Star WOB Category Drama Studio Mariaʼs Movies
  • 6. Relational Database Title Star WOB Category Drama Studio Mariaʼs Movies Title EOF Next Gen Category Surreal Studio Mariaʼs Movies
  • 7. Relational Database Title Star WOB Category Drama Studio Mariaʼs Movies Title EOF Next Gen Category Surreal Studio Mariaʼs Movies Title The Player Category Comedy Studio Fredʼs Flicks
  • 8. Relational Database Title Star WOB Category Title DramaEOF Next Gen Studio Mariaʼs Movies Category Title Surreal The Player Studio Category Movies Mariaʼs Comedy Studio Fredʼs Flicks
  • 9. Relational Database Title Star WOB Category Title DramaEOF Next Gen Studio Mariaʼs Movies Category Title Surreal The Player Studio Category Movies Mariaʼs Comedy Studio Fredʼs Flicks Movie Table
  • 10. Relational Database Title Star WOB Category Title DramaEOF Next Gen Studio Mariaʼs Movies Category Title Surreal The Player Studio Category Movies Mariaʼs Comedy Studio Fredʼs Flicks Movie Table TITLE CATEGORY Star WOB Drama EOF Next Gen Surreal The Player Comedy
  • 11. Relational Database Title Star WOB Category Title DramaEOF Next Gen Studio Mariaʼs Movies Category Title Surreal The Player Studio Category Movies Mariaʼs Comedy Studio Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 12. Relational Database Title Star WOB Category Title DramaEOF Next Gen Studio Mariaʼs Movies Category Title Surreal The Player Studio Category Movies Mariaʼs Comedy Studio Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 13. Relational Database Title Star WOB Category Title Drama EOF Next Gen Studio Category Mariaʼs Movies Surreal Title The Player Studio Mariaʼs Movies Category Comedy Studio Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 14. Relational Database Title Star WOB Category Title Drama The Player Studio Category Mariaʼs Movies Comedy Studio Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 15. Relational Database Studio Mariaʼs Movies Studio Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 16. Relational Database Studio Table STUDIO_ID NAME 42 Mariaʼs Movies 69 Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 17. Relational Database Studio Table STUDIO_ID NAME 42 Mariaʼs Movies 69 Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 18. Relational Database Studio Table STUDIO_ID NAME 42 Mariaʼs Movies 69 Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 19. Relational Database Studio Table STUDIO_ID NAME 42 Mariaʼs Movies 69 Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 14 EOF Next Gen Surreal 27 The Player Comedy
  • 20. Relational Database Studio Table STUDIO_ID NAME 42 Mariaʼs Movies 69 Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 27 The Player Comedy
  • 21. Relational Database Studio Table STUDIO_ID NAME 42 Mariaʼs Movies 69 Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 27 The Player Comedy
  • 22. Relational Database Studio Table STUDIO_ID NAME 42 Mariaʼs Movies 69 Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 27 The Player Comedy
  • 23. Relational Database Studio Table STUDIO_ID NAME 42 Mariaʼs Movies 69 Fredʼs Flicks Movie Table MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 27 The Player Comedy 69
  • 24. Fetching Movie Table MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 27 The Player Comedy 69
  • 25. Fetching Movie Table MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 27 The Player Comedy 69
  • 26. Fetching title Star WOB category Drama studio Movie Table MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 27 The Player Comedy 69
  • 27. What’s an EO? • An instance of a Java class • Which inherits from EOEnterpriseObject • It probably has custom behaviour • It’s uniquely identified by it’s GlobalID • Typically defined by the EOModel
  • 31. EOF Stack EO EO EO
  • 32. EOF Stack EO EO EO EOModelGroup
  • 33. EOF Stack EO EO EO EOModelGroup EOModel
  • 34. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel
  • 35. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator
  • 36. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabaseContext
  • 37. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext
  • 38. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EOAdaptor
  • 39. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EOAdaptor EOAdaptorContext
  • 40. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext
  • 41. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 42. EOF Stack EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 43. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 44. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 45. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 46. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel plist EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 47. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel plist EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 48. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel plist EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel sql
  • 49. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel plist EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel dictionaries EOAdaptor EOAdaptorContext EOAdaptorChannel sql
  • 50. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel plist EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel dictionaries EOAdaptor EOAdaptorContext EOAdaptorChannel sql
  • 51. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel plist EOObjectStoreCoordinator EnterpriseObjects EODatabase EODatabaseContext EODatabaseChannel dictionaries EOAdaptor EOAdaptorContext EOAdaptorChannel sql
  • 52. Handling Information EO EO EO EOModelGroup EOEditingContext EOModel plist EOObjectStoreCoordinator EnterpriseObjects Snapshots EODatabase EODatabaseContext EODatabaseChannel dictionaries EOAdaptor EOAdaptorContext EOAdaptorChannel sql
  • 53. Object Stores EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 54. Object Stores EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 55. Peer EOEditingContexts EO EO EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 56. Peer EOEditingContexts EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 57. Peer EOEditingContexts EO EOModelGroup EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 58. Peer EOEditingContexts EO EO EOModelGroup EOEditingContext EOEditingContext EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 59. Peer EOEditingContexts EO EO EO EOModelGroup EOEditingContext EOEditingContext EOEditingCon EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 60. Peer EOEditingContexts EO EOEditingContext EO EO EO EOModelGroup EOEditingContext EOEditingContext EOEditingCon EOModel EOObjectStoreCoordinator EODatabase EODatabaseContext EODatabaseChannel EOAdaptor EOAdaptorContext EOAdaptorChannel
  • 61. Creating peer EC’s EOEditingContext ec = session.defaultEditingContext(); EOEditingContext peer = new EOEditingContext();
  • 62. Creating local copies When you have a reference to an EOEnterpriseObject and you want a local copy: EOEnterpriseObject localObject = EOUtilities.localInstanceOfObject(newEC, remoteObject);
  • 63. Object Stores EO EO EO EOEditingContext EOObjectStoreCoordinator EODatabaseContext
  • 64. Nested EditingContexts EO EO EO EOEditingContext EOEditingContext EOObjectStoreCoordinator EODatabaseContext
  • 65. Back here again? EO EO EO EOEditingContext EOObjectStoreCoordinator EODatabaseContext
  • 66. Multiple Database EO EO EO EOEditingContext EOObjectStoreCoordinator EODatabaseContext
  • 67. Multiple Database EO EO EO EOEditingContext EOObjectStoreCoordinator EODatabaseContext EODatabaseContext
  • 68. Back to Fetching title Star WOB category Drama studio MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42
  • 69. Back to Fetching Movie title Star WOB category Drama studio MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42
  • 70. Back to Fetching Movie title Star WOB category Drama studio MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42
  • 71. Back to Fetching Movie title Star WOB category Drama studio MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 STUDIO_ID TITLE CATEGORY 42 Mariaʼs Movies $5 000 000
  • 72. Back to Fetching Movie title Star WOB category Drama studio MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 STUDIO_ID TITLE CATEGORY 42 Mariaʼs Movies $5 000 000
  • 73. It’s a relationship Movie title Star WOB Studio name Mariaʼs Movies category Drama income $5 000 000 studio movies MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 STUDIO_ID TITLE CATEGORY 42 Mariaʼs Movies $5 000 000
  • 74. It’s a fault Movie title Star WOB Studio name Mariaʼs Movies category Drama income $5 000 000 studio movies MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 STUDIO_ID TITLE CATEGORY 42 Mariaʼs Movies $5 000 000
  • 75. The Studio lives! Movie title Star WOB Studio name Mariaʼs Movies category Drama income $5 000 000 studio movies MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 STUDIO_ID TITLE CATEGORY 42 Mariaʼs Movies $5 000 000
  • 76. The Studio lives! Movie title Star WOB Studio name Mariaʼs Movies category Drama income $5 000 000 studio movies MOVIE_ID TITLE CATEGORY STUDIO_ID 12 Star WOB Drama 42 14 EOF Next Gen Surreal 42 STUDIO_ID TITLE CATEGORY 42 Mariaʼs Movies $5 000 000
  • 77. Looking at the movies Movie title Star WOB Studio name Mariaʼs Movies category Drama income $5 000 000 studio movies
  • 78. A to-many relationship Movie title Star WOB Studio name Mariaʼs Movies category Drama income $5 000 000 studio movies
  • 79. A to-many relationship Movie title Star WOB Studio name Mariaʼs Movies category Drama income $5 000 000 studio movies Movie Movie
  • 80. Don’t load them all • Faulting limits the number of objects fetched • We lazily load objects, as we need them • The EOModel can define the number to batch fault • Separate settings for to-one and to-many faults • Deferred faulting provides even more lazzzzzyness
  • 81. Can you see that? EOAdaptorDebugEnabled Log4j controls Monitor at the database Shark, JProfiler, EOEvents
  • 82. Locking? • Well, you really should however, there’s a better way...
  • 83. ERXEC • Get ERXEC from Project Wonder! End of discussion.
  • 85. Notifications • These allow a single sender to broadcast notices that certain events have occured • There can be multiple listeners who subscribe to the notifications • Notification can carry custom UserInfo dict • There is no opportunity to change behaviour
  • 86. Delegation This WILL happen. What SHOULD happen? This DID happen.
  • 87. Delegation editingContextShouldFetchObjects(...) editingContextShouldValidateChanges(...) editingContextShouldUndoUserActionsAfterFailure(...) editingContextShouldInvalidateObject(...) editingContextWillSaveChanges(...)
  • 88. Delegation editingContextShouldMergeChangesForObject(...) • triggered by ObjectsChangedInStoreNotification • if implemented, the EOEditingContext will call it • the default behaviour is to merge the changes • ONLY record values in this method • make changes in editingContextDidMergeChanges(...)
  • 90. Review Refaulting isn’t so useful • pending changes are discarded • no notifications • no effect on other EOEditingContexts
  • 91. Review Refresh is the smarter way • the snapshot is updated by fetching from database • existing changes are merged over updated values
  • 92. Review Invalidate is brute force • invalidating effect the entire stack • all pending changes in all EOEditingContexts are lost • the snapshots are discarded since the EO’s went away • database trip needed when fault is touched • perhaps many, many database trips unless steps are taken
  • 93. Review recovering from invalidate • left on their own, faults can be VERY inefficient • best to selectively fetch EO’s you’ll need • use prefetching paths for even more EO’s all at once
  • 94. Review EOEditingContext’s Fetch timestamp • the default might not be what you want • default value is 1 hour prior to context creation • Never changed unless you do it
  • 95. Q&A Mark Ritchie Diamond Lake Consulting Inc.