• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
data source for “static” objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

data source for “static” objects?


  • Subject: data source for “static” objects?
  • From: ocs--- via Webobjects-dev <email@hidden>
  • Date: Sun, 7 Jun 2020 18:37:47 +0200

Hi there,

let me please ask another weird question. For the context, thing is, one of our applications supports “predefined” EOs -- things like static lists and similar. In our case, they are completely defined in the Java code -- the number of them, all their attributes, whatever. Then, runtime, they are shared for all users/sessions/editing contexts.

Since they need to be real EOs (they mix with normal dynamically defined objects, they are part of relationships, etc), it brings non-trivial problem how to implement the stuff.

At this moment, we
- at launch, synchronise these objects into the database: if the Java code defines a new object which has not been there, it is inserted; if there are changes in attributes, they are updated. If an object of this kind is found in the database and there's no description for it in the Java code, it is deleted;
- then we load them into the shared EC for all users to share them.

It works, but the synchronisation approach is ugly; it feels sort of wrong to keep copies of those static objects in the database.

Now, I wonder: EOF does support multiple data sources. How difficult and error-prone would it be to implement my own data source, which would -- instead of from a DB -- “load” objects from the application predefined code? Would it be possible? Wouldn't it bring more problems than the old code did? To illustrate the idea, here's the notorious Apple pic, tweaked appropriately:

Has anybody out there already tried something like that, and if so, with any luck?

Thanks,
OC



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: data source for “static” objects?
      • From: Aaron Rosenzweig via Webobjects-dev <email@hidden>
  • Prev by Date: Re: Apache for Dev and breakpoints
  • Next by Date: Re: data source for “static” objects?
  • Previous by thread: Re: Apache for Dev and breakpoints
  • Next by thread: Re: data source for “static” objects?
  • Index(es):
    • Date
    • Thread