r/Clojure • • Apr 17 '16

The State of Clojure Web Development

http://yogthos.net/posts/2016-04-17-state-of-web-clj-dev.html
74 Upvotes

51 comments sorted by

View all comments

16

u/citrined Apr 18 '16

The projects I consult on and the products I make dev plans for haven't called for a monolithic (or merely opinionated) "framework" in a very long time. A product might need a REST API and a React front end. I'm not going to spin up a Luminous app to do everything. I'm also not going to create two Luminus apps for the tasks. Other frameworks are the same for me. But I will peek at them to see what libraries they use and how they connect pieces of the puzzle and in that way they're most valuable to me and the kind of work I do.

I think the entire industry is moving toward libraries over frameworks. Slowly but surely. Clojure has been in that way for a long time. I am satisfied with the status quo.

I would pay in to a Kickstarter to improve Leiningen, or speed Boot development, or make Auth even easier, or fund a book on writing re-frame apps. But not for everything plus the kitchen sink all at once from the ground up or a 70 line :dependencies vector.

6

u/levand Apr 19 '16

If you're satisfied with the status quo, that's great! I don't think Arachne will get in your way.

Personally, I am not satisfied with the status quo. At all. I am glad there are so many libraries, and I've really learned from the approach. But assembling what you want still takes a lot time and effort when few things are designed to work together - there's lots of glue code. (You can use a template, or pre-vetted selection of libraries like Luminous, but that is only really helpful if that selection of tech meets your preferences and needs.)

More importantly, the "lots of libraries" approach isn't very friendly for beginners. It's asking a lot not just to know what libraries there are and how they best map to your needs, let alone how they can interact with each other. For someone new the the language and ecosystem, that can be insurmountable.

3

u/citrined Apr 19 '16

Arachne won't get in my way. Insofar as the funds (= time) spent by people to back it, I tend to think of it in socialistic terms--wouldn't that energy and time be better spent in making build tools easier? Or making library tracking tools easier for beginners to navigate? To just build the culture we have in Clojure(script) that much more beginner friendly. At the same time if I were in your shoes I'd tell my attitude to go eat a bag of you know what, since we're all consenting adults. In that case, I'd just hope to see:

  1. I don't want my default namespaces all cluttered with code noise as in Luminus. Even start a new Laravel project, the files you put your business logic into are almost entirely bare.

  2. I don't want any sign of protocols or records. If I wanna enter that world I wanna do it on my terms, damn it.

  3. Auth needs to be 9000% easier to understand and use.

  4. Database migrations take 1% of my time, and not coupled with starting my application.

  5. Maybe if Arachne did purely qualitative online focus groups now so that people can bring up stuff like I have in points 1-4, it'll get a lot more momentum, even from people like me.

2

u/Majenful Apr 19 '16

I really like your point of view and I share it. Especially the third point. When I started web clojure, I remember crying to make authentification. Even now it is not so naturally. In Rails, with Devise, is pretty simple and intuitive.

For me, we should put our efforts to improve documentations, and toolset, because it would benefit to all libraries and framework. I'm not sure a framework will answer this.

PS: I remember Clojure on Coils was a framework which tended to looks like Rails. Now it is AppShare . Did you saw it Luke ?

2

u/sunng Apr 18 '16

Exactly as I did in Clojure for the last 4 years. I've never used any framework other than ring and compojure. They are just good for their jobs, middleware and url routing. I use korma or yesql for database, carmine for redis, hbs for templating.

Huge frameworks like Luminous makes me feel a little bloated. Reinvent anything similar will be a big step, backward.

3

u/yogthos Apr 18 '16

I think a lot of people end up coming up with their own templates for the specific work they do. It really doesn't take that much effort once you know your way around the ecosystem, and the solution ends up being lean and thus easier to maintain.

The main value in something like Luminus is to provide a good starting point. As you note, it can be useful to see how things can be plumbed together, and it also provides documentation on how to accomplish common tasks. If you're just starting out, then it lets you focus on actually making things, while if you know your way around stuff it acts as a reference.

My experience is that the library oriented approach works great for most projects. The libraries abstract how something is done, while my code that puts the libraries together describes what's being done.

0

u/[deleted] Apr 18 '16

[deleted]

1

u/yogthos Apr 18 '16

I've looked at it, but I use Reagent and Postgres for my apps. It's good to see that somebody's making it easier to get started with Om.next though.

1

u/seanirby Apr 18 '16

I just finished my first Om Next app and I'd like to tryout Reagent to see how it compares. Since you have experience with it, can you point me towards a small/medium app using Reagent with a SQL backend?

4

u/yogthos Apr 18 '16

The Reagent wiki has some apps built with it that you can look at. I would recommend taking a look at re-frame that's built on top of Reagent, as it's closer in scope to Om Next.