@murtaza52 has joined the channel
David Nolen has just added this to Om's README:
This project is no longer under active development. If you'd like to use a library that's well maintained that was inspired by some of the ideas presented here see FulcroJust did some performance testing on RAD demo in production mode (inspect, guardrails, and logging all impact that pretty heavily in dev mode). With the following build:
TIMBRE_LEVEL=:warn shadow-cljs release main the demo comes in at about 460k compressed. The actual project files of RAD compress very very well, since they are just data. The total size of the UI files for all of the reports and forms is just a few K for each ns. This tends to imply that the size of a real RAD app will grow very slowly (as expected), since most of what you add from there will be these small nses.
The performance is also quite good. In dev mode things like sorting by big decimals in the UI are rather slow. In release mode they are about 100x faster. Typical frame render times for most operations vary between 2ms up to about 21ms on my machineā¦the latter being a UI sort of 1000 paginated rows. Guardrails, since it uses spec, can be quite slow. In dev mode I often see it consuming 90% of a frameās time.
Of course most of this is Fulcro performance. RAD does do some things in render that I thought might be abusive, so I wanted to see if those were a problem. They appear not to be.
If you want to see the build report yourself, just type make report in the demo (on develop branch at the moment) and then open report.html. There are some things there that we can probably trim down (pprint is sneaking in, and should not be), so that will be future work.
How hard is it to migrate to rad from the template? Or is that not advisable as itās still in alpha?
RAD is designed to be completely optional at every layer, and bi-directionally usable in Fulcro. There is nothing more to do than add the dependency to start using it.
But, of course, it isnāt going to be very useful until you define your data model, figure out your backend (and if you need to write a db adapeter).
A typical db adapter should not be more than a few 100 lines for most database.
As far as advisable: it is still Alpha and API unstable, but the older the feature the more stable it is
Ok, Iāll keep clear of it for now then =)⦠It feels like I need a better grip on how this all works before I dive into it.
I suggest you play with itā¦you may be surprised how willing you are to tolerate an occasional API break (mostly keyword renames)
and as a beginner you might find it fun to play with, and educational to read the source.
Iāll take a look at it after I get some of these next bits working then =)ā¦
How to do you fetch data from the server post a successful login?
I think I need to call load!, but not clear how to do that from the context of UI State Machinesā¦
you mean in the template? Donāt remember what that looks like, so your question is quite vague: here is the vague answer: the triggering and loading mechanisms of UISM have options that allow you to send your SM an event on ok or error.
Ah, ok so I should take the fact that login generates :event/complete, and then under :state/logged-in add an entry for it?
(defn login ...
{...
::uism/ok-event :event/complete
...}
...)
;; Like this?
:state/logged-in
{::uism/events (merge global-events
{:event/logout {::uism/target-states #{:state/logged-out}
::uism/handler logout}
:event/complete {::uism/handler (fn [env] (uism/load :user-data UserData))}})}
https://github.com/Folcon/fulcro-template/blob/master/src/main/app/model/session.cljs#L49donāt forget to pass env
also pay attn to what state youāll be in at the timeā¦not sure why youād be logged in while doing the auth
Ah, ok. I might have misunderstood the statemachine, I thought the :state/logged-in was the logged in completed state
yes, but where you receive ācompleteā, youāre still in the other state arenāt you?
To be honest, Iām really not sure, Iāve found your video tutorial series, so Iām currently watching those =)ā¦
Finally worked out how to do it manually =)ā¦
(df/load! SPA :all-people PersonListItem
{:target [:component/id :person-list :person-list/people]})
Iāll figure out how to use the UI State Machines some other timeā¦Hi - I'm trying out fulcro-rad-demo for the first time and am running into a few problems. I had to update index.html to point to the js/main/main.js and I'm getting 404 when the UI tries to access api endpoint. If this is expected, no worries. If not, I'll debug.
Here's how I got going: I cloned the repo and switched to the develop branch. I started up the two servers by running
# in one terminal
$ shadow-cljs -A:f3-dev:rad-dev watch main
# in another terminal
$ clj -A:dev:f3-dev:rad-dev:datomic
And then started up datomic by running
user=> (clojure.core/require 'development)
user=> (development/go)
in the repl.Did you also clone the other repos and point to them in your system deps.edn file? Also, make sure youāre loading the app from http://localhost:3000 and not the http server that shadow starts up (thatās just for tests).
Hi! I am at a loss here, how is it possible I am getting this error in the browser console:
> [com.fulcrologic.rad.report:45] - No layout function found for form layout style :default
when trying to render my report/defsc-report ? When I check
(-> com.example.client/app
:com.fulcrologic.fulcro.application/runtime-atom
deref
:com.fulcrologic.rad/controls
:com.fulcrologic.rad.report/style->layout)
then :default is there (as it should). And my other, similar, reports are working just fine, and they are all children of the same router.The problem went mysteriously away after a few reloads
@holyjak beware of possible renamesā¦Iāve been doing heavy editing on reports
@markaddleman sry, not doing support on developā¦trying to keep it working, but only master is guaranteed to work at any given moment.
No worries. Thanks!
@pntripathi9417 has joined the channel
Another RAD update:
⢠Normalized report controls (NOTE: breaking change. Report parameters and top-level actions are now all focused into this concept)
⢠Report page and selected row are now included in HTML5 route memoization. Reloading a paginated report with a sort/filter/selection will reset to exactly that.
⢠Cleaned up report rendering a little
⢠Added two new report controls
⢠Added a number of helper functions in report ns that can be run from within report controls
These are all in SNAPSHOT releases for the moment, and if you want to play with them in the demo then use the develop branch.