[aida] Tutorial bug with preferedUrl?

BobCalco bobcalco at gmail.com
Fri Jan 27 13:15:12 CET 2012

Another point. :)

I don't like that "URLResolver default changeToPreferedURL:" requires
a domain object to implement preferedUrl.

URLResolver changeToPreferredURL should take a "plain ol'" domain
object -- say, MyDomainObject -- and look for a corresponding
MyDomainObjectApp (as happens anyway in the view subsystem). Then it
should call MyDomainObjectApp>>preferredUrlFor: aMyDomainObject. It's
the app's job to know about URLs, not the domain object's, in my

Not finding a MyDomainObjectApp>>preferredUrlFor: aMyDomainObject, it
could then just default to the current naming scheme.

This is an interesting area in general as I like the RESTful way of
nesting resources. Such nesting can get out of hand if taken too
deeply but in any case this kind of thing needs to be negotiated
between Apps (whose nesting can be implied by the relationships
between domain objects, really) and not in any way codified in the
domain objects themselves.

This is where a metadata framework like Magritte for Seaside would
come in handy in Aida. :)

- Bob

On Jan 27, 10:08 am, Robert Calco <bobca... at gmail.com> wrote:
> I have implemented the Aida tutorial but notice a quirk when adding new
> entries, namely, the URL of the new object is always "-c". For example, if
> you add 'Jack', 'Beanstalk', '1234567890', 'j... at beanstalk.com', the URL of
> the new entity is '/address/-c'. It seems to me it should generate
> correctly the URL '/address/beanstalk' instead.
> In order to fix the situation I have to run
> book addresses do: [ :each | URLResolver default changeToPreferedURL: each
> ].
> ... (fortunately I have the 'book' reference in my transcript which I don't
> dare lose). Then everybody's URL is right.
> - Bob
> _______________________________________________
> Aida mailing list
> A... at aidaweb.sihttp://lists.aidaweb.si/mailman/listinfo/aida

More information about the Aida mailing list