Live data from Hacker News

Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

book.fulcrologic.com

41–50 of 66 posts

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#41
post #26

Earlier quoted context omitted.

No love for Pharo? ;)

I play with Pharo about once a month. Love but no real amount of time spent with it anymore. Good language and platform, very energetic community but it is a small community.

Same here. It's been on my "someday I´ll use it on a real project" list for 10-ish years. From time to time I boot an image, play around, cry a little, get back to Python.

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#42

Would anyone recommend Clojure if you run an engineering org and get to make decisions about languages? I've been running node shops for the last several years, and love Clojure since having hosted a couple meetups a while back. That and being most influenced by lispy/ai culture from SICP, CTM, PAIP, AIMA books. Node is getting tiresome due to not being able to trust the ecosystem quality (which takes away some of th…

This thread might be of interest https://twitter.com/domparry/status/1110762025754521600

    We're a very young business, iterating fast through
    features, being very careful about writing maintainable
    code. We have full stack Node apps and full stack Clojure
    apps. This is a short thread on the difference technology
    (or would it be language?) choices have made for us.

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#43

Would anyone recommend Clojure if you run an engineering org and get to make decisions about languages? I've been running node shops for the last several years, and love Clojure since having hosted a couple meetups a while back. That and being most influenced by lispy/ai culture from SICP, CTM, PAIP, AIMA books. Node is getting tiresome due to not being able to trust the ecosystem quality (which takes away some of th…

The main issue with using Clojure is that you are expected to build everything out yourself. A lot of dependencies tend to stop being maintained after a while. Auth systems etc. are half-baked with 10 different implementations on GitHub. The newer shinier ones lack in features while the more featureful ones are from 3 years ago and have not seen a single update since. Now lisp people like to say "but...but.. backward…

That's precisely the problem that Luminus [1] solves. It provides a batteries included template that follows best practices as well as documentation on how you would accomplish many common tasks. Making an app is quite straight forward, and all you need is Leiningen [2] and a JDK. For example, you could do:

    lein new luminus myapp +postgres +auth +swagger
This will create an app using Postgres as the database with a Swagger UI set up out of the box.

During development mode you'd run the app with:

    lein run
Any changes you make in the source will be automatically reflected when you reload the page. You can also connect the editor to the REPL that gets started on port 7000 by default.

You can package this app for production with:

    lein uberjar
and you can run the resulting jar as:

    java -jar -Dconf=config.edn myapp.jar

You really don't have to hand roll your app and go hunting for libraries unless that's something you want to do.

[1] http://www.luminusweb.net/

[2] https://leiningen.org/

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#44
post #11

Clojure is awesome. But refactoring a big project without a type system is very hard and error-prone, and clojure error messages are very difficult to understand.

In my experience the new spec system (a sort of gradual typing) greatly helps in both refactoring and both surfacing and explaining errors, if you havent worked with clojure 1.10 I’d recommend to give it another go. Also spec is still in alpha so it will keep getting better.

There are also nice linters now like clj-kondo that integrate with Emacs.

https://github.com/borkdude/clj-kondo

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#45

Should I be using a Modern do-it-all frameworks for Clojure and Clojurescript? My opinion is of course colored by my years spent in JAVA/J2EE's world of web frameworks ( Wicket, Tapestry, JSF + Hibernate EJBs etc.). In this world, I found most of my time was spent in learning the deep intricacies of the framework and fitting it to my use case. I began to hate every minute I spent on these frameworks. And then I disco…

I feel the same way. I hadn't heard of Liberator, though. We're using Reitit for routing both in backend and frontend and middleware for content negotiation and such. It's an awesome setup (though there were some rough edges starting out), almost everything is easy to understand just by reading the source.

Just today I was thinking how nice it is to have the backend route tree available in both backend and frontend code, so e.g. it's easy to tell in advance in cljs whether the user has permission to use a specific endpoint. The route tree includes authorized roles and I wrote a simple auth middleware to enforce them.

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#46
Fulcro can be too sizable to consume in one bite, most importantly the three core concepts (ident, query, state). Personally I find it useful to start with just EQL which is an Clojure native alternate to Graphql. In fact, Fulcro's predecessor, the famous Om.next was inspired by Graphql. Introduction by Wilker Lucio https://www.youtube.com/watch?v=yyVKf2U8YVg

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#47

Should I be using a Modern do-it-all frameworks for Clojure and Clojurescript? My opinion is of course colored by my years spent in JAVA/J2EE's world of web frameworks ( Wicket, Tapestry, JSF + Hibernate EJBs etc.). In this world, I found most of my time was spent in learning the deep intricacies of the framework and fitting it to my use case. I began to hate every minute I spent on these frameworks. And then I disco…

Fulcro is suitable for medium to large projects with rich data. Fulcro in the wild includes Nubank and Atlas CRM.

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#48

Should I be using a Modern do-it-all frameworks for Clojure and Clojurescript? My opinion is of course colored by my years spent in JAVA/J2EE's world of web frameworks ( Wicket, Tapestry, JSF + Hibernate EJBs etc.). In this world, I found most of my time was spent in learning the deep intricacies of the framework and fitting it to my use case. I began to hate every minute I spent on these frameworks. And then I disco…

My take is that frameworks are great when you are building new projects, but become somewhat limiting over time. Also, with a complex application you often find that not everything can be nicely abstracted and there are features which cut across the stack, requiring changes everywhere.

In my fairly large Clojure+ClojureScript app I do not use a framework, mostly because nothing existed when I started. I pick libraries and make them work together. This has advantages, but also brings endless frustration when I have to deal with stuff like web authentication, file uploads, or Oauth2. I really wish there were good solutions for these kinds of generic problems.

Also, not all choices made by the framework are necessarily a good fit for every application size. I used to like Reagent, and I still think it's great for learning. But then it became limiting, I switched to Rum and never looked back.

But in general, why not take the Clojure approach and use the right tool for the right thing? You don't have to chain yourself for life to a framework, you can use a framework for one app and use a bunch of separate libraries in another. I think in the Java world there is so much incidental complexity, that you have to choose a single framework and stick with it, as it's likely the only thing you will be able to learn. Not so in the Clojure world.

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#49

Would anyone recommend Clojure if you run an engineering org and get to make decisions about languages? I've been running node shops for the last several years, and love Clojure since having hosted a couple meetups a while back. That and being most influenced by lispy/ai culture from SICP, CTM, PAIP, AIMA books. Node is getting tiresome due to not being able to trust the ecosystem quality (which takes away some of th…

I would recommend Clojure, but not necessarily for every organization. If you have experienced, mature and well-educated developers (which means expensive developers), it's a fantastic tool. But many organizations treat developers as interchangeable cogs with mediocre skills and mediocre pay, and Clojure would not work well for them.

I also think it's very easy to tell a crappy/charlatan Clojure dev from a good one just by looking at a small sample of his code.

Re: Fulcro Developers Guide: Single-page full-stack web applications in clj/cljs

#50

Would anyone recommend Clojure if you run an engineering org and get to make decisions about languages? I've been running node shops for the last several years, and love Clojure since having hosted a couple meetups a while back. That and being most influenced by lispy/ai culture from SICP, CTM, PAIP, AIMA books. Node is getting tiresome due to not being able to trust the ecosystem quality (which takes away some of th…

The main issue with using Clojure is that you are expected to build everything out yourself. A lot of dependencies tend to stop being maintained after a while. Auth systems etc. are half-baked with 10 different implementations on GitHub. The newer shinier ones lack in features while the more featureful ones are from 3 years ago and have not seen a single update since. Now lisp people like to say "but...but.. backward…

The sweet spot for clojure is data oriented/data processing backend services (data engineering), where you can leverage stuff like kafka, spark, etc. You are going to get frustrated if you use it for common CRUD websites where the node.js/ruby/python ecosystem actually has quality libraries for all the common parts. In most cases I wouldn't trade node.js for clojure when writing front-end servers.
Post reply on HN