[aida] Transient objects URI

Janko Mivšek janko.mivsek at eranova.si
Wed Dec 17 15:04:52 CET 2008

Hi Esteban,

Esteban A. Maringolo wrote:

> How do you manage the url of transient objects?
> It is... not all the objects have a persistent RESTful URI.

For transient objects you need manually remove them from URL resolver 
after you don't need them anymore:

    (AIDASite named: 'aidademo) urlResolver removeObject: yourObject

It would be nice if the URL resolver would be kind of WeakDictionary to 
remove such an object automatically, but many Smalltalks are weak here, 
so I gave up that idea quite early.

But, if there is an idea how to solve that better, we can improve URL 
resolving for transient objects better ...

Also, you can extend the URLResolver to suit your needs, for instance to 
calculate from URL a key for reaching the object, which is handy for 
objects in relational databases.

> For example, if you have a checkout procedure or a wizard, that instance 
> is going to exist only once, and its URI should be the same always, e.g. 
> '/foo/creationwizard'.
> The concept of an URI for each object is ok, and homogeneous, but for 
> some objects I simply don't want it. I don't want to preserve a record 
> object-> uri.
> Am I using it wrong?

Best regards

Janko Mivšek
Smalltalk Web Application Server

More information about the Aida mailing list