The JavaScript problem is a common issue faced by developers when working with web development frameworks like Rails and Laravel. These frameworks are great for building web applications, but they can sometimes struggle with integrating JavaScript functionality seamlessly. In this tutorial, we will explore why Rails and Laravel may not be the best choice for handling complex JavaScript tasks and how you can work around this issue.
HTML Tags for Tutorial:
The JavaScript Problem: Why Rails and Laravel Won’t Do
Web development frameworks like Rails and Laravel are great for building web applications quickly and efficiently. However, they are not always the best choice for handling complex JavaScript tasks. This is because Rails and Laravel are primarily designed for server-side rendering and may struggle with client-side JavaScript tasks.
Why Rails and Laravel Struggle with JavaScript
Rails and Laravel are built around the MVC (Model-View-Controller) architecture, which is great for organizing code and handling server-side tasks. However, when it comes to client-side JavaScript, these frameworks can sometimes fall short. This is because they are not optimized for handling complex JavaScript functionality and may struggle with tasks like DOM manipulation, AJAX requests, and front-end frameworks.
How to Work Around the JavaScript Problem
If you find that Rails or Laravel are struggling to handle your JavaScript tasks, there are a few ways you can work around this issue:
- Use a Front-End Framework: Consider using a front-end framework like React or Vue.js to handle complex JavaScript tasks. These frameworks are optimized for client-side development and can seamlessly integrate with Rails or Laravel.
- Separate Your Front-End and Back-End Code: Instead of trying to handle all your JavaScript tasks within Rails or Laravel, consider separating your front-end and back-end code. You can create a separate front-end application using a framework like React or Angular and communicate with your Rails or Laravel back-end using APIs.
- Use JavaScript Libraries: If you only need to perform basic JavaScript tasks, consider using JavaScript libraries like jQuery or Underscore.js. These libraries can help simplify your JavaScript code and make it easier to integrate with Rails or Laravel.
Conclusion
While Rails and Laravel are great for building web applications, they may not always be the best choice for handling complex JavaScript tasks. By using front-end frameworks, separating your front-end and back-end code, or using JavaScript libraries, you can work around the JavaScript problem and create seamless web applications.
24:55 Laravel kind of also treats you like a child with some of their tools that are presented as a default choice to use in your project. I can handle my docker containers without Sail and make my classes without make:class, thank you.
To be fair, authentication is evolving. We have a lot more ways to authenticate a user nowadays than what we had in the past.
Not a reason to pay anyone for that service, of course.
Long live Drupal and its amazing community!
It's an economic model, the americain way of doing business, build a company make the biggest amount of money out of it in a short period of time and let the company die, build another one. Vercel products and their advertisers like Theo push this model, startups lol. I don't even use Laravel anymore, I'm tired of it changing every couple of months, it's taking the same path and PHP as a language is influenced by the JS hype and craziness. Companies that still use PHP opt for Symphony (Laravel is build around some of its core componenents) its is more stable.
at 19:00 you talked about how a framework can die and can become legacy code that can no longer be maintained. What does that even mean, that a framework will no longer be maintained? What does "maintain" a framework mean if the product is already sufficient?
Saying "it's not complicated" and "i'm not stupid" is such a stupid take – irony detected 😂
At my last job I we had a dedicated team of 3 people who were responsible only for the infra for our one project. We were inspired by Vercel to make the whole CI/CD pipeline like they did, then because of the nature of the project we have a high variety of day to day traffic. We also had to have high fault tolerancy and a 99.9% uptime, where the servers were accross 3 continents.
It took those guys quite a bit to get all going, with half of the features. Meanwhile we are either over or under provisioning our servers, but cannot reuse them for other things because of said varying traffic.
So while yes it's not that complicated to get started, working out all the intricacies of everything is definitely hard and you cannot convince me otherwise. Which is exactly why startups like these pop up and people want to pay them. In the end you will eat the cost of doing it yourself anyways.
Here is another example. Authentication. In my younger years I was at a company who wanted an OIDC and OAuth compliant login service, which connected to some government services. It took me a good month to make everything spec compliant, hell, even just going through all the documentation for it was a hurdle. This is not even mentioning all the strict little details which were forced upon us from the gov, and their security experts who audited the code. And then the fun things start, keeping everything up-to-date to the govs policies was frankly annoying.
Although I was glad I learn all of that, If you had asked me after that would I pay X money for someone to do all of this I definitely would. And again, no way in hell can you convice me that it's "easy" and "simple".
After you walk a few more miles and start working on some real difficult problems come here again and you will see what foolish remarks you make 😉
Js/NPM and everything related is mostly done and influenced by people who can't even decide what their pronouns are and that is visible in their work. Their work is like fashion and if you don't believe me you haven't worked enough in the "frontend" world. No wonder they can't decide on a good framework that is robust and on par with Django/Laravel/Rails/Phoenix. FASHION. The entyre npm ecosystem is a mess
He and other JS devs are so cringy
Dude how are you supposed to learn anything with a million frameworks and echosystem pieces this is total sh*T. I learned my lesson with Gatsby also It's NOT Javascript that your learning your learning a ton of ways of doing things the NEXT way, or the Gatsby way ext…
This video is on the level of a required lecture at MIT.
Despite my frustration with the fragmented and unstable nature of the JavaScript ecosystem—where many libraries get abandoned and it can take up to a week just to set up our stack before writing the first line of code—I have to acknowledge that JavaScript leads in software engineering innovation.
The advancements in reactivity from React, Svelte, to SolidJS are unmatched. In comparison, reactivity on iOS and Android is quite mundane.
SSR and RSC with hydration are powerful inventions that PHP, Python, and Ruby backend frameworks haven't managed to invent.
JavaScript's cross-platform technology, especially React Native, is the strongest and most promising, outpacing competitors like Flutter, with no other languages even trying to do it.
Perhaps this complexity is just the price we pay for such groundbreaking innovation.
Because JS doesn't have good human-centric backend framework with large components/libs kit. Just several frameworks that are trying.
Good example – Adonis. It could be used as very basic version of Laravel. Poor components base, less components/libs from community. Docs is another poor moment in that framework.
Also Theo's videos is very superficial. I dont like this youtuber, even I hate his videos because he misleads in many points.
JavaScript on the server is the fast fashion industry trying to sell industrial generators.
Theo is an absolute idiot. Stopped following him a long time ago
Bro! you're so based.
Good talk! I like the way of your mind. And Teo is overhyped
I want to pick one of laravel/rails, which should i go for?
Imagine if you had to change your electric company or ISP every year because the previous one went out of business. Very few would stand for it and would demand that the government intervene.
After discovering Laravel, I largely abandoned the JavaScript ecosystem because keeping up with its rapid changes is too stressful. With Laravel, I am far more productive, achieving tasks I once thought would require a team of senior Angular and Spring Boot developers, and I did so in a fraction of the time.
honestly who gives a fuck, does anyone really watch either of these videos and be like damn I should have learned Laravel or Javascript.