4 ms·
A deep dive into ClojureScript reagent
- jiyinyiyong 10y agoRespo is in ClojureScript too. I do hope I can get more attractions. http://respo.site/ http://respo.site/
- erikcw 10y agoI used Reagent for a fairly significant frontend project last year. It was a real joy to work with. The maintainer, yogthos, is very responsive to feedback and is doing a great job shepherding the project. I'm looking forward to the opportunity to use it again soon. Simplicity at its finest.
- kimi 10y agoI have a similar experience, though I never had the chance to build anything really large with it.
- BWStearns 10y agoYogthos (Dimitri) is the best, he's always helping people out on Reddit and Slack and his books and blogs are pretty helpful as well. He's actually fairly representative of the clojure community in that respect, which is just another reason it's a pleasure to develop in.
- agumonkey 10y agoI tried looking into reagent just two days ago. Couldn't be more timely.
- viebel 10y agoI'm the author of the klipse[1] plugin. Timothy impressed me with the quality of his klipse interactive snippets in this mind-blowing article. 1: https://github.com/viebel/klipse https://github.com/viebel/klipse
- jhund 10y agoAs a very nice complement to reagent, I'd also like to mention re-frame: A Reagent Framework For Writing SPAs, in Clojurescript. https://github.com/Day8/re-frame https://github.com/Day8/re-frame
- lapitopi 10y agoShameless plug for my attempt to build a smallish SPA in Reagent, Re-frame: https://rahulpilani.github.io/mortgage-calculator/ https://rahulpilani.github.io/mortgage-calculator/ Code here: https://github.com/rahulpilani/mort-calc https://github.com/rahulpilani/mort-calc
- optionalparens 10y agoI have used reframe to great success, as well as vanilla reagent. I've currently switched to om-next for a variety of reasons. I have my concerns about om-next, but overall since I'm writing a complex side-project, it's worth it. If I had to ship something tomorrow, I'd go with reagent still, but for longer projects where you can spend more time and get over some learning curve and alpha/beta type bugs, om-next is a good fit for large projects. I found reframe to be generally the best way of working with reagent, but not as good when I had lots of chained events and complex queries. I spent a lot of time optimizing around some ways that reagent/reframe does things where as in om-next, I could tweak things more to my needs. Om-next also offers some additional features many people don't need, but fit my use-cases well (ex: server-story, pulling only what you need, normalizing client app db data). To summarize, reframe is a nice framework and really great for small projects or projects that need to ship today. It works and is the best approach I've seen on top of reagent (and react). Om-next is good for people that can afford to take some risks and have complex requirements but still want a proper framework on top of react. Om-next will make you do a lot more work up-front and has a lot more ceremony, but there is a reason it exists. Generally, I have found om-next powerful once you are able to grasp the way it wants you to do things. For people who want something like reframe like om-next, there is the "untangled" framework. Anyway, I wouldn't recommend om-next or reframe/reagent over the other, rather I'd suggest either and match your requirements accordingly.
- 10y ago
- manishsharan 10y agoif I may ask a dumb question : do experienced javascript programmers become more or less productive when they switch to Clojurescript or ELM or other js transpiling languages ?
- astine 10y agoI suspect that in the short term the answer would be no, because of the initial learning curve. In the long run I think that it depends on the kind of project they are working on. Something like clojurescript would be a bit of heavyweight solution for really simple javascript enhancements. I suspect that productivity improvements of learning a transpiled language are similar to the improvements of learning a new javascript framework like React or Angular. They offer a learning curve in exchange eventually for a simplified programming model.
- dfcarpenter 10y agoI think it depends on what your expectations are as well as what you are willing to put into learning them. Both Clojurescript and Elm have their place. Elm is very nice but definitely has a learning curve. You can try Elm in a low impact way by making a small component with it and using it alongside either React or Angular ( or in other scenarios as well ). It can also work as a state management solution for parts of your front end app. On the other hand building an entire SPA in Elm is a monumental task and requires significant investment. As the Elm experts say Elm is not really a good solution for quick one offs or prototyping. It may require you to reinvent the wheel for many widgets for which you could find relatively high quality open source options in React or Angular. Also, Elms JS interop is a bit tedious at times but works relatively well. Clojurescript has been around longer then Elm and for most has less of a learning curve, but for some the JVM tooling may be a turn off. Nonetheless it is fun to use and there are several Clojurescript UI libraries (Rum, Reagent, Om, Hoplon/Javelin) all of which are used in production at various places. I would say for an experienced javascript developer there is something to gain by delving into either Elm or Clojurescript and though both are very different the strong functional emphasis of both imparts habits of code organization and thinking that you might not develop as easily by staying in pure Javascript territory.
- swlkr 10y ago