Fork me on GitHub
#ldnclj
<
2015-09-08
>
afhammad07:09:40

how many of you work from home?

afhammad07:09:50

@pupeno: sounds like you’ve been messing with nashorn and SSR. I’m going to be trying it with Om in the coming weeks so any tips/gotchas welcome

Pablo Fernandez07:09:04

@afhammad: I found creating the engine on each request too slow. Also, nashorn may or may not eat ram like it was candy. This lead me to put the script engines in a pool, so they can be reused. I did a lot of load testing to make sure it was behaving well. The code I wrote is here: https://github.com/ldnclj/proclodo-spa-server-rendering and I’m writing a blog post about it.

afhammad07:09:11

@pupeno, awesome, will lookout for it! thanks

Pablo Fernandez07:09:45

afhammad: an approach I’m interested in taking is to make all the rendering code cljs and run in directly on the JVM. That should be much more performant.

Pablo Fernandez07:09:20

I’m not the first one: http://davidtanzer.net/server_side_rendering_with_re_frame but I really don’t want to use Hiccup as it’s XSS vulnerable.

afhammad07:09:44

you mean cljc?

afhammad07:09:23

cool, looks like i’ll have to roll my sleeves up more than i was anticipating.

Pablo Fernandez07:09:41

It was not easy and I don’t think I have the ultimate solution yet, but I’m happy with how far I got. I don’t know, though, which challenges you’ll find with Om. Nashorn doesn’t implement a full browser so there’s a lot of ClojureScript that simply won’t run in it.

Pablo Fernandez07:09:17

@afhammad: oh, this is a server-side rendered Om app: https://github.com/DomKM/omelette

Pablo Fernandez07:09:06

I learned quite a bit from it. It is a proof of concept though, so, for example, it’s ignoring the fact that creating the scriptengine on each request will add .4s to your requests. 😡

Pablo Fernandez07:09:54

I managed to achieve this though:

jonpither10:09:54

prepping for my talk tonight, intro to ClojureScript

xlevus10:09:01

There's a talk on tonight?

jonpither10:09:06

Yeah, I'm giving a somewhat gentle intro to ClojureScript / React / Om. @malcolmsparks is going to do a smallish follow-on about Reagent

thomas11:09:11

would love to hear it

benedek11:09:20

i’ll be there simple_smile

Pablo Fernandez12:09:09

@jonpither: how long will the intro take? that seems to be a lot of ground to cover in a short time in a gentle way.

jonpither12:09:32

I'm thinking about an hour

jonpither12:09:06

I would aim for exposure to the CLJS working env, Om, React. But you're right it'll be a tight fit

jonpither12:09:18

gah, I am bot

jonpither12:09:14

your clojurescript slack wrapper: https://github.com/juxt/fuzz

Pablo Fernandez13:09:47

Oh geez, my blog post for isomorphic clojurescript is already 1500 words long and I still haven’t reached the good bits.

jonpither13:09:50

Have you got a link to it?

jonpither13:09:50

Have you got a link to it?

benedek13:09:07

jon does sound like a bot… 😉

jonpither13:09:20

Some kinks to iron out

jonpither13:09:25

Ah well, I'll stop hacking around on this chan, annoying you folk

jonpither13:09:25

Ah well, I'll stop hacking around on this chan, annoying you folk

jonpither13:09:49

no idea why it's doing it twice

xlevus15:09:58

maybe it's a big, empty room?

xlevus16:09:31

blrhghrgh. Guess I'm not going to tonights talk.

jonpither16:09:04

Which is the skillzmatter pub of choice?

otfrom16:09:10

not sure now tbh

thomas16:09:21

good luck tonight guys.

malcolmsparks17:09:54

great talk so far

benedek17:09:58

jonbot still there?

practicalli-johnny17:09:12

i love clojurescript

practicalli-johnny17:09:18

@jonpither: is the git repo up to date? I have no menu of links under the title

jonpither18:09:03

Hello from the talk

practicalli-johnny18:09:37

Hello Clojurescript app

practicalli-johnny18:09:01

This is a very cool project, thanks jon

otfrom21:09:47

so.... om.next? now? later? reagent?

otfrom23:09:35

ok then... why?