[deepamehta-devel] Question About the Webclients Controller

Jörg Richter jri at deepamehta.de
Mi Jan 29 01:38:39 CET 2014


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




Mehr Informationen über die Mailingliste devel