biff

A web framework + self-hosted deployment solution for Clojure. Repo: https://github.com/jacobobryant/biff. Docs: https://biff.findka.com
2020-11-07T02:56:11.029Z

Ok, it is finished! Check out the new docs: https://findka.com/biff/ In particular, look at "Getting started", "Overview" and "Deployment". The other sections have also had some changes, but less dramatic. I'm going to do a big announcement on Monday. If anyone wants to try it out over the weekend and report back, that'd be great. (There's a 1-liner for getting started now: bash &lt;(curl -s <https://raw.githubusercontent.com/jacobobryant/biff/master/new-project.sh>)). I've tested it on Linux so far, planning to test Mac and WSL. And if you wanna help spread the word on Monday, that'd be great too 🙂. Also, copy-pasting this from the Introduction section: > To help Biff grow and to help me discover what needs improvement, I'm giving free one-on-one mentoring (pair programming, code review, design help, etc) to anyone who wants to learn Clojure web dev with Biff (as my schedule allows). If you're interested, fill out https://airtable.com/shrKqm1iT3UWySuxe.

👏 2
alidlorenzo 2020-11-07T04:49:09.031800Z

Some neat ideas here! the rules+specs+crux usage looks sweet interesting that you can send arbitrary transactions to front-tend, hadn’t seen that done before. I imagine that’ll remove boilerplate for basic mutations, and makes for faster iterating. is there considerations you have for using them is or isn’t appropriate? e.g. maybe not for complex mutations bc harder to test the usage of Biff’s defatom/defderivations macros to auto-update subscriptions is nice too. Though with this utility, this makes Biff coupled to Rum, too, right? I imagine the target here is beginners that appreciate having more opinions baked-in.

2020-11-07T06:20:31.032Z

crud is pretty much what they're good for. It makes things convenient like you said. State transitions are one example of a scenario where they aren't a good fit. e.g. if you're making a board game, you'll have actions that the user can only take in certain situations, and you might have to check a lot of things. it's a lot easier to just set up a custom endpoint/event handler which checks the state and then does the write for you, instead of letting the client set up the write and then try to figure out if the state was ok for that action after the fact. basically, if a write is complicated enough that adding a custom endpoint doesn't add significant overhead, you'll probably be better off just doing that. (Also Firebase has front-end transactions, which is what I've patterned Biff's after--https://firebase.google.com/docs/firestore/manage-data/add-data. I like Biff's data-driven API a lot more though 🙂 ) for defatoms/defderivations, Biff is kind of coupled to rum, or at least the project template is. but biff.client/init-sub just needs two atoms (:subscriptions and :sub-results). so you could easily replace defderivations with e.g. reframe. I probably will add more stuff to biff that builds on rum; in particular I'm really interested in https://github.com/oakes/odoyle-rum. But it'll always be done with decomposability in mind, so it should never be a big deal to use something else.

✔️ 1
2020-11-07T06:23:57.034200Z

if someone with a mac could test that command out I'd appreciate it. I have a mac but can't get it to install clj because there's some problem with xcode. (that's my favorite part about Linux: it just works 🐧 )

alidlorenzo 2020-11-07T13:53:49.034800Z

here’s command error from mac terminal

alidlorenzo 2020-11-07T13:55:56.035200Z

ok command itself (from link) works without the extra -M

2020-11-07T18:53:23.035400Z

awesome, thanks. you probably have an old version of clj. -M is new. I guess I could just do the old way though (for new versions of clj, not using -M will give a deprecation warning but will still work). I don't think I'm using any new clj features anyway

2020-11-07T19:16:13.035600Z

I've pushed the fix.