« Return to Thread: Semantic Web using Magritte

Re: Semantic Web using Magritte

by Yossi M :: Rate this Message:

Reply to Author | View in Thread

Yes, I looked at that too which is one of the reasons I am asking for  
best practices/guidance/feasibility. I was wondering if there was some  
reason why Pier didn't use the descriptions like that as Lukas  
mentioned.

The thing about RDF is that it involves creating ontologies.  
Everything is derived from concepts and such. Depending on the other  
things you use like n-tuples, you end up with "is a" and "has a"  
relationships. I thought the notion of 1-many, 1-1, etc. in Magritte  
might be an interesting way to map to this. I have so many domain  
objects, I really need my ontologies to be consistent and not go all  
over the place pointing at random schemas because another developer  
didn't know I already defined "what is an album" in RDF.

Anyway, I've got a lot of other things to bang out first, so for now  
the best I'm going to produce is some proofs of concept. At some  
point, if anything I do is worth sharing, I'll put it up on  
squeaksource or somewhere else.

Quoting Lukas Renggli <renggli@...>:

>> Just by analogy: did you have a look at the way PierBlog creates the
>> RSS feed for the blog? Seems to be a similar problem...
>
> It doesn't really use the descriptions to generate the blog items, it
> could (or better it should) though.
>
> Lukas
>
>>
>>
>> -- Matthias
>>
>> On Dec 5, 2007 3:33 PM,  <smalltalk@...> wrote:
>>> Thanks for the input, I had definitely considered that. I was even
>>> looking at XSLT but I really like keeping everything in Smalltalk. I
>>> do indeed need to go many directions since there are many entry
>>> points
>>> and services with this application. I also have explored creating new
>>> canvases and doing some things with Readers/Writers like in Pier.
>>>
>>> I would do exactly what your describing, but I still am left with the
>>> problem of generating good output from my objects. So for example,
>>> sticking with music, say we have an Album object. I have all kinds of
>>> stuff already for Magritte in there for this object. Now I want to do
>>> something like in my seaside control provide an RDF button that when
>>> clicked, generates the RDF output. I would need to traverse the
>>> entire
>>> object/description graph and output the RDF with the album name,
>>> title, etc. and the track listing, and then artist info, etc. It
>>> definitely would suck without the metadata to identify which RDF URI
>>> corresponds with each object in the graph.
>>>
>>> Essentially, I am thinking of creating a simpler
>>> serializer/deserializer driven by Magritte descriptions similar to
>>> what I've done before in .NET and Java. I am just not sure if that is
>>> very Smalltalk like as I like to always think there is a better way
>>> than resorting to what I have done in those languages :)
>>>
>>> For instance, there is a JSON serializer in .NET where I can say
>>> Album.ToJSON(), or the XML serializer Album.ToXML(). It so happens
>>> that depending on the serializer/deserializer, it will read
>>> attributes
>>> I put on my class like [XmlIgnore]. That stuff is really primitive I
>>> think compared to what I can do in Magritte.
>>>
>>> I guess I am trying to prevent a future meltdown because as this
>>> application is developed, I am going to have to start going back and
>>> forth with lots of web services to communicate with Java and Flash in
>>> particular. I want to set a good example on the Smalltalk side by
>>> generating everything automagically.
>>>
>>>
>>> Quoting Philippe Marschall <philippe.marschall@...>:
>>>
>>>> Hi
>>>>
>>>> For audioscrobbler I did the opposite, from given XML to Magritte:
>>>> http://source.lukas-renggli.ch/audioscrobbler.html
>>>> The audioscrobbler xml is quite gay and I was surprised when I got
>>>> it
>>>> working. It is also used for feed parsing of the Seaside homepage.
>>>>
>>>> Cheers
>>>> Philippe
>>>>
>>>> 2007/12/5, smalltalk@... <smalltalk@...>:
>>>>> I was wondering if anyone tried to do any kind of XML mapping using
>>>>> Magritte. I have the requirement to generate RDF from my business
>>>>> objects, so I was thinking of ways to simplify this. My idea was to
>>>>> add something in the Magritte descriptions for each object that
>>>>> pointed to the appropriate URI and schema.
>>>>>
>>>>> This may be more trouble than its worth. I suppose anyone who has
>>>>> done
>>>>> anything with generating XML from Magritte could maybe provide some
>>>>> insight on any hurdles they faced, design ideas, etc.
>>>>>
>>>>> I also am looking at Magritte for simplifying XML serialization in
>>>>> general. My problem overall is that I have to generate all these
>>>>> formats (XML for web service, RSS, ATOM, RDF) and I do not want to
>>>>> have to write a complex parser to even do this 1/2 way dynamically.
>>>>> Are there any other libraries out there that do this already? For
>>>>> instance, I did notice that there is that library (name escapes me)
>>>>> that lets you port your objects between Smalltalk versions by
>>>>> dumping
>>>>> to XML files, so that is somewhat close to what I need to do.
>>>>>
>>>>> I am thinking since I already have a large number of Magritte
>>>>> descriptions, I might as well expand upon that. This will also
>>>>> let me
>>>>> do things like change a schema dynamically and provide easy access
>>>>> memento objects to do things like create a preview of whatever
>>>>> format
>>>>> I am trying to produce. Thoughts?
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> SmallWiki, Magritte, Pier and Related Tools ...
>>>>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>>>>>
>>>>
>>>> _______________________________________________
>>>> SmallWiki, Magritte, Pier and Related Tools ...
>>>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> SmallWiki, Magritte, Pier and Related Tools ...
>>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>>>
>>
>> _______________________________________________
>> SmallWiki, Magritte, Pier and Related Tools ...
>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>





_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

 « Return to Thread: Semantic Web using Magritte

LightInTheBox - Buy quality products at wholesale price