JavaScript Fatigue Strikes Back
allenpike.com
allenpike.com
But of late I’ve been learning Elixir LiveView. It doesn’t make all of that go away completely, but it’s a perceived improvement from my place of observance.
For example, by moving all of your front ends service calls to the backend you basically bottleneck your initial page load in waiting for those calls to resolve. Time to first paint can absolutely tank, and this is a pretty important perceived performance metric that impacts interactivity.
I’ve also found that developers who moved to Next don’t really have a clear understanding of how to handle application state management on the front end now that redux has fallen out of style. Excessive service calls (requesting data you’ve already fetched in other components) has ballooned to levels I’ve never seen before. And because all of these calls are happening on the backend, it’s not obvious to developers when they are making excessive calls because they can’t see the requests in the network tab of any modern browser.
So now they need to start thinking about a cache because the performance feels so much worse. Luckily Vercel can sell you this service - this adds another layer of complexity, but it solves their problem and they proclaim that Next is some hyper performant framework.
Now I know there are very efficient ways to do server side rendering, and properly using the new server components in Next and managing state… but the paradigm is so much different that I think many developers miss that step and actually degrade the performance of their applications when trying to migrate to this new framework of server side rendering.
I might be old fashioned but I do think this “new” server side rendering approach adds a lot of complexity for not a whole lot of gain, but I am still excited to learn more about Next and understand the best practices when using this style of app.
Makes it seem like the industry is a jobs program for people addicted to JS. :)
Even with the backend set, the front still felt like it had to make a choice among Blade, Livewire, Vue and React glued together with Inertia (?). Then you had to pick between several different authentication systems. Unfortunately I wanted app support as well which would require React Native, Flutter or something else which the Laravel documentation doesn't seem to make any mention about.
Naturally one could make it all from scratch with vanilla PHP and JS but that's often not a suitable comparison to a full-fledge framework.
Laravel is no longer just a PHP framework; it now resembles Java Spring — an opinionated, enterprise-friendly ecosystem where everything can be connected through configuration. The focus has shifted towards businesses and teams rather than personal or hobbyist projects.
For those who prefer a more traditional framework with long-term stability and fewer commercial dependencies, Symfony remains a solid alternative.
Relevant threads:
https://www.reddit.com/r/laravel/comments/1iyyxk4/laravel_is...
https://www.reddit.com/r/PHP/comments/1j05wh1/laravel_is_goi...
Still, the dependency entanglement in JS is just crazy. This is the dependency graph of Platformatic:
https://npmgraph.js.org/?q=platformatic#zoom=h
AFAIK there's no JS framework that solved the whole thing and doesn't depend on other packages.
I don't know why JS devs historically have an aversion to frameworks. Maybe the author of the article is right and this is caused by preventing heavy bloated JS apps in the browser.
In any case, after 10 years of Node in the backend, I'm done with it.
The tooling on the other hand is often a Rube Goldberg machine transpilers, compilers etc. Some of the information is documented, some of it isn't and it can be a massive time sink to get everything working together and have your IDE / Editor correctly configured.
TypeScript can be nice, but I run into rough areas where you are actively fighting the type system.
The farther away I get from the JS ecosystem, the more fun webdev becomes for me.
For APIs I'm using FastEndpoints [1] and loving it. I'll probably end up switching to Minimal APIs once they have validation etc.
I very strongly believe it's only Microsoft's reputation that is hindering it's adoption outside enterprise settings (and very deservedly so).
Remember Meteor[0]?
> ...but sometimes people ask, “What do you even need client-side rendering for nowadays?” I think it matters most for products where folks are actively getting work done, where you want things like optimistic updates, offline mode, rapid workflows, realtime collaboration, and lovely little animations that warm your users’ hearts
The reality is that SPA is mostly a bane for the first three, unnecessary for the last one, and there's rarely need for realtime collaboration apart from a few specific workflow. Today the recommendation is to start as a monolith first, I'd love for people to start with server-rendered UI first. Not loading several libraries just to reimplement (badly) already existing browser features. It's disheartening when you see simple blog can't even show text without javascript.
For JS-in-the-browser at least, I feel like it’s less about which framework/paradigm you pick today, but more about how your choices will limit your options in the future. If you could predict the future, you’d just choose the framework with the longest maintained life, but you can’t, so just focus on maximizing abstractions in the framework built on the slow-changing parts of the web (HTML/CSS, browser APIs) and try to consider how it would integrate as the “legacy” application you’ll be bemoaning only 5-7 years from now.
Some of the most successful companies I’ve heard about have legacy applications. Aiming to make the perfect choice for all future problems up front seems like the wrong choice IF it prevents you from changing your choice without tearing everything down first.
For those who use Rails, is it actually super productive, and is speed not really an issue?
Also, sorbet/tapioca are great tools for static typing. Admittedly, there's some work to get the proper setup. They have limitations too (don't expect TypeScript levels), but it's worth it. I found a few sneaky bugs that were in the open for years, just by typing one large-ish model (despite it being tested thoroughly).
I think that ActiveRecord is actually the weakest part of Rails, and the scariest and most difficult to manage code in a large rails app is models and stuff that is doing lots of active record stuff.
Rails can’t be reduced the goodness is that it’s more than the sum of its parts to get everything together, as DHH says, omakase. It’s not needing to build a framework before you can build your idea. It’s having such a solid and complete base that add-on packages can extend knowing they have a solid foundation. It’s being dominant enough in the language that most things try hard to work well with you.
Outside of React, I don’t think there’s any package in JS that comes close to have the gravitational pull that Rails has in Ruby.
Like, the typical path is: 1) add gem, 2) code gen, 3) run migration, 4) you now have third party code managing a subset of your model. Crazy powerful pattern. applies to everything from auth to sending emails to async task workers to writing audit logs.
There’s also Adonis, which I’ve spent less time looking at and seems like it has a less visible community at least.
There are a few others in the category but I tend to forget their names.
It's telling to me that Redwood/Adonis haven't really seen huge uptake. I feel like the JS ecosystem moves pretty slowly on a conceptual level overall. Backend dev is still heavily associated with express.js when that's seen as a minimal framework in other ecosystems.
Of course, like all sensible users I absolutely despise JavaScript and can’t stand when web devs decide to burn my battery for no reason. But, I wonder if we’re anywhere near pushing through at this point? Perhaps a framework could be invented that detects that the user has disabled JavaScript, and actually do all the JavaScript rendering server-side?
I guess at that point web devs could script to their hearts content and their employers will bear the cost power cost of dynamically generating a bunch of stuff. (Hopefully the incentive change there will cause them to be more prudent, but if not I guess I don’t really care that much).
JFC.
Not everyone can work like that; it's a side effect of the domain I work in. But I chose that in part because I'd rather get work done than chase new things.