Fork me on GitHub

build status: 🎉


What would you use for serverside rendering of HTML if performance ins important? I am seeing Selmer and Hiccup being used, but also rum being an option for SSR (and claiming to be faster than hiccup).


Currently in production with Selmer -- you can turn page cache on or off as well. I have also used Rum SSR because of a dynamic cljs app and wanted the SSR for SEO and for the perception of very fast page loads -- it works 😃 i don't think it's very hard to be faster than hiccup xD and it's unclear if selmer is faster than rum but the {% inject a variable into the page %} notation is very helpful to selectively render components. if you are building an SPA and also want SEO benefits for pages, rum is the way to go, if you are just doing html / low dynamism then selmer is recommended by me. Don't know about htmx.


Thanks for the perspective, @U3ES97LAC!


you got it. rum is excellent for spa and the fact that it can do SSR correctly without much difficulty is very nice -- of course, the components have to be identical in order for dynamic loading of components to work -- so aside from making sure the rendered HTML from the js object [cube, sphere, saltwater code tentacle creature] and the SSR'd version are abso-flippin-lutely the same, it's a joy for SPA w/ SSR. [single page apps with sever-side rendering, for the casual reader]


i would be very surprise if any of them is faster than Selmer also be aware that hiccup doesn’t have a good story against XSS.


and between selmer and rum, do you need really need react? I think Selmer with a bit of can take you far. That’s the choice we made a couple of weeks ago at least 🙂


Thanks! You can use rum entirely on the backend like hiccup, without any React: But it’s more of a niche


but i am kid from the 80s, never really to into SPAs


Me neither, I’m trying SSR with progressive enhancement, so HTMX also looks promising, thanks! And I’m also leaning towards Selmer, doing most of the templating in HTML is really appealing


i know, we also checked rum, but decided to go with a traditional template engine as we had to have designers touch the templates


at the end our pages are not so dynamic, if we would have go with hiccup like syntax we wouldn’t really gain much.


Hiccup has a 2.0alpha which fixes the XSS hole


The thing I liked about hiccup is consistency in the markup, I’m often “visually overwhelmed” when mixing markup with tags. Having everything as Clojure code sounds nice, but in the end, it’s not easy to read a whole document written in Hiccup, either

yes 3

@orestis yes, but it’s been in alpha for quiet some time. Not really sure if it’s evern going to be released.


I developed some internal tools using hiccup mainly because I could use the REPL on a production server 😉


Hiccup (alpha) is now also part of babashka.


Selmer isn’t yet but often a str/replace works just as well for me, for templating


We do use selmer in our production app. Also for email templates


Sorry if this question is unrelated to Clojure. But I think I can find the answer here. Please don't me if this question is not suitable. • Because I am not living in the USA or study at Stanford or similar university, or similar education system. I wonder what demands a normal top school's students need to achieve to become a junior engineer or computer science. • This picture make me confuse, so what we need 200-300 is minimum requirement course to become junior engineer or 300-400/or even 500-600 (?) • I am confusing that what is the different between undergraduate and graduate. Is graduate is belong to the level of doctor/master or still in bachelor level ?. • ( I am understanding that doctor/master degree is a higher academic level compare with bachelor.) • I try to googling about this problem several hours it seem complex than I think.

The first digit of a CS course number indicates its general level of difficulty:

    0-99 service course for non-technical majors
    100-199 other service courses, basic undergraduate
    200-299 advanced undergraduate/beginning graduate
    300-399 advanced graduate
    400-499 experimental
    500-599 graduate seminars


In the USA at least, it is typical to finish high school at about age 17 or 18, and that is often the youngest that one begins attending college or university. The most common is to attend for 4 years, which if you complete the requirements you graduate and get a bachelor's degree. Many people stop there and get a job. Some immediately (or several years later) take graduate-level classes with the goal of achieving a master's degree (usually 2 to 3 years of class work, and sometimes writing a master's thesis or doing a project is a requirement for some master's programs). A smaller fraction continue on to get a doctorate degree.

👀 3
🎉 3

People who do not have a bachelor's degree yet are called undergraduates. People who have a bachelor's degree, but not yet a master's or doctorate degree, are called graduates.


That exactly a perfect answer I need. Oh god... thank you very much.


It'd be nice if people would choose less of Selmer and Enlive and more of and Methinks.


If you need to work with UI/UX folks and they need to be able to read/edit your HTML templates, picking Selmer makes a lot of sense since "Django-style" templates are a lot more accessible to those folks than either Comb or Fleet.

👍 3

@U04V70XH6 Same with styling. Styling via the programming language removes any UI/UX person from being to work on the application / web site


DHH on Bascamp UI people doing some level of programming:


comb also works from source with babashka. I once did a port of the Clojure Toolbox which uses babashka instead of ruby:


I wasn’t aware of Fleet. Looks useful


@claudius.nicolae what’s their advantage?


plain clojure templating; same arguments as smarty vs plain php templates, whatever vs ERB, whatever vs EJS

👍 6

actually enlive is somethig our designers would love 🙂


Today I learned there's more than Selmer and hiccup 😅


Thanks for sharing, did not know of these


On my projects, I'm using cljstache as it works with moustache, which a lot of frontender's know.


Tis rather good.


Beyond <embedded lang x> I only tolerate mustache - because it's generality, and generally avoid it too. And hiccup - hiccup is a good thing.


I use hbs because we have some handlebar templates lying around. But I’m converting some of those to hiccup so I can make components 🙂


If you need to work with UI/UX folks and they need to be able to read/edit your HTML templates, picking Selmer makes a lot of sense since "Django-style" templates are a lot more accessible to those folks than either Comb or Fleet.

👍 3

I have my home PC and my work laptop hooked up to the same three monitors, the laptop has a docking station that has some USB ports so I plug my keyboard and mouse into that hub when I use laptop, then unplug them and plug them into PC when I'm finished with work. I also have to go hit the input buttons on the three monitors as well. Is their a simpler way that I Can reduce this down to pushing one button and not moving dongles?

Kelsey Sorrels23:02:56

Yes. You're looking for a KVM switch. I got one for $36 and it does exactly what you're describing. One button and everything switches


Thanks! Didn't know of KVM switch

Kelsey Sorrels23:02:29

You're welcome. I should note that my purchase was for a single monitor kvm. Three may be more expensive 😄


you don’t need to press any button, it just works 🙂


Also annoying if I've been on work laptop all day and I switch keyboard back to my PC (Ubuntu) and it's on the lock screen, it doesnt' always recognise the keyboard is plugged in, so Ihave to plug and unplug it a few times...


There has to be a better way.

Lennart Buit23:02:46

In the good old days there used to be KVM switches, but I don’t know how reliable that is in the newly digitized world


I don’t currently have a need for it, but this looks kind of interesting. Would have to make sure security is up to snuff tho.

👍 9

That is really cool post, thanks!