The :hoplon: ClojureScript Web Framework - http://hoplon.io/

Hello everyone, I tried to use Hoplon using a project build using shadow-cljs I ran into an issue but I am not sure whether it is a bug or it is expected. In my main file I only require hoplon.core; as a result multi methods defined in hoplon.jquery are not brought in and Hoplon implementation of IDeref for the jQuery event is not available. To make it work I have to require hoplon.jquery even if I am not using it directly. Now I am not sure whether it is supported to use Hoplon as a library. I was trying to do something similar to https://yogthos.net/posts/2016-06-06-WorkingWithHoplon.html. Thanks in advance for any feedback.


@mandimby.raveloarinja that's not a bug it's expected as you need to pull in the do!/on! Multimethod implementations


Seems like you're past this point but this is my skeleton project for shadow+hoplon which might be useful https://github.com/jjttjj/shadow-hoplon-starter


It's definitely supported to use as a library in this manner.


You could define you're own implementations of do!/on! And not depend on jQuery at all, or you could use the hoplon.goog version


Indeed that is what I have done. I am not sure it was not explicitly mentioned in the Hoplon wiki. Thank you very much for the feedback.

flyboarder 2018-08-13T03:21:03.000062Z

It has a whole page in the wiki 😉


Indeed. By default boot-hoplon will auto include the hoplon.jquery attribute provider unless another provider is given to the :refers option of the (hoplon) task. This is to maintain backwards compatibility.


Basic thing like do! :value was not working either: silly me for missing that

flyboarder 2018-08-13T14:37:06.000322Z

The Readme snipped has the attribute provider but I think we should comment the snippet more, it’s only clear if you can already read hoplon code but it’s easy to miss things like the attribute provider line

flyboarder 2018-08-13T14:39:01.000564Z

perhaps we can check for attribute providers via meta data in boot-hoplon

flyboarder 2018-08-13T14:39:15.000072Z

(ns hoplon.jquery
  {:hoplon/attribute-provider true})

flyboarder 2018-08-13T14:44:04.000405Z

and just warn if we can’t find any