Live data from Hacker News

Using Clojure for Web Apps

github.com

111–120 of 122 posts

Re: Using Clojure for Web Apps

#111
post #31

Earlier quoted context omitted.

That’s not limited to Clojure nor does it matter whether it’s a batteries included framework or not. I’m seeing this more and more, to the degree that often I’m back to rolling my own instead of relying on a library or framework that has a high likelihood to f being abandoned.

More and more I'm of the opinion that I don't want to use a library that's not included in the core product. I've had way too many dependencies become end-of-life before my application was EOL, and I ended up having to fundamentally change my application, putting in hours of work just to keep things the same, or rebuild a feature. I appreciate Rails for all the built-in stuff it provides but anything outside of that,…

All of modern Javascript is built on hundreds of NPM packages that will disappear in two or three years

This is soooo true! I actually really like Javascript but NPM is in such a bad place and it's having effects outside of just it's ecosystem. We just built an app using Nativescript which by itself is actually pretty decent but we chose to use a plugin for a specific feature we needed. But then we kept running into problems with it and, after serious back-and-forth with the plugin maintainer, it turns out his plugin depends on another plugin that has had a known, very serious bug. And that project's maintainer has known about it for at least nine months but he has said he doesn't have time to fix it. I take that to mean he's lost interest and the project is effectively dead unless someone else comes along to take the reins in maintaining it. Which we assume means the original plugin that we chose to use is also effectively dead because it so heavily relies on the other plugin.

In the end, we just removed all of the plugins as we determined they were hostile to our productivity and routed around them by rolling our own solutions.

Re: Using Clojure for Web Apps

#112
post #49

Earlier quoted context omitted.

I get it, you want to be up to date all the time, but often the case is that lib is just done, it does what it says it does, so that is why lib was last updated x years ago.

Nonsense. This might have been true back in the day before security issues were a thing, but it no longer holds true. Particularly the case in public web apps. If someone isn’t maintaining it, don’t use it. (Obviously it depends; for a test framework, clearly not true, but for example for the “LEGO block” you pick for auth, or say, XML parsing... yes, it matters; the point here is specifically that the “take what you…

Gibberish.

If there is no activity on the repo it doesn't mean that someone is not maintaining it.

Oh, like framework developers always know which LEGO block to include in their framework. Like Rails had no vulnerabilities in the past.

> If someone isn’t maintaining it, don’t use it.

Well, good luck with not using 3/4 (or even more) of software in existence. I bet the kernel that is running on your laptop depends on the software that hasn't been updated for 30 years.

Re: Using Clojure for Web Apps

#113
post #28

Earlier quoted context omitted.

You express exactly what has kept me from doing webdev with Clojure, despite my (now perhaps irrational) love for the language. I will learn whichever language allows me to get my site/app done as quickly as possible at first. Later after I have refined and refactored enough to know what's up... then I may decide to change. Nextjs (despite the javascript), Rails (Ruby is great!... not Clojure, but pretty good), Djang…

As someone who tries to use Clojure everywhere I can, its very hard to beat Rails for pushing out a webapp (many long Clojure timers share this opinion). Clojure shines for web services that require lots of data processing in the server and for integrating with parts of the Java ecosystem.

Every Django/Rails app with any significant business complexity I've worked on has been quick to start but becomes more and more difficult to change over time. The reason Rich Hickey's "Simple Made Easy" talk hit so hard for me was precisely the pain from working with Django apps (and Rails to a lesser extent).

It's nice to get started on a project quickly, but often that quick start is purchased at the cost of a system that is tied together in such a way that it's very difficult to change. Human beings naturally prioritize short term benefits over long term benefits. But developers have a responsibility to their employers / clients not to pick something that makes the dev's life easier in the short term by significantly raising the cost of adapting to changing requirements in the long run.

My life has been a lot simpler since I've moved away from Django to Clojure. It's less evident in weekend projects or in the first few months of a project. But I never find myself saying to a client request "unfortunately, the way Django works, it's hard to [retroactively produce reports/get the state of the application at previous point in time/fix application logic then correct a corrupted table/upgrade just by bumping version numbers/use multiple databases/not systematically overwrite data/etc]."

Re: Using Clojure for Web Apps

#114

Earlier quoted context omitted.

As someone who tries to use Clojure everywhere I can, its very hard to beat Rails for pushing out a webapp (many long Clojure timers share this opinion). Clojure shines for web services that require lots of data processing in the server and for integrating with parts of the Java ecosystem.

Every Django/Rails app with any significant business complexity I've worked on has been quick to start but becomes more and more difficult to change over time. The reason Rich Hickey's "Simple Made Easy" talk hit so hard for me was precisely the pain from working with Django apps (and Rails to a lesser extent). It's nice to get started on a project quickly, but often that quick start is purchased at the cost of a sys…

Yep, that's true, should have clarify that I was talking more about fire and forget CRUD apps (small business stuff).

OTOH, there a huge companies with successful rails(github,airbnb)/django(instagram) apps, but maybe they get away with it because the have big teams to re-architect anything.

What is your preference to interact with databases in Clojure? hugsql, honeysql, clojure.java.jdbc ?

Re: Using Clojure for Web Apps

#115

Earlier quoted context omitted.

As someone who tries to use Clojure everywhere I can, its very hard to beat Rails for pushing out a webapp (many long Clojure timers share this opinion). Clojure shines for web services that require lots of data processing in the server and for integrating with parts of the Java ecosystem.

Every Django/Rails app with any significant business complexity I've worked on has been quick to start but becomes more and more difficult to change over time. The reason Rich Hickey's "Simple Made Easy" talk hit so hard for me was precisely the pain from working with Django apps (and Rails to a lesser extent). It's nice to get started on a project quickly, but often that quick start is purchased at the cost of a sys…

[deleted]

Re: Using Clojure for Web Apps

#116
post #87

Clojure and Elixir (Erlang) are my favorite languages. When you get to the point where the parens and brackets just melt away and you have this awakening. It makes me wish José (creator of elixir) would have chosen Clojure syntax instead of Ruby.

Or Clojerl

Re: Using Clojure for Web Apps

#117

Earlier quoted context omitted.

Sure but RDS, SQS etc make your life simpler and easier, and they work fine with server-ful backend on eg Fargate. I think serverless is still far from providing the same net positive value.

I'd strongly disagree with that assessment after building on serverless platforms full time for 9 months. I'll never go back to a server-full backend.

Interesting. Are you thinking about this vs a monolithic back end or microservices back end? (Monolithic for me).

Re: Using Clojure for Web Apps

#118
post #21

What I'd really like to see is a full stack clojurescript framework like next.js or meteor. I think fulcro comes close but it uses JVM clojure on the server side, so it's not entirely possible to re-use code on either end.

There are several commercial users of Fulcro using Node JS on the backend. I am one of them.

I had no idea about that, guess I need to dive deeper into the fulcro docs, thanks!

Re: Using Clojure for Web Apps

#119
post #70
post #56

Earlier quoted context omitted.

There's a huge difference. The parens in lisps are significantly detrimental to its first impression, and 3rd, 4th ... I have literally never met a developer I can show a lisp code sample to whose reaction isn't "what the hell is that?" It looks totally alien compared to C-style langs, which is what most people learn. With Python, that is not the case at all, basic Python can be interchanged with pseudo-code for the…

> Pretending this problem doesn't exist Young children tend to look with disgust upon many meals that adults find especially delicious. Is it a problem with the food, or is it a matter of experience and perspective? I'm very tempted to give examples, but it's not worth it here. Suffice to say, this falls squarely in the category of "you don't know what you're missing". In this long essay by Paul Graham - http://www.p…

> "you don't know what you're missing".

I think I do. I've had the argument many times here, code-as-data, metaprogramming, structured-programming. Things I don't want, aren't worth the trade-off, and things I don't want to see colleagues inflicting on others.

I've already watched (almost) every Rich Hickey video (well his main "talks"). I love them, agree with the vast majority of what he says and it has shaped me as a programmer, but I don't agree with the final conclusion being to code using lisps ;)

Re: Using Clojure for Web Apps

#120
post #70

Earlier quoted context omitted.

> Pretending this problem doesn't exist Young children tend to look with disgust upon many meals that adults find especially delicious. Is it a problem with the food, or is it a matter of experience and perspective? I'm very tempted to give examples, but it's not worth it here. Suffice to say, this falls squarely in the category of "you don't know what you're missing". In this long essay by Paul Graham - http://www.p…

That wasn’t very nice, but it felt spot on. Curly braces are the chicken nuggets and fries of computer science, lol. Within about 18 months at university (80s), I learned BASIC, FORTRAN, Pascal and Lisp. Syntax, yeah, whatever. (We transitioned to C later, to my horror, with an eye towards a future using “C with classes”)

> Syntax, yeah, whatever.

The vast majority of the programming world simply doesn't seem to agree.

Post reply on HN