Fork me on GitHub
#biff
<
2022-10-11
>
macrobartfast00:10:29

Has anyone connected xtdb-inspector https://github.com/tatut/xtdb-inspector to a local Biff dev instance? I am really just looking for a GUI window into xtdb, so it wouldn’t need to be xtdb-inspector if there’s another tool. Is this a non-starter idea for any reason? I’m assuming it would not work with the file based xtdb option, which is something to ponder.

Jacob O'Bryant00:10:33

I haven't used it, but looking at the readme it should work fine. In particular: > Other way is to embed in an existing web application that uses XTDB. The xtdb-inspector.core/inspector-handler returns a ring handler. So I think it would work if you just do this: > (def features > {:routes [["/inspector" {:get xtdb-inspector.core/inspector-handler}]]}) If you deploy that on the web, you'd want to make sure that the "/inspector" route is protected e.g. by some middleware which only gives access to admin users.

macrobartfast00:10:07

Sweet, as always! I’ll give it a go. If I don’t return in 2 weeks send a search party.

🎅 2
macrobartfast00:10:13

I don’t intend to use a GUI tool in general, but historically I’ve learned a lot from them.

macrobartfast05:10:20

For a typical CRUD app, if one wants to send a request to the server from a form to update or delete a document, does one normally send along the actual database xt/id (which would have had to be included in the item on the front end) or is there another approach? Similarly, is it considered bad form to use the actual db id (xt/id in this case) as part of a url?

Jacob O'Bryant17:10:02

yep, that's the way to do it.

Jacob O'Bryant17:10:42

sometimes I put the id in the url; sometimes I put it as one of the form params

macrobartfast18:10:01

Sweet! That’s a relief, because all that will be easy for me.

👍 1
Jacob O'Bryant20:10:40

Same--I only put the id in the url when I want it for navigation. If it's just for a post request I always use a hidden input.

mandudeman13:10:43

I am interested to learn and use this framework.

😎 2
😀 1
macrobartfast18:10:39

I am having a lot of fun with Biff so welcome!

Jacob O'Bryant18:10:27

The meetup this week (Thursday, 9:30 am pacific) will be another pair session, this time with @wnovo2003. I forgot to add the zoom link earlier, so here it is: https://us06web.zoom.us/j/81953048671?pwd=cDNBNEFpbXZ0eEMrM2xNV0ptSENGUT09 https://clojurians.slack.com/archives/C013Y4VG20J/p1665183816712529

🆒 1