Re: [NTLK] What's in the Soup?

From: Eckhart Köppen (eck1001_at_gmx.net)
Date: Mon May 10 2004 - 11:40:50 PDT


On Mon, 10 May 2004 10:41:56 -0700, NewtonMP - Paul Curtis wrote:
> So
> there are many things I'm still not sure about and Soup's are one of them.
> It seems that they are known well enough by our elders that it's second
> nature and a mystery for Newtonian's like myself. So can we have a lively
> discussion about them, thanks?

A soup is a simplified version of an object oriented database. Soups
are not truly OO databases because some "smart" flattening of the
entries takes place before they are added to the database.

> I'm trying to relate Soups to Window's, only because that's what I'm
> comfortable with. I'm thinking they are similar to .ini files and the
> registry?

More .ini files than the registry.

> Some .pkg's need/have soups to operate and each soup has it's
> package that it belongs to,

Not necessarily. A soup can exist without any application owning it,
similar to a file on the desktop.

> but no soup works for multiple .pkg's?

No, soups are usually refered to by name (like files) and can be opened
and used by many applications at the same time. The neat thing is that
an application does not really need to know the complete structure of
the entries in a soup, it just needs to make some sense of the things
it is interested in (An entry is a data structure of {key, value}
pairs).

> Also,
> when deleting a .pkg doesn't mean that the soup gets whacked too, so there
> could be residual soups lying around?

Yes. The problem is that the Newton does not know if an application has
been deleted or if it was just on a flash card the user chose to eject.
So to be on the safe side, the Newton does not delete soups by itself.

> They seem to be hidden? Where are they
> located, is it a central location or up to the package to place?

Regarding the actual storage, Paul or Filip know this best, but they
are not hidden. They are right there under your nose, in the Storage
folder of Extras ;) It is however a simplified view (combining soups on
the internal and card stores, so called union soups).

> Are they
> always in heap or not?

Fortunately not. Like a database, you only read the entries you need.

> What's in the soup, what's not?

You can put almost any NewtonScript object into a soup, but in some
cases, you have to be careful that you're not putting to much into one
entry.

> Can we have some soup central here? I need to know.

Have you taken a look at "Programming Newton for the Macintosh" on
UNNA? It is an execellent book, highly recommended.

Eckhart

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Mon May 10 2004 - 12:00:00 PDT