Fork me on GitHub
#hoplon
<
2017-01-04
>
flyboarder01:01:08

@alandipert: would you be so kind as to make a build for hoplon/brew? Or is there a way I can do that?

flyboarder01:01:01

@jumblerg: how do you push to clojars for hoplon/ui?

alandipert01:01:52

@flyboarder I think we just need to add you to Hoplon clojars org, if you aren't already

alandipert01:01:59

I can do that later tonight

flyboarder01:01:02

cool thanks!

wengi16:01:55

Is it possible to use Hoplon/Javelin as a front-end for an API developed on Phoenix/Elixir?

micha16:01:38

our first application was built as a front end for a php application

wengi16:01:11

@micha great! Newbie here. (1) How would I link the "cells" to the Phoenix/Elixir API for state updates? (2) can you point to tuts I should look at to do this?

flyboarder16:01:39

@wengi: take a look at the hoplon/brew firebase stuff, it is similar in concept

wengi16:01:55

@flyboarder: thanks. I just checked https://github.com/hoplon/brew/blob/master/src/hoplon/firebase.cljs.hl. It looks like I need to create several helper functions to convert the elixir data into a clj data structure. (1) Is this the primary work necessary? (2) Is there anything else I need to consider to make this work?

flyboarder17:01:16

@wengi My usual process for external libs is to write something that interacts with the API and returns Clojure data then write a lib that interacts with javelin

alandipert17:01:09

@wengi interaction w/ a server works the same w/out a clj backend that it would in a typical ajax situation

alandipert17:01:37

you make ajax requests to the server and your callback is called w/ a json payload. to use with cells, reset! or swap! that payload into a cell

alandipert18:01:05

since json data is a subset of what cljs supports, you can stick with json and go far

alandipert18:01:39

the advantage of using cells in this situation is that your client-side logic is associated with cells, and dissociated from the timing of the ajax response

alandipert18:01:55

a level of indirection is provided

alandipert18:01:30

altho, it's not a bad idea to look at how https://github.com/hoplon/castra works. it might be a good way to organize and implement your ajax endpoints in elixir

wengi18:01:54

@flyboarder @alandipert : thanks for the tips!

greenhorse19:01:10

has anybody tried using hoplon with http://nightcoders.net yet ?

alandipert20:01:42

just did - it totally works

alandipert20:01:14

yup - definitely works