Fork me on GitHub

Hi, this is a message of appreciation. As a freelance full-stack developer I very recently started to watch videos and follow the book. I’m excited to say the least. Over the last few years I’ve been taking more and more notes, did experiments and started to educate myself to find the right abstractions and ways to improve my productivity, the maintainability and reliability of my work. When I first noticed Fulcro a few years (?) ago I quickly discarded it as a possibility. It seemed like “too much” and I was jaded by frameworks being something I have to fight against and escape from (comming from the PHP world). At the time I re-focused on the timeless fundamentals of web development. But recently I checked the Cognitect GitHub sponsoring list (due to the sponsoring announcement) and thought “Huh, maybe there is something to it.” I’m posivitely surprised, almost shocked... Not only because it seems to be very carefully crafted and designed, but also because it manifests several concepts, practices and intuitions that I’ve been using and gathering, and then goes way beyound that by refining and composing them into a whole, adaptable system. I so far feel blessed and lucky, because Fulcro validates my half baked tools, ideas and practices, but also because it seems to be a framework that I can build on with confidence. From what I’ve learned so far, it seems to almost completely agree with my personal experiences and challenges and teaches me a whole bunch of things on top of that. Right now I’m looking forward to build something real with it and learn what the usage assumptions are. I want to at least say “Thank you!” and “Wow!” because it is already inspiring project just from a learning perspective.

❤️ 24
Jakub Holý (HolyJak)21:12:57

Awesome, thanks for sharing! While getting your toes wet learning and using Fulcro, please make notes about hurdles and "if I only knew this 3 weeks ago.." so that we can keep on improving the beginner experience and flatten the learning curve!


Thanks. You OK if I use part of that in the README? 😄 That ranks right up there with another user compliment I got: “Every sufficiently complex webapp contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Fulcro”, based on Greenspun’s tenth rule of programming.

❤️ 3

@U0522TWDA that’s a great suggestion. I’m teaching coding part time at a school for designers. And my guinea pig, a designer I work with closely, also takes these kind of notes for us to improve the course. The most challenging thing is to take the perspective of a beginner when you are already deeply in a subject for years. @U0CKQ19AQ Yes of course! Also that quote reflects my experience in a way :)

👍 3
🎉 3
Danny Almeida21:12:48

Hello! I have tried the example in fulcro book on dynamic routers - Everything works as expected, but each time I select a route option, I get three messages on the console e.g. "`Will enter settings with route params {}`". Also, when I click on "`Modified (prevent routing)`" option, I get the popup message twice. This happens when I try the online book example as well as when I try it locally on my computer. Is this the expected behaviour ?


it’s a poor example, actually. will-enter does get called more than once, which is part of the design (searching for the best route match), which is why will-enter has a deferred mode to prevent side effects. The double message is unintentional but also part of the routing search…The API has been improved since that example I think. @dionysius.almeida


hard to keep book up to date:)

Danny Almeida23:12:07

Thank you for that clarification. Considering the effort that you make putting out and maintaining all the videos and books, it's not a small feat 🙂 Is there a better example for dynamic routing that I can maybe use ? I'm just learning routing, so it's all a bit overwhelming with all the concepts to grasp. I've just a bunch of components which get their data from the server. Now I'm trying to use routing to have multiple screens which will fetch and show data for those components. I am looking for an example which does routing along with demand based data fetching for the components. Thank you so much for being so active on this channel. Cheers


Um, the RAD internals? report.cljc and form.cljc have macros that build defsc that are both route targets. They use UISM to control state, but they do use will-enter

Danny Almeida23:12:55

I haven't checked out RAD yet. I wanted to get a hang of how fulcro works under the hood before learning RAD. Will check out the files you have mentioned. Thank you again 🙂


Is there an example of using Fulcro without React? I realize that's probably not a use case that Fulcro is interested in supporting, but I'm happy to wade through the weeds a bit to see if I can reuse Fulcro's state management with a non-react view system.


@smith.adriane there are not many weeds. The design is adaptable. If I had the time I would have already written a UNIX Curses plugin just to be “funny”

metal 3

of course you can’t use the DOM helpers, but you don’t want to


but you can plug the renderer, or just use it headless for state mgmt


defsc does output a react component by default, but if you use use-hooks? true you just get a plain fn


Mostly, I just want access to the render function for a component. Is the suggested route to forgo defsc and make a similar macro?


I type too slow


The hooks route might work…I type too fast 😜


and tend to guess ahead of ppl 🙂


(not always accurately)




then you can use defsc


no React involved


well, ideally both, but I'm much more interested in clj since cljs already has a really good story (ie. React)


I do not guarantee that works perfectly…it was meant for server-side rendering of DOM, but there are no React ties.


(I don’t know anyone doing SSR with it, so not well-exercised)


be fun to see what you come up with. please share your progress and questions 🙂


the use-hooks? looks like it's a great start


and already puts Fulcro ahead of the other ui frameworks I've tried that were heavily dependent on react


The data stuff will run seamlessly…don’t know about the render (refresh) story…should be OK. I test in CLJC.


and like I said, render is trivial and pluggable


In CLJ the non-hooks “component” just let’s you put the lifecycle stuff on the component (which is just a map), but nothing calls any of it


(but you can 😉 )


(comp/component-options Class-or-this) is the API way to ask for the options in the options map of a defsc (contains query/ident/initial state as their real lambdas as well)


So, I think all it will take is: 1. Set the app options on app creation for :render-root! and :optimized-render! 2. Have your “components” return a tree of data your render can work with 3. Pass app/mount! the app, your Root component, and a made-up keyword for mount node


heck, you could start with a simple Root that prints a value and waits for input (like System/in)…on input “transact!“, and render again.


should be able to get a “increment button” like thing going in 10 mins


Render is essentially “Here’s the db, and here’s your root (whose query can be used to pull from db)…render stuff”. See the source for application.cljc and keyframe-render.cljc


I'm a little new to fulcro, so I'll try to work through those suggestions. I did just watch some of the videos about the underlying design which seems great


Actually, if you set render-root! then you can use the unmodified keyframe-render for optimized-render


so step 1 is half the work 🙂

notbad 3

If you want to use remotes, you just need to define a remote, which is also pretty easy. It’s just a map with a :transmit! key whose value is a function that receives the tx to transmit and callbacks to use to report the result.


I don’t have a CLJ remote pre-built…but the js source of the front-end one is a good template


my first goal is to build a simple desktop app

👍 3

nothing was happening when I tried to call app/mount! and I just peeked at the source and it looks like app/mount! doesn't have a clj implementation


I'll give writing my own version of mount! a shot based on the cljs implementation


oh. funny. didn’t remember that


no one has tried this yet


it works!

🎉 6

see, not hard at all


what UI is that using, just Swing?


maybe JavaFX?


but it can render to a number of different targets,


right now, there's skia, swing, and terminal on desktop, but I plan on supporting javaFX at some point


that is a really cool thing to combine with Fulcro


I had just about given up on integrating existing ui frameworks because, so far, they've been coupled to react


Fuclro seem great. I'm kicking myself for not trying it earlier!


@ Adrian Smith Hey, if you get anywhere at all with skia lmk! I'd love to try and dogfood it with you, since I have no interest in writing more and more javafx/swing stuff and I have some projects I want to build that cannot be web based for performance reasons.


😆 , poor other "Adrian Smith" that gets mentioned for random discussions I'm in.


@U5P29DSUS, will do! I'm working on creating an example repo for a proof of concept


I actually tried to get the right one... slack didn't help me out. I was hoping the first in the list would be the one which was in the same thread. Why does slack not sort by relevance?

🤷 3

it's not the first time this has happened 😁