|
|
|
|
|
by CompBrogrammer
2329 days ago
|
|
If I may, I have a related question I'd like to ask. I'm a front-end developer looking to get serious about practicing my back-end development skills. Any recommendations for a language/framework with static typing (outside of Node + TS)? Spring Boot and Kotlin? .NET Core? Go? |
|
Big Disclaimer: My observations are completely subjective and personal so YMMV.
Spring Boot and Kotlin: I REALLY like Kotlin as a language, though Spring Boot felt heavy and sluggish from a developer productivity standpoint. This could be my inexperience with Spring and the JVM ecosystem, though I've also read comments on Hacker News that roughly say the same thing (1). I've also read that the heavy use of annotations in Spring Boot are great initially, but it creates headaches for more complex projects. The Maven/Gradle package management experience wasn't great either when compared to RubyGems/NPM. I also tried Kotlin + Ktor(2) on a personal project. It felt better, but at the time it was hard to find solutions to problems on Stackoverflow or the web.
Go: I briefly worked on a project that used Go + Gin. I loved the simplicity of Go and features like concurrency and the built in code formatter. Though at times code felt a little too low-level when implementing business logic such as model validation etc. I missed language features such as generics, null checks and discriminated unions that other languages have. Handling errors also felt tedious at times. However I completely understand the appeal of keeping the core language simple.
.NET Core: I'm probably the most torn about .NET Core. I've always preferred a *nix/Mac system and borderline hated Microsoft during the Balmer years. However C# is a properly good language (though not quite as nice as Kotlin) and the .NET Core standard library feels well designed. There are new features coming in C# 9 like discriminated unions (sealed classed in Kotlin) and records (data classes in Kotlin) that will make it even better. It's not all great, I found unit testing is much more tedious in C#, especially compared to something like Jest or RSpec. Mocking/stubbing was especially difficult as you can't easily override a method unless it's tagged as 'virtual'. One way around it is to use interfaces for the argument type, however this can cause your project to be scatted with pointless interfaces that are only used to overcome this restriction (3).
ASP.NET Core overall is very nice to work with and it's blazingly fast (4). It does have remnants of some enterprisey cruft, but overall I found it very productive to work with. Using VS Code and Jetbrain's Rider made coding on a Mac a breeze though full Visual Studio for Mac is pretty awful.
But here's biggest issue with .NET Core: while it's truely cross-platform and open source, I found the broader .NET ecosystem and community is yet to embrace this. I'm not sure if it ever will completely. The vast majority of YouTube videos and articles I've read assume you're using Visual Studio on Windows. That makes sense, as a 2019 Jetbrains survey indicated that 90% of C#/.NET developers use Windows (5). But if Windows is your jam, this might not be an issue for you.
I also have the strong feeling that Microsoft's strategy for an open sourced .NET is to push the use of Azure for hosting. While it's definitely possible to deploy a .NET Core application to AWS or GCP I worry that Microsoft will always have a bias (even if it's unintentional) to make .NET Core be better on Azure and have soft lock-in. E.g .NET Core will run on any cloud provider, but you'll get the most of it if you're running on Azure.
All of these frameworks were weak in the REPL department. One of the great things about Ruby/Rails and Python/Django is the interactive console. There have been countless times when I've SSH'd into a production box to manually trigger a password reset for a user, or use the ORM to run a one-off report for a product manager. I couldn't find anything close in statically typed frameworks. Because of that I'm quite liking the combo of Python + typings + FastAPI (6) for personal projects. It's not perfect but it's ticking most of the boxes for what I'm looking for.
Again I can't stress enough that this is all my biased personal opinion influenced by how I like to code and my strengths and weaknesses as a developer. But hopefully it will help you in choosing a language/framework that you'll enjoy. Another thing to keep in mind is the amount jobs available for each stack near where you live.
1) https://news.ycombinator.com/item?id=20602318 2) https://ktor.io/ 3) https://stackoverflow.com/questions/20400734/how-do-i-mock-a... 4) 'aspcore-mvc-ef-pg' in https://www.techempower.com/benchmarks/#section=data-r18&hw=... 5) https://www.jetbrains.com/lp/devecosystem-2019/csharp/ 6) https://fastapi.tiangolo.com/
edit: typos and formatting