biff

A web framework + self-hosted deployment solution for Clojure. Repo: https://github.com/jacobobryant/biff. Docs: https://biff.findka.com
2020-08-15T01:09:10.079500Z

The exception is caused by a bug I noticed recently while working on Findka; I'll put the fix in the Biff codebase in a sec. I'm surprised it showed up in the example project though. haven't seen that before. let me see if I can get the example project working on my lan

2020-08-15T04:00:40.085900Z

@ozzloy_clojurians_net I just pushed some commits to biff that should fix both issues. Everything should work if you set :sha "626842f4c9a2965b86bc8a79384ef6f2b3f99de8" in example/deps.edn. You had the config right for example/config.edn. No need to edit config.edn. That file isn't really used for much (it's used if you start a repl from the top level biff directory, which you might do if you were working on biff. however I usually just start a repl in the example project and change the git dependency to a local dep). The issue was that the :example.biff/host value is actually only used for routing requests after the web server receives them (since you can serve multiple sites from the same biff process). The web server itself was basically hard-coded to listen on localhost (even in prod, since requests are proxied through nginx). I've added some config options and set the defaults so that the web server listens on 0.0.0.0 in dev.

ozzloy 2020-08-15T04:33:26.086400Z

@foo cool. i'll give it a shot again

ozzloy 2020-08-15T04:36:36.086800Z

@foo is there a stable branch?

ozzloy 2020-08-15T04:55:26.087200Z

@foo i'm able to change the host and port!

2020-08-15T05:02:01.087800Z

awesome! currently I just use master

ozzloy 2020-08-15T05:02:32.088400Z

@foo my girlfriend and i just played tic tac toe and now we're getting married and having a child

🎉 1
ozzloy 2020-08-15T05:02:34.088600Z

thanks!

2020-08-15T05:03:43.089200Z

sweet, glad I was able to be a part of it

ozzloy 2020-08-15T05:05:02.089600Z

yeah, it's huge. you're invited to the wedding and the birth

ozzloy 2020-08-15T05:06:53.089900Z

@foo do you have a compare/contrast with fulcro?

ozzloy 2020-08-15T06:26:21.093400Z

i am new to clojure, clojurescript, and web dev. but with biff i've been able to run a tic tac toe game! thanks!

👍 1
2020-08-15T07:21:18.102700Z

fulcro and biff are quite different. they can both be described as "full stack frameworks" but that's about where the similarities end: • fulcro is mostly frontend (but still has significant backend code), while biff is pretty much just backend (with a small amount of frontend code for data syncing & setting up web sockets). Fulcro has you structure your frontend code in a certain way and then provides some data syncing stuff (with pathom) so that you can plug it into your backend. fulcro doesn't care what database you use. Biff is pretty much the exact inverse: Biff sets up a bunch of structure for you on the backend (including what database you use) and then helps you sync data to the frontend, but for the most part biff doesn't care how you structure the frontend. • biff is much, much lighter than fulcro. Fulcro has a lot of features. (though as per the previous point, most of the features that biff and fulcro provide are in a different scope). Fulcro is also mature. • biff also provides some devops code. while it's not tightly coupled to digitalocean, it does make certain assumptions about the production environment.

john-shaffer 2020-08-15T10:18:17.103900Z

If I can get biff ported to Datomic, would you accept a PR to add support? Or would it be better to keep it as a separate fork?

2020-08-15T10:55:22.104800Z

yeah I'd accept a pr

2020-08-15T10:57:55.107900Z

I'm hoping to get to simplifying the biff.crux names page tomorrow by the way. no promises... but I'm hoping haha. main priority tomorrow is optimizing findka tomorrow, so I may be working in that code anyway (adding profiling instrumentation at least)

2020-08-15T11:03:43.108200Z

are you doing cloud or on-prem? just curious

john-shaffer 2020-08-15T11:15:39.108700Z

Cloud, but really just dev-local for now

2020-08-15T11:18:39.110200Z

👍👍

john-shaffer 2020-08-15T12:43:23.110600Z

How is this approach? https://github.com/john-shaffer/biff/commit/b1569f89787d3214cba48d484d66fdf36a1ea276

2020-08-15T19:22:24.112200Z

looks great. at some point we'll want to replace the case forms with a protocol of course but no need to do that now

ozzloy 2020-08-15T21:40:19.112600Z

@foo thanks for the comparison!

👍 1