Fork me on GitHub
#re-frame
<
2016-07-20
>
miguelb14:07:47

anyone know of a good example of a “large application” built with re-frame? I know about the relevant wiki section

mccraigmccraig14:07:24

@miguelb: i've got a 40kloc app, with about ~18kloc in re-frame/cljs ... dunno if that counts as large !

miguelb14:07:35

Working with a re-frame app right now and I was looking for examples on how others have structured their large apps

mccraigmccraig14:07:51

i've tried a few different things - the approach which is sticking is to divide the app into components and areas, and give each of those things its own [subs / handlers / views] namespaces, carving those namespaces up themselves when they become unwieldy, so e.g. having app.components.infinite-scroll.subs app.components.infinite-scroll.handlers app.components.infinite-scroll.views namespaces

miguelb14:07:32

do you also split up the db ?

mccraigmccraig14:07:26

i haven't done that - though i have split out the schema definitions into the components

miguelb14:07:06

do you have situations where a view in a one “component” namespace must dispatch an event in another namespace? (for example in app.components.widget_a.view dispatches :widget_b/something) If you do, does widget_b handler’s ns have the handler?

mccraigmccraig14:07:44

ah, sometimes i have the notion of an empty component and functions to create those structures for app-db are also split out, so i guess my app-db is a little split, though not greatly

mccraigmccraig14:07:57

yeah, it's not uncommon for one area to dispatch an event handled by another area. it hasn't happened often enough for me to have formalised it yet though

miguelb14:07:01

sounds good, thanks for the information

miguelb14:07:33

I’m sure i’ll have more questions!