8 ms·
Philosophy of Biff
- koito17 3y agoIt would be nice if Biff weren't dependent on various ad-hoc scripts (some in bash, others in babashka), since it means newcomers to Biff (and especially newcomers to Clojure in general) have to install a variety of tools without clear purpose. Luminus, for instance, is able to handle project creation, development, and deployment all within Leiningen (a build tool) itself. All you need to get started is to install Leiningen (a single command to install on any popular package manager) then run lein new luminus my-app cd my-app lein run No Windows-specific quirks w.r.t. live reload or anything else. Yes, it sucks that you have to install a build tool, but it's still a much simpler experience IMO. Unfortunately, Luminus feels less like a framework and more like a template web app with a bunch of assumptions about the backend and frontend baked in for you. So it's not really better than Biff either when it comes to being newbie friendly or feeling like Rails / Laravel / Django. I visited the "Getting Started" section of Biff and I am immediately met with "install Babashka then run this random script off the internet". It doesn't help that they already use tons of Clojure-specific terminology like "jacking in" and assume you are using CIDER (hence Emacs). While I use Emacs and Clojure, this documentation reads like it's intended for Emacs users with years of experience in Clojure. In my opinion, this contradicts the design philosophy of "what would be helpful for ... those who are relatively new to Clojure." I'll admit the plugin architecture of Biff is really nice, and I welcome decisions like using HTMX. However, there is also questionable design decisions like choosing XTDB on behalf of the user as opposed to something like SQLite or PostgreSQL, which would drastically lower the mental overhead for Clojure newcomers and even Clojure devs themselves. Although this is anecdotal evidence, most people I talked with at Clojure/conj 2023 use PostgreSQL and aren't too familiar with Datomic or even XTDB. (The fact XTDB 2.0 emphasizes SQL support says enough about the situation, I think). Out of dozens of people I talked with, I met exactly one person who actually uses Datomic in production. Nobody I met used XTDB. I could go on, but I hope I've gotten my point across about three things; 1. as someone with several years of professional experience using Clojure, there is seemingly lots of disjoint, moving parts involved 2. like existing Clojure "frameworks", it still fails to feel like a Rails / Django / Laravel and feels more like "here is a project template with a bunch of decisions baked in for you". Some decisions are awesome (HTMX instead of a complicated CLJS frontend) and others are questionable (XTDB and Babashka instead of simply using PostgreSQL and Bash scripts). 3. the documentation feels like it's written for experienced Clojure devs, not a general audience
- jacobobryant 3y agoGoing with XTDB by default is an example of "what do I want for my own projects?" being the first priority as mentioned in the article--I agree that Biff would be easier for many people to pick up if it defaulted to Postgres/SQLite. My hunch is that building something I personally love is the best long-term strategy for Biff anyway. When XTDB2 is stable I'm planning to have SQL be the default, then those who want to (like myself) can switch easily to datalog. See also https://biffweb.com/p/xtdb-compared-to-other-databases/ https://biffweb.com/p/xtdb-compared-to-other-databases/ for more of my thinking on XTDB. The main reason I switched from Bash to Babashka for the project tasks (`bb dev`, `bb deploy` etc) is that it allows me to put the task implementations in a library and have Biff projects depend on it, as opposed to copying all the task implementations into new projects (which is what previously happened). This way people can upgrade the tasks by bumping the lib dependency. Some of the tasks also have somewhat complex logic and IMO benefit from being written in Clojure/Babashka. The only bash script is `server-setup.sh`. I suppose I could rewrite that in Babashka for the sake of consistency, but it doesn't really seem like that big of a deal to me (?). In response to "install a variety of tools without clear purpose" -- isn't it just one tool, Babashka? I believe that puts it on par with Luminus :). Agreed that the docs could be better written for those new to Clojure. To really do a good job of this I'd want to do some actual user testing with people as they try out Biff for the first time. Main constraint here is just time. I'm always happy to get specific pieces of feedback and try to act on those (perhaps I could make the jacking-in section less prominent). I actually would love to make a course/series of guides for complete Clojure newbies, but until someone hires me full-time to work on Biff I think I'll have to rely on others to write the beginner resources. In response to your three points: 1. There's a lot of stuff that goes into a web app :). It's also not clear to me that switching from Babashka to Lein templates + Bash scripts would improve this situation (if anything that sounds like it would involve more disjoint parts). 2. To act on this I'd need more specifics about how things are different in Rails / Django / Laravel. 3. Addressed above. There is a step-by-step tutorial at least (https://biffweb.com/docs/tutorial/build-a-chat-app/ https://biffweb.com/docs/tutorial/build-a-chat-app/).
- jacobobryant 3y agoOh, also re: "No Windows-specific quirks w.r.t. live reload or anything else" -- the Windows caveats mentioned at https://biffweb.com/docs/get-started/new-project/ https://biffweb.com/docs/get-started/new-project/ only apply to "developing in prod", in which Biff deploys your code whenever you save a file. Reloading code during normal local development works fine on Windows, same as in Luminus.
- zdw 3y agoI was surprised to see something about the old unix mail notifier: https://en.wikipedia.org/wiki/Biff_(Unix) https://en.wikipedia.org/wiki/Biff_(Unix) But this is obviously not that...
- jacobobryant 3y agoToo late to change the name now unfortunately ;) at least it's short and easy to type
- jhbadger 3y agoIf you want to go old-school there was also a famous satirical USENET poster. https://en.wikipedia.org/wiki/BIFF_(Usenet) https://en.wikipedia.org/wiki/BIFF_(Usenet)
- JNRowe 3y agoYou can still relive a little of that joy with b1ff from talkfilters¹, with the caveat that a chunk of that package probably deserves a content warning for our times. ¹ https://github.com/hyperrealm/talkfilters https://github.com/hyperrealm/talkfilters
- UncleSlacky 3y agoThat's what I was expecting this item to be about!
- zaps 3y agoYou’re my girl Lorraine
- jacobobryant 3y agoMake like a tree and get out of here
- ravenstine 3y agoI hate manure.
- Arn_Thor 3y agoI was here for an unpacking of the philosophy of Biff from Back To The Future
- ravenstine 3y agoBiff's philosophy, if there even is one, can probably be summed up as "might makes right" meets hedonism.
- shiroiuma 3y agoWhy don't you make like a tree and get outta here?
- tromp 3y agoI just want to know one thing. Why is this web app framework called Biff? Is it name after the BTTF character? And if so, any reason why?
- jacobobryant 3y agoMainly I just wanted something short because I knew I would be typing it a lot, and "biff" just popped into my mind.
- joeevans1000 3y agoPlot twist!
- joseferben 3y agobiff is a beautifully designed little web framework, i was still doing clojure it'd be my go-to.