Fork me on GitHub

is anyone using Bootleg for their sites?


No, but I'm looking for a static site generator for a personal website and I like hiccup 🙂


It looks like a good option to me, but I might be a bit biased, since he's using the same Clojure interpreter that is powering


Are you talking about Sci? That's a very nice lib. It seems like a lot of Sci projects target GraalVM. Does Sci make it easier to compile with Graal?


sci basically solves the eval problem for graalvm


I've had good success with perun.


perun looks OK but I don't want to learn boot


I can't find this, but I assume it exists: A library for managing crud in spas. I write a lot of boilerplate around fetching the data a component needs, waiting for it in flight (loading vs loaded), refetching at the "right" time, collecting data up to be submitted. I'm hoping someone has produced a simplified model I could use for simple cases.


wasn't there something like this announced by the company you work at?


Yeah, that manages some of it. I guess the read element has a lot of emphasis for me. I'm not writing back a lot of the data.


fulcro? fulcro rad?

👍 4

haven't used any of these myself, but I've heard they manage these things for you somehow


Fulcro requires whole app buy in. Haven't looked at the rad version. Something like those which can be done bit by bit would be cool, preferably with a simpler language for communication.


Maybe @U5WAJK60M can tell you more about if RAD can do this already


or ask in the fulcro channel


Fulcro RAD does a lot of stuff. Too big for me :).


Fulcro is big as it is because all of the components in it are necessary to meet the requirements you listed. I.e.: you can’t have easy/automatic data fetches without a normalized client side DB with the concept of idents. What I’m saying is eventually you will build a subpar implementation of Fulcro with reagent/re-frame/some datafetch lib (at least that’s what I did).


it sounds a lot like apollo or relay for JS


I don’t think something like that exists exactly in the CLJS ecosystem yet


once I am done working on helix (defining React components and using Hooks), my next planned project is exactly what you’re talking about using React Suspense. Nothing to show yet though


@U08E8UGF7 My issues with fulcro have historically been that it's too complicated for me to understand. In general I'm willing to take something that doesn't give the client so much power (e.g. arbitrary queries of subsets of data) in exchange for something which really just handles the networking parts of stuff.


Yeah, the original dream(s) of relay sound similar. Although, I'd be happy for something that composes a little better with other stuff. Qlkit was pretty cool for Cljs, although re-frame was ultimately chosen for us.


I’ve found that re-frame is very antithetical to doing this, as idiomatic re-frame completely separates the component from networking. React Suspense goes a long way to making this case much more composable and easy to provide a better UX. It sounds like what you want. However, you’ll have to wait for that to be released in React 😕


Maybe something higher-order like would do the trick


that lib looks pretty out of date, but I think something similar to a HOC or a custom hook would suffice until Suspense is ready


in the past, with Reagent I’ve used a function that returns a reaction that represents the {:data .., :loading …, :error …} state. it’s not a ton of work


however, it’s less composable than what suspense provides because you can’t easily lift where the loading state is shown


@U09LZR36F RAD will attempt to kill boilerplate, especially for CRUD in any apps. It’s still in waaay pre alpha, but I think it would be preferable to opt into Fulcro as well, especially for SPA’s, because you will get every aspect of boilerplate killing (form generation, form diffing, submission to server, persisting in whatever shape en reading it back out into other views). You could use just the SQL or datomic plugin and form delta calculation of RAD and use your own UI layer for them though, it’s just more work and I don’t feel like the fulcro way would lock you in


RAD will generate pathom resolvers for attributes based on identity attributes (e.g: an account id can get you account name, email, join addresses), so I think you could use RAD backend only if that’s what you’re looking for


I don't work on an app, I work at a consultancy. Sometimes the backend is out of control, but I need tools I can use anywhere.


It’s too early to tell if RAD would help you. How I see it now it’s targetted at building new things, not fixing spaghetti’s 🙂. With RAD if the domein is ‘wrong’, it won’t help you and you’ll need to write a lot of custom code anyway


but reading your first message of the thread yes, that’s exactly what RAD aims to achieve


it will be very simple, just declaring the attributes and generating the mechanical things for you


Fwiw, I found the readme a little off putting because it all sounds very entangled. Just as an initial reaction to what I saw.


I get that. It’s not ready clear yet so it won’t be usable for a while anyway. I don’t understand your needs totally. So maybe I’ll explain the summary of what it’s intent is and you can see if it would help (I find it interesting too). RAD itself is super simple: it’s just about declaring attributes that go through your system and their relationship (joins, entities, auth, validation) in the form of open maps, that’s it. Then there will be some pre-fab plugins that take care of things: Generating and validating forms, auth, persisting to datomic and SQL, reading from those sources. If you combine enough plugins it becomes a framework. And it’s meant that you can write your own plugins, say you often talk to a CRM, you write the plugin that can read and write to it, and then in every app you make just declare the bits of information that the plugin needs to do it’s job correctly.


I think of it as a badass boilerplate killer 🙂


These things sound familiar. Universal schemas are everywhere. Some people are trying to use spec as one for example. Does RAD have a novel technique?


not that I know of, except that it won’t try to do any heavy lifting


so my frustration with solutions I see is that they all try to solve domain problems too. RAD tries to solve many mechanical things, but won’t interfere with your domain and that’s what I think is novel. If you want to know more maybe talk to Tony Kay on Slack


do you know of another universal schema solution that is extendable (eg open maps and plugins) ?


JSON schema


Vvvval weaselnyk (completely typod, sorry!) described an interesting custom one he designed around datascript for querying the data in different ways.


yeah that’s an inspiration for me


but we won’t need datascript to do things our way.


I don’t see how json schema is related to this though


RAD will be more like vvvvals idea about using such a schema to query and generate basic mechanical things, which I miss in json schema


It is used for validation and form generation already. But I think with a few annotations it could do more. I think there's mock servers which generate fake data based on the schema. There's an official hypermedia extension. It's been through many years of refinement to find something that works so well.


so what are the needs you have that don’t fit into that?


Well for one thing I'm not using it on the current project. But the small piece I'm really looking for doesn't include form generation or schemas. I just want to declare that I need an opaque blob of data and have all of the boilerplate around that managed.


Well, I'm lying a bit. I'm using JSON schema a lot for form generation, validation, etc. Before sending it to the server.


what do you mean by opaque blob of data?


Hmm, given that exists. I don't entirely care about the network either. I really just don't like the indirection and event pinging that reframe has.


I mean that I don't want to define a schema for it, or describe it in any way. I have an endpoint that produces data, and that data is something my component understands how to use.


well if you don’t want to describe it rad isn’t for you indeed. But how do you want to kill boilerplate without describing it?


There's a lot of mechanical bits to do with loading state, caching, etc. That UI needs to care aboit


I think that's what Dominic is referring to


Yeah that's it ^^. I want to have a simplified model for fetching the data, and knowing when to wipe it, refetch, etc. I'm happy to write out my forms manually, because they're either custom enough that generation wouldn't work, or they're generated via an existing mechanism.


nice to zone into the problem 🙂. When should it be refetched?


That depends on the page. That is something I would happily declare, or maybe just manage manually? Sometimes I want to reuse for the lifetime, sometimes I want to fetch data when navigating back to the page. When refetching it is sometimes okay so show out of date data briefly, and sometimes it isn't.


If you didn’t know already Reagent atoms have an on-dispose hook. What we usually do for these things is write fetching logic once for every data fetching thing, and somehow couple the view to that datafetching. So when the view mounts the data is loaded, and if this is a view where this is needed, the on-dispose hook would remove the data from the app state, effectively refetching when the view gets mounted again. No libraries needed really just some reusable functions