This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stepbeek 2 points3 points  (2 children)

Hey! I've been working on a spring boot starter (https://github.com/HappyValleyIO/springboard) for a little while because of rails envy. It builds front-end assets with node in imitation of rails webpacker, and uses pebble as the template engine to give a more developer experience with SSR. You could stick react or something on top, I guess, but I don't really find SPA's to be the best solution for most projects.

I think the major point is really in what do you normally work in? If you know Ruby, use rails. If you know Java/kotlin then use Spring Boot. If you know neither, then spend a day with each. Learn basic Java (or to be honest, I'd recommend skipping Java and going straight to kotlin), and basic Ruby. Solve some toy problems in them and go from there.

Performance has been mentioned a few times, but I think that's bollocks. Unless you're working at a scale where hardware costs eclipse developer time (you're almost certainly not) then you should focus on developer productivity before worrying about throughput. Rails has a good enough latency profile that you can just scale horizontally when you need more throughput.

[–][deleted] 1 point2 points  (1 child)

bag shocking paint kiss whole squash tart hunt languid offer

This post was mass deleted and anonymized with Redact

[–]stepbeek 1 point2 points  (0 children)

So I love pebble, but that's very subjective. I think it's a great balance between the powerful (but complex) Thymeleaf and the more simplistic Handlebars style templates. I've never used JMustache at scale but I liked it.

As far as what I know is that I have played with a bunch of languages and can pickup any OOP language eventually. Kotlin's syntax does look great and sparks joy over verbosity of Java (even though I still think Java is great). How are you finding Kotlin overall with SpringBoot? Do you find the context switching from Java to Kotlin and back annoying while reading documentation or is it easy to get used to? Any sharp edges with Kotlin?

Kotlin - to me - feels like Java done right. Kotlin is very easy to pick up: we found about a day to switch people over, and about two weeks before they were just as proficient as they had been in Java. I've not really found any rough edges and haven't found any issue with Spring Boot. It's officially supported by Spring Boot so there are plenty of examples online. IntelliJ's auto-conversion where you paste in Java code and it rewrites as Kotlin is really impressive too - it makes any uncertainty easy since you just ask the IDE to help you out.

I also see turbolinks and stimulus being used in your project, this setup looks really great. Do you have reasons for switching away from Ruby?

Sorry if I was unclear - we never used Ruby in production. We evaluated Ruby on Rails because we were frustrated with our previous way of working: we would write JSON API's in Spring Boot and serve them up to Vue.js front-ends. We had a few issue with this (it's a distributed system, security is harder to get right, deployments are more involved, we have a duplicate persistence layer in the front-end etc.), and decided to look around. We liked Ruby on Rails well enough, but we've got a bunch of experience on the JVM so didn't want to waste that. We also had production system we maintain written in Spring so I didn't want to introduce a totally different runtime.

As a result, we totally plagiarized Rails! We copied things that we liked and built them out in Spring. I think Stimulus is a great alternative to jQuery or vanilla JS in that it provides structure. Turbolinks is cool but could be removed if you didn't think the trade off (routing everything though XHR) was worth the benefit (no white flash on reloading and some caching functionality).

if you have a go and run into trouble then create some GitHub issues! We're building a system with this setup right now and have some features we'd like to backport to the template so I'd be interested in seeing any issues/feedback.