Json visitor and MAFileModel
ronaldoferraz at gmail.com
Sun Feb 24 21:38:57 MET 2008
Me and my questions again. :-)
Altough adding descriptions would not make sense to the core, would it
make sense to change MAFileModel into a MAObject? That would make it
easier to build extensions on top of it.
On 2/23/08, Lukas Renggli <renggli at iam.unibe.ch> wrote:
> > For most simple descriptions, streaming the value is just a matter of
> > rendering the value according to the description using the normal
> > visitor pattern. However, MAFileModel is a full-blown class and
> > doesn't have a corresponding description to guide the process.
> Yes, MAFileDescription is sort of a primitive type, mainly because in
> the user interface it appears as a single upload/download field.
> > What would be the most interesting path here: add the required
> > descriptions to the classes or just go ahead and stream the
> > attributes?
> I guess it would make sense to add these descriptions as a class
> extension. This is one of most useful techniques of Magritte, that you
> can attach new descriptions to any class in the system. I use this all
> the time.
> > It seems to me that the second options make the Json visitor to
> > tightly coupled to the MAFileModel class. On the other hand, adding
> > the descriptions may not be that interesting because it would mean
> > changing a Magritte base class.
> I don't know if it makes sense to add these descriptions to the core
> at the moment?
> Lukas Renggli
> SmallWiki, Magritte, Pier and Related Tools ...
More information about the smallwiki