[Seaside] "Injecting" options into a Magritte description

Esteban Lorenzano estebanlm at gmail.com
Tue Oct 1 16:31:04 UTC 2013


On Oct 1, 2013, at 3:15 PM, Esteban A. Maringolo <emaringolo at gmail.com> wrote:

> 2013/10/1 Esteban Lorenzano <estebanlm at gmail.com>
>> 
>> ah, yes... that looks better :)
>> And well, is the only way to do it, so I don't think  is hacky: you have sessions and  session-aware data...
>> It is more a problem of understanding: your descriptions are not part of the model, are part of your view (in my apps I usually put them into a *MyView category).
> 
> Magritte Descriptions are part of my "metamodel". So if I want to
> reuse the description for a non-seaside interface, I shouldn't couple
> it with Seaside. But with the proper refactoring everything is doable.
> :)

Yes, that's something that I discussed several times already. 
By definition, Magritte can be used to describe any metamodel you want (and everybody that knows me knows that I love Magritte and I use it for almost everything)
But in practice, current implementation is thought on defining GUIs, and doesn't fit (or fit badly, with forceps) into other needs. 
I know many people uses them as they are now also to generate JSON or XML... and looks fine but frankly, not needed (many metainformation can be inferred by the model it self, you do not need to say "this is a string", "this is an option"... that's already present). 
That's why for Voyage I chose to use Magritte, but define my own models (and I just have 3: reference to one, reference to many and transient). 

So yes, Magritte is a metamodel, but your implementation is so attached to Seaside, that I still would name it into an *View extension protocol. 

Esteban


> 
> Regards!
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list