I feel the same way. And in my opinion, is a symptom of the "library vs framework" culture that is present in the Clojure community. While that is probably a good stance for the first 2 points in your list, in web development there are just so many already-solved-problems that you have to re-work without a framework.
Luminus looked good but seems to be shunned by the community.
Author of Luminus here, and that's news to me. It has over 20k downloads on Clojars and about ~50 downloads a day. https://clojars.org/luminus/lein-template
James Reeves has endorsed it as a good way to start Clojure web development. There's an active Google Groups list https://groups.google.com/forum/#!forum/luminusweb and a Slack channel on Clojurians.
Could you please elaborate on why you believe Luminus to be shunned by the community?
Can I ask what left you with that impression? I've no idea if this is true or not as I don't participate much in the Clojure community, I'm just genuinely curious. I guess a bunch of people just use the lighter weight Compojure/Ring templates that really leave you with an extremely barebones web app to start with?
I used Luminus myself when starting out, but I feel that as you grow more comfortable with Clojure web dev, you'd _typically_ end up putting together your own Leiningen template more tailored to how you like to set things up (as I ended up doing). But even still, I don't think Luminus is by any means bad?
Saying it is shunned makes it sound like a whitch-hunt but that not the case. I don't even think the community has an opinion on it. Most just dont use it.
Majority of the community are experienced Clojure developers, and have already found their own preferred setup. So, it's not terribly surprising that it's not the target demographic. Once you know the web stack, the libraries that work well, and how to put them together, then it's easy to make an app that's custom tailored to your needs. This is the primary reason for the libraries > frameworks mantra.
However, as the comments in this thread indicate, there's clearly a need for Luminus. Anybody who's new to the language and the ecosystem, needs a decent starting point. Luminus is that.
If by web development you mean building frontends to a relational database. If on the other hand you mean web services, then I think Rails really sucks.
https://github.com/zubairq/AppShare
Rails is just such a different thing. Rails IS really is a framework optimised for the days of Page based web applications with small amounts of Ajax requests. Clojure is much more suitable to full web applications (SPAs)
In my opinion, yada[1] will change this with its concept of resources (eg it already has File and Directory resources for serving static data, but it wouldn't take much to develop a CRUD/DB resource - in fact, I spoke with Malcolm Sparks (the yada dev) about this).
I personally find the Clojure(Script) development experience, with figwheel, much better than my experience with both Flask and Django (never used Rails).
A very strong claim. Julia, R and Rust might have something to say about that.
Fwiw, I think Clojure is awesome. For data science though? (IMO) no(t yet). The Python ML ecosystem is miles ahead of Clojure's.
Julia seems promising, I haven't used it on a real project yet though, but I really like how easy it is to do data visualizations in the browser with Clojurescript and don't see Julia really having an answer for that.
R's ggplot2 beats Incanter (or anything other charting library) by a large margin in its excellent mix of conciseness and power, but I find Quil pretty nice for animations (superimposing data on geographical maps, for example).
I keep an eye out for new charting libraries coming out for clojure. Last two I spotted were vizard from yieldbot (https://github.com/yieldbot/vizard), and what seems to have only been a small project, xvsy (https://github.com/dvdt/xvsy)
I have to say, Quil is the least Clojurey library I have ever used, and I find it very, very primitive. There's definitely a huge gap for a project built with idiomatic Clojure bindings that can handle both nice graphical stuff but also stodgy charts, with basic stuff like annotation layouts etc. I think something that could work really well if anybody finds the time is a port of G:
https://github.com/dvdt/gyptis
It is a nice wrapper around vega. Using that now.
[1]: http://incanter.org/
[2]: https://github.com/joshuaeckroth/clj-ml
[3]: http://quil.info/
I use Clojure for any data science type tasks I have, but that is because I am primarily a Clojure developer.
It is very nice for a lot of basic data analytics -- but I doubt many full time data scientists use Clojure as their primary tool. The number of libraries available for R and Python is pretty amazing.
I wrote some proof-of-concept code for submitting Python Celery tasks from Clojure. I should polish it up, get return values working and publish it... You could then farm out certain tasks to Python when it makes sense (eg because of existing code, libraries or just familiarity of team members). Best of both worlds, kinda ;-)
It has the ability to autotranslate data between different languages.
In what way?
Here's my list:
- Database migrations
- Fast TDD (for some sub-Gary Bernhardt definition of fast) with access to the app environment.
- content negotiation
- Authentication with Devise and Omniauth
- Easy built-in support for caching
- Easy built-in support for background queue systems
- Easy support for one-off or occasional scripts with access to the whole app environment (rake tasks)
- Pry (yes, Clojure has awesome REPL powers, but Pry is so easy to use, and you have access to the whole app environment (no loading / switching namespaces or abuse of user.clj))
There's probably some solution to each of these. But all require you to find/know the options, and be able to evaluate which is best for you ("all REAL devs . . ." sure, sure). For Rails, all of these are available to you in the Rails Guides, except for Devise+Omniauth, which has an extensive wiki and tons of StackOverflow answers.
Out of interest, what makes Pry easier to use? I'm not sure I understand the comment about having access to the whole app environment. In the Clojure REPL you do as well...?
The app environment thing is mostly about having to switch between a lot of namespaces and/or to make sure they're all loaded upon starting the REPL. With Rails+Pry, you can work with any class in your app immediately. It also lets you put breakpoints in your code, where executing the code in a running process throws you into a REPL at that point, with all the local context up to that point of execution. Also, if you make code changes, you simply type "reload!" in the REPL and everything's up to date. I have a bookmark to read Stuart Sierra's post about his workflow to try to get a grip on how to come close to something like that in Clojure.
And it can do a lot more great stuff, too: https://www.youtube.com/watch?v=4hfMUP5iTq8
Oh and by the way -- thanks for all of your OSS work in the Clojure world! Especially taking the extra step of providing good docs.
There are also a few projects for adding in debug REPLs, but those seem to have fallen by the wayside lately, perhaps supplanted by debuggers.
You might also want to talk a look at Duct (https://github.com/weavejester/duct), which is my ongoing and still early attempt at solving some of the framework problems with Clojure. If you create a template via Duct, like so:
lein new duct foobar +site +cljs
Then you some of the things you're asking for. The namespaces of your application are loaded when you start `lein repl`. You get a `(reset)` function that reloads your code, restarts your application and pushes those changes dynamically to the browser. You also get a ClojureScript REPL that hooks into the browser.There are also generators, migrations, database support etc., but currently all inferior to Rails. I'm probably going to be working on the generators next, as they need attention.
TLDR; Yes, clojure is behind in regards of web development, but it is not as bad as you said. There is active work done in this area.
I totally agree with what you said. It is a general understanding in the clojure community that you compose libraries to get things done. However, for web development that still means a lot of repitition, thats why I created the closp template.
It is based on luminus (http://www.luminusweb.net/) which is a lighter "framework" with more options.
My idea was to provide one way with sensible defaults to get started in doing web stuff in clojure.
I still work regularly on it and would be happy about contributions / feature requests. Whereas regularly means in terms of months as I do this all in my spare time.
Also I am quite active in the clojure community and I know that luminus is not shunned, but instead it also receives improvements and releases regularly. Also the author of luminus works professionally with clojure and with luminus.
And I have to admit, that luminus has the far superior documentation, he has done a good job on it I think.
I think the fact that these things aren't magically is a big plus. You can use the defaults, but you can trivially customize the middleware stack for your specific needs.
Another thing to note is that a lot of the stuff that traditional frameworks do is geared towards doing presentation on the server. Modern apps tend to do presentation on the client, and the server primarily provides a set of stateless services for the client to fetch the data that it needs. With this approach, you don't really need a complex server framework in the first place.
(defn login [{{:keys [email password]} :params session :session}] ...)
Also remember as well as the :keys special form you have :strs and :syms.
Their "Pro Starter" tier is free. It is plenty to get started with for many use cases.
It doesn't take _that_ long to get up to speed with how it works and how to use it, and if it fits your problem naturally then it can save you so much time and headache.
That being said, I can understand people hesitating to use it.
It's probably still better for building a big ML solution, but sadly for small prototypes it's too much effort.
For building stateful UI's Clojurescript + Reagent beats anything else out there.
For data science and algorithms Clojure beats anything else I've used.
For backend web development Rails is still miles ahead of any Clojure workflow.
Datomic is interesting but there's still too much incidental complexity to be super productive with it. It's hard to build a startup on Datomic because of the pricing and productivity hit, but could see it being useful in the enterprise where speed is less important.
I'm very interested in mobile development with Clojurescript on top of React Native, but haven't found a tutorial that wasn't written in hieroglyphics, so assuming that needs some more time to mature.