Fork me on GitHub
#fulcro
<
2019-11-25
>
bhurlow00:11:30

@tony.kay thanks for the detailed dive into Fulcro at the conj. Once I actually read the docs 😉 it really clicked with me and now I’m psyched to use it

tianshu05:11:58

what backend stack you prefer when using fulcro for frontend in fullstack development?

jaihindhreddy06:11:42

Fulcro provides some bits to ease the network communication, and pathom makes it really easy to satisfy queries. Fulcro essentially has no opinions on how to the rest of the stuff is implemented. Whatever makes sense to you AFAIK. There might be some extra batteries for some set of choices, but I'm unaware of that.

tianshu07:11:26

@jaihindhreddy how to make the database operation works smoothly with pathom? is there any demo or open source project do in this way?

tianshu09:11:20

I mean the the most commonly used backend stack with fulcro. I was using re-fame, that may be work well with the restful style API, so the backend is pretty traditional, using a sql database and write sql as functions. Should I choose datomic for better integration? since they share the eql format(datomic pull syntax).

tianshu11:11:53

@UCMNZLJ93 thanks! I'll take a look

Ahmed Hassan11:11:27

You can ask further questions about Crux at #crux

cjmurphy15:11:30

As you say Datomic will accept Fulcro's EQL and is a great choice.

jjttjj15:11:37

Is there any code out there showcasing using just the fulcro graph db in isolation? I've been wondering if it could be useful as a general, portable "database"

wilkerlucio15:11:27

@jjttjj you mean without fulcro? or an app that's just client side?

jjttjj15:11:14

Yes without fulcro, just using the normalized graph db

wilkerlucio15:11:44

there is this article that tells how to manually normalize dbs, its pretty much the same thing in terms of db modeling: https://purelyfunctional.tv/guide/database-structure-in-re-frame/

jjttjj15:11:08

actually i mean using the fulcro db code but not the UI stuff

jjttjj15:11:21

thanks will check that out!

wilkerlucio15:11:24

but if you wanna use EQL around it, I think there is no isolated implementation, altough pathom supports it with: https://github.com/wilkerlucio/pathom/blob/master/src/com/wsscode/pathom/map_db.cljc

wilkerlucio15:11:49

but its not the same, the fulcro version is optimized for performance, while the pathom is optimized for extensibility

tony.kay16:11:09

@jjttjj Fulcro can run completely headless…the normalize and denormalize nses have the CLJC db code, but they rely on component queries/idents to work (since you need those for normalization)…if you’re thinking “I’ll just make this for Re-frame”, then you’ll just end up re-writing what is already there for you and well tested over multiple years in production…but to each his own.

jjttjj16:11:09

Gotcha, yeah it's not for anything like reframe, it's just for a decent amount of relational data I was thinking about shipping with a library. It'd be nice to have a format that could allow lookups with regular clojure core functions but optionally allow some higher level querying [this idea isn't fully fledged :)]

tony.kay16:11:15

So, here’s a tip: If you make some kind of construct that answers properly to the component-options function when passed the “thing” you treat as a component, then that thing will work in place of the UI components.

tony.kay16:11:36

that central function is how it asks for the query/ident

jjttjj16:11:04

Cool will look at that. Thanks for the tip

tony.kay16:11:10

If you watch the youtube videos, I play around with headless mode in an early one. The networking is cljs-only, but you can write a clj network impl easily…so it’ll work wherever you want to use it (JVM or js).

👍 4
tony.kay16:11:39

or at least it should…not nearly as well-tested in JVM land 🙂

tony.kay16:11:45

@bhurlow Great to hear that…spread the word…there’s a lot of misunderstanding out there. People think it is a lot more complicated that it actually is.

bhurlow16:11:02

@tony.kay yea normalizing the graph is actually way simpler than implementing client side datalog haha

tony.kay16:11:13

and faster, and easier to look at in tools, and…

💯 4
currentoor19:11:56

3.0.11-RC2 is broken in node, fix coming shortly

mattsfrey20:11:21

@currentoor you wouldn’t happen to have example code of setting up pathom etc for a node backend?

currentoor00:11:49

not in a repo i can share

currentoor00:11:02

but i can make a gist with a few files so you can get the idea

currentoor00:11:01

@U12FDCE4V here’s some sample code from my project

currentoor00:11:23

it’s kind of verbose since it’s production code not a simple demo

mattsfrey00:11:31

hey, awesome, I really appreciate that

currentoor00:11:59

we run node servers on embedded devices (like printers and scanners)

mattsfrey00:11:07

have just been getting my feet wet with fulcro and was really interested in a node backend for the lower footprint but it doesn’t seem terribly popular

mattsfrey00:11:30

ah I see, yeah thats a critical need then

currentoor00:11:49

you can easily configure a JVM to run within whatever memory parameters you need

mattsfrey00:11:13

right but you’ll crash out for sure if max heapspace is too low

currentoor00:11:11

i’ve been able to get by on free tiers in the past

currentoor00:11:21

that said nothing wrong with using node as the backend

mattsfrey00:11:49

i’m trying to run a bunch of apps on a micro instance but wish to separate things out for organizational purposes

mattsfrey00:11:01

vs doing one monolithic backend

currentoor00:11:39

hmm, i’ve got no idea what your domain is, but i tend to embrace the monolith backend in general

mattsfrey00:11:53

i would generally agree on a per app basis

currentoor00:11:15

more services more surface area more crap to go wrong

mattsfrey00:11:30

i’m basically writing a bunch of small apps for a marketplace though, so its just cleaner to have full separation of concern

currentoor00:11:06

@U3LP7DWPR i think you use node as a backend for your fulcro app right?

currentoor00:11:26

^ i’m not 100% but i think he does

mattsfrey00:11:54

would basically just throw a pathom parser into this or some such

currentoor01:11:16

yeah should be easy

currentoor01:11:34

just hang the parser in a lambda on a particular route

claudiu05:11:57

@currentoor Was playing around with SSR in nodejs for fulcro 2.x . A simple app here https://github.com/claudiu-apetrei/fulcro-nodejs-ssr-example . Taking a bit of a break from side-projects at home will probably get back to it next year and update it to fulcro 3.

Piotr Roterski10:11:17

@currentoor @U3LP7DWPR thank you for the examples guys! Would you be okay with me adding those to this sticky post on /r/fulcro https://www.reddit.com/r/fulcro/comments/dtzhsm/fulcro_links_and_resources/ ?

claudiu10:11:43

Sure. Hoping to get up to speed with fulcro 3 over the hollidays, ssr and nodejs pathom api are at the top of my todo list.

thanks 4