▲ | liampulles 2 days ago | |||||||||||||||||||||||||||||||||||||||||||
I'm starting to build a bit of antagonism to all-encompassing frameworks (e.g. Spring, Larvel, Phoenix, etc.), because while they are productive to build new things with, I seem to always have the same issue on legacy projects built with them. It always seems to be a challenge to upgrade dependencies for these projects. Its usually because (in building the thing) one can't fully follow the "prescribed" way of doing things with the god framework, because each project has to deal with a niche infrastructure environment and/or business context that requires some hack or additional dependency. Then when you need to, say, upgrade a language version, you can't follow the god framework's guide for doing this (if there even is a decent one) because it will break your workaround. So you end up with this hodgepodge which never gets updated until it reaches a critical point where it cannot continue to run on your infrastructure, and it forces a big migration project. Using a selection of libraries to build up the elements of a web service, and creating your own high-level abstractions for utilizing them, does require an additional time investment, but it leaves you in more control to do upgrades piece by piece, and to pivot the way things work when it is needed. I feel like the Go ecosystem follows the latter approach more than most, and it was bit of a mindset shift for me at first, but I've grown to appreciate it. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | tombert 2 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||
Web frameworks for me are one of those things that's "great until it isn't". If you're making a simple app then web frameworks can feel downright magical (like the original "Build a blog in 15 minutes with Rails" demo [1]), but for anything that gets even remotely complicated, I find that they generally just get in the way. I personally have grown to prefer the "mid-level" HTTP setups, like Express with Node.js or Vert.x with Java. [1] | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
▲ | 3eb7988a1663 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
In the Python world, I see this as the microframework (Flask-esque) vs macroframework (Django). I will take Django every single time. Flask prescribes so little that every project is a snow flake. Which of the N available options will you pick to handle auth/templating/cookies/email/whatever. Real decision fatigue when trying to enable core functionality. Extra special is that many of these libraries are single author creations, so maintenance and security are a mixed bag. Django - every project roughly looks the same. You get so much out of the box that you must have special requirements if you must supplement with libraries. Since so many bits are first party, you have greater confidence that code is being maintained/checked for security problems. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | evantbyrne 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
The reason Go does not have a grand framework is that the language has a severely underdeveloped type system, which makes building complex libraries that meaningfully complement each other overly difficult. I waited nine years before starting on my first Go database toolkit so I could use generics. I succeeded, but can't shake the feeling that I know I had a better experience doing it with Java in undergrad. Being able to map/filter/reduce from a result type into another generic type would be a complete game changer. Being able specify union types would eliminate my need for the "any" type. Being able to overload would clean up a lot of code. It needs more time in the oven. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
▲ | fozdenn 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
Yep, In my domain only Go/Rust are useful. The opinionated framework culture never fits the bill. I think Rails/Laravel/Django are great when you have a beaten path for relational DB crud. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | some_furry 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
> It always seems to be a challenge to upgrade dependencies for these projects. Its usually because (in building the thing) one can't fully follow the "prescribed" way of doing things with the god framework, because each project has to deal with a niche infrastructure environment and/or business context that requires some hack or additional dependency. Then when you need to, say, upgrade a language version, you can't follow the god framework's guide for doing this (if there even is a decent one) because it will break your workaround. So you end up with this hodgepodge which never gets updated until it reaches a critical point where it cannot continue to run on your infrastructure, and it forces a big migration project. Can you give any specific examples? I'd like to see which of these are open source. And whether or not they're funded for maintenance. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | zakirullin 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
PSR to the rescue! For the past ~5 years I've been only using PSR-compatible components, with no framework whatsoever. For both enterprise-grade projects and small services. The reason was the same - those all-encompassing frameworks in long run just don't work. Too many constraints, too much hustle maintaining/updating. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | billy99k 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
I've been out of web dev for a few years now, but my issue with frameworks was always the ORMs. Simple CRUD apps always worked fine, but when I had to optimize SQL queries or create something more complex, I would end up having to add hacky additions to the app that always broke upgrades. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | b_e_n_t_o_n 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
I've found this for web frameworks as well. The time you spend learning the framework's abstractions could just be spent picking a queue library or whatever you need and adding it to your Go server. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | KronisLV 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
> So you end up with this hodgepodge which never gets updated until it reaches a critical point where it cannot continue to run on your infrastructure, and it forces a big migration project. This matches my experience, literally took months to migrate an older Spring project to something with fewer CVEs and bugs. Created some new bugs and issues along the way, including one where compiling it on Windows would produce a .jar that runs fine, whereas compiling it on Linux changed something in how the Spring beans are initialized, leading to it failing to even start (the settings for allowing lazy initialization changed nothing). > Using a selection of libraries to build up the elements of a web service, and creating your own high-level abstractions for utilizing them, does require an additional time investment, but it leaves you in more control to do upgrades piece by piece, and to pivot the way things work when it is needed. Yes and no. If you only wire things up, then sure. But depending on how much code your devs have to write (and depending on the devs), you might actually end up with a bespoke mess if you have to dig into writing various base mechanisms (think transaction handling, scheduled tasks, task pools for parallel execution, key/value stores and caching, validations, auditing and metrics, file uploads and downloads etc.) - one that will have less documentation than something like Spring Boot, you won't be able to ask anyone how to solve issues in it, alongside sometimes just having architectures that neither scale nor work properly, because it isn't something battle tested over literal decades. > I feel like the Go ecosystem follows the latter approach more than most, and it was bit of a mindset shift for me at first, but I've grown to appreciate it. I still agree with this, to me it feels like the correct approach is indeed to give you most of the tools you might need for the technical bits and make you (or other devs) only write a bit of glue to wire everything up, to order how data moves through your system (resources, services, validators, repositories etc.) according to whatever business rules you might have. Things really go south when you miss out on that detail. In the Java land, I think Dropwizard is a good example of that: it uses a bunch of mostly idiomatic libraries that are well tested, without being quite as rigid as Spring (and Spring Boot), letting you set things up as you please and also not getting in the way too much: https://www.dropwizard.io/en/stable/getting-started.html In Go, I really like that a lot of the stuff is already present in the standard library. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | N2yhWNXQN3k9 2 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||
In Laravel, the issue is that the framework is sold as "productive" as default. There is no real "beef" to the framework though, IMO. It is better today, but historically it is just a wrapper around symfony with some dependency injection through reflection, questionable serde, tons of magic, and with some unique takes on templates and routing, which are arguably not very good takes? Maybe components are better, but blade in general seems backwards as a template language. Ever want to type `$model->foo instead of $model->getFoo()` but then have `$model->foo` magically call `$model->getFooAttribute()`, but fall back to `$model->getAttribute('foo')` if that method doesn't exist? Then that magically calls some casting methods, and possibly even fetches infinite records from a remote store? It is so artisan, bro. I can tell you more if you got five minutes. | ||||||||||||||||||||||||||||||||||||||||||||
|