Agreed, you are definitely correct.
I think depending on implementation it would be specific to what you
are doing. For instance if we're visiting different domain objects and
their descriptions to create the PDF, we might have certain kinds of
objects to represent the output we want.
Additionally, you are mentioning one use for Magritte. Lukas mentioned
some others in one of his posts. Magritte to me is simply a good
implementation of meta-programming constructs I have used in other
languages such as .NET, Java, Lisp, Ruby, C++, etc. For instance,
.NET has reflection and attributes which allows for some similar
constructs as Magritte, but definitely not as flexible. Previously, I
used .NET attributes to create a simple Object to RDF converter.
Obviously though I'd rather work with Smalltalk :)
Output formats is just one goal for me, another one is searching my
object graph, for example as done in Pier. Ramon's implementation of
Magritte to generate Glorp descriptions is another.
I'd be happy to share anything that I produce regarding conversions. I
brought some of this up because after exploring what I could find in
Squeak for RDF in particular, it was frustrating. I did not want have
to do things like create anything cased out or with specialized extra
objects. I wanted to just use my existing objects and extend them in a
way that didn't interfere with what I was already doing. Since my
Magritte descriptions are already there and exist on the meta level,
it's a good choice I think.
Quoting Jason Johnson <jason.johnson.081(a)gmail.com>om>:
I don't think I expressed myself clearly.
Magritte is (as I
understand it) a way to provide extra meta "descriptions" of how your
objects might be presented. Other components can take these
components and turn them into some representation. For example, the
Seaside Magritte renderer takes these descriptions and makes HTML.
You could create e.g. a PDF renderer that reads these descriptions and
generates a PDF item from them. I know that would be a lot of work,
but once it's done one time we all have it.
_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki