Json visitor and MAFileModel
Ronaldo Ferraz
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.
Cheers,
Ronaldo
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?
>
> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
--
Ronaldo Ferraz
http://log.reflectivesurface.com
More information about the smallwiki
mailing list