[deepamehta-devel] Question About the Webclients Controller

Jörn Weißenborn joern.weissenborn at gmail.com
Mi Jan 29 20:04:06 CET 2014

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) {

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 <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
> deepamehta-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/deepamehta-devel
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.deepamehta.de/mailman/private/devel-lists.deepamehta.de/attachments/20140129/eff53c40/attachment.html>

Mehr Informationen über die Mailingliste devel