[aida] Elements nesting/composition

Esteban A. Maringolo emaringolo at gmail.com
Mon Dec 29 00:04:41 CET 2008


Hello,

I have some assorted questions about the WebElement hierarchy and how
to use it properly.

As far as I understand, every domain object that want to be displayed
through a RESTful URI must have a corresponding WebApplication
subclass (e.g. MyModelApp).

But what happens if I want to factorize my views, so I can have an
"embeddable" view of MyModelApp?
Can I do this?

Should I build a subclass of WebElement, and then use such WebElement
in MyModelApp?

Eg.
Models:
ContainerModel
ElementModel

Applications:
ContainerModelApp
ElementModelApp

Each object will have a RESTful URI, and will end being redirected to
its corresponding App, let's say ContainerModelApp, which will include
a site navigation bar, other stuff, and the ContainerModel view
itself.

What I want to do is:
A. Factorize the raw view of the ContainerModel, in order to be able
to embed it in another App.
B. Embed a small/different view of ElementModelApp in
ContainerModelApp (e.g. a table row view, or some tile-like view).

I don't see a clear distinction between WebElement and WebApplication,
except for the fact that WebApplication includes some methods to
define page title and stuff at a "page" level.


Best regards,

--
Esteban

















Esteban A. Maringolo


More information about the Aida mailing list