Fork me on GitHub
#beginners
<
2016-10-31
>
neurogoo15:10:10

I have been reading recently about Mount and Component. Is one of those recommended for beginner to use or should I just pick one try?

neurogoo15:10:50

Or should I even be looking at them? I am trying to write media server so I need currently to keep in memory what songs are in disk etc.

dominicm15:10:43

You probably do want to look at them

dominicm15:10:36

https://www.booleanknot.com/blog/2016/01/24/how-i-use-component.html (highly erecommend reading the discussions) http://yogthos.net/posts/2016-01-19-ContrastingComponentAndMount.html https://www.reddit.com/r/Clojure/comments/41p73n/contrasting_component_and_mount/ I'd say that component is more prevailent. I personally prefer the dependency-injection style of component, but you may come to your own conclusions.

neurogoo15:10:30

I did already read some of those links but the conversation felt like it was more ideological than practical at least in my beginner eyes

donaldball16:10:29

That’s a fair summary, tbqh, though I prefer component as well

donaldball16:10:01

I think mount is probably easier, and component is probably simpler, using Rich’s terminology

donaldball16:10:11

The most important thing that both provide you is an orderly approach to building, accessing, mutating, and destroying state. That’s 90% of the battle

roberto16:10:54

I don’t think neither mount nor component provide any thing special to have a cache of items from disk.

roberto16:10:36

But, in regards to mount & component, I personally prefer component. I find it much simpler and provides the necessary constraints to force you to think about how to organize the outer edges of your code.

roberto16:10:24

Mount might be “easier” to start, but it is also fairly easy to misuse it because it is non-prescriptive.

roberto16:10:51

I’d recommend to just pick one and learn it, but none of these will really save you the hard work of spending some time thinking about the architecture of your system.

neurogoo17:10:41

Heh, I guess I have do some more reading about Component and Mount. But good to know that there is no obviously bad choice 🙂

dominicm18:10:13

Your usage of the library is more important than the library itself at this point.

mlev19:10:21

If anyone is interested, here are a list of Clojure(script) open source projects that are beginner-friendly (just check the "beginner friendly?" box on the right): http://open-source.braveclojure.com/