3 ms·
I appologize for the late reply, its been one of those days :) Im overdue for a blogpost on my Webdev setup/stack, but in short the main power comes from 1) S
by lbj 6y ago
I appologize for the late reply, its been one of those days :)
Im overdue for a blogpost on my Webdev setup/stack, but in short the main power comes from
1) Seamless transfer of data from back- to frontend and vice versa. If my DB contains a DATETIME I can load this in Clojure as a java.sql.Timestamp and pass it to the browser where its converted to a js/Date - Free data-sharing between front- and backend is a big productivity boost.
2) My usual backend Cloure code, also works in the frontend. That means I can move functions or use libs in the browser that also work in the backend - It also means that my Javascript code is now fully functional, which means 10x shorter and about 10x more robust.
3) Everything is REPL driven. Anything surprising happens in the browser I can inspect those vars that are effected in the REPL, toy with them, fix problems and update instantly. Hunting bugs is much faster this way.
4) Clojurescript functions compile to React components, zero boiler-plate: (defn banner [img txt] [:div.bannerclass [:img {:src img}] [:h1 txt]]) as an example. Thats a complete component, it will only update when the params update.
But like I said, its a bigger talk that I'll hopefully have some time to dive into sooner rather than later.