[deepamehta-devel] Question About the Webclients Controller

Juergen Neumann j.neumann at junes.eu
Fr Jan 31 13:33:20 CET 2014

Hi Jörn,

not sure if it is of any help, but have you chekced Dannys dmx-client: 




Am Mittwoch, den 29.01.2014, 20:04 +0100 schrieb Jörn Weißenborn:
> Cool, thanks. I play with it.
> As a idea for future: Wouldn't it be nice to have a kind of JavaScript service which an 3rd party developer can simply employ by adding script tag to its main index? Especially with all the modern mvc framworks, I think it would cool if a developer could something like creating a list of all topics in a given topicmap by doing something like
> dm4.iteratatopics(idoftopicmaps, function(t) {
>    $("#myelement").append(p).text(t.value)
> })
> I think the standart clients models are of very general use, since most applications interacting with deepamehta would need to translate its models into a dm model anyway. So with such a service, a developer could focus an the important part, which is the map between his view and dms datamodel.
> Best, Joern
> 2014-01-29 Jörg Richter
> < mailto:jri at deepamehta.de jri at deepamehta.de
> >
> On Jan 28, 2014, at 21:30, Jörn Weißenborn wrote:
> > I also want to employ the assoc, topicmap and topic models of the standart client. Is there a stright forward way to e.g. get a topicmap_viewmodel in my application?
> No. For 3rd-party DM clients the least common denominator is the RESTClient.
> The DM Webclient's model classes (Topic, Association, TopicmapViewmodel) are specific to it. E.g. the TopicmapViewmodel includes a single-object selection model. Your client might support multiple-object selection.
> However, your client might be able to use the DM Webclient's model classes to a certain degree by mocking the global dm4c object the model classes rely on:
>         dm4c = {}
>         dm4c.restc = new RESTClient()
> Note: this is not officially supported. Try it on your own.
> > How does the RestClient know where to connect?
> The RESTClient is AJAX based. So it connects to the same host and port it was loaded from. JavaScript's same-origin policy applies. Your client's main HTML page which embeds the RESTClient must be served from a DM plugin.
> Cheers,
> Jörg
> _______________________________________________
> deepamehta-devel mailing list
> mailto:deepamehta-devel at lists.berlios.de deepamehta-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/deepamehta-devel https://lists.berlios.de/mailman/listinfo/deepamehta-devel
> _______________________________________________
> deepamehta-devel mailing list
> deepamehta-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/deepamehta-devel

Mehr Informationen über die Mailingliste devel