Laravel vs Rails for Javascript developers

  Рет қаралды 5,667

Sam Lewis

Sam Lewis

Күн бұрын

Пікірлер: 46
@AlbertCloete
@AlbertCloete 3 ай бұрын
Inertia is ridiculously good if you're already familiar with a front-end framework. The speed at which you are up and running is something you have to experience for yourself, if you're coming from outside of the Laravel community. You're not going to believe it when people just tell you.
@samldev
@samldev 3 ай бұрын
Agreed! It’s simple and effective.
@Nekoeye
@Nekoeye 3 ай бұрын
Add one more reason to the list. Laracast and Jeffrey Way.
@someguyO2W
@someguyO2W Ай бұрын
Reason #1 to use RoR Ruby!
@filon861
@filon861 Ай бұрын
Laravel docs is phenomenal. It's so direct to the point, the chapters are well organized and put together, and very easy to understand especially to someone like me who's English is not the first language.
@stevecastaneda
@stevecastaneda 3 ай бұрын
Crazy to see this video come up in my feed (perfect timing). I've always built small side projects to help me in my businesses, and NextJS has really made me concerned that the time I spend learning how it works (14+), the entire thing will change again on me before I'm finished. So lately, I've been building my backends with Express and Node, and the frontend with Vite. But then you're faced with the questions.... - ORM or no? Ok, ORM. Prisma? Drizzle? Raw sql? - Authentication? Lucia? NextAuth? Clerk? - And so on... There's bliss in having a batteries included platform (even though I've never touched Laravel, I can see the appeal). It's funny because my path in programming was PHP > Rails > Javascript > possibly PHP. 😅
@samldev
@samldev 3 ай бұрын
Exactly! All the searches and decisions that drive a stake through the heart of productivity. I also wrote my first website in PHP lol now I’m back!
@bastianossandon2576
@bastianossandon2576 2 ай бұрын
I haven't looked at laravel for a long time, but the other day, I found out about inertia, and now this video convinced me. I want Laravel as my backend, makes me feel like I'm using Next.js but with better backend features.
@arthuraguiar5382
@arthuraguiar5382 Ай бұрын
If you're interest into having some of the features of Nextjs in a monolith way of Inertia, you should also check Laravext, maybe it'll interest you (or nor)
@ashraf3053
@ashraf3053 Ай бұрын
I tried both honestly but since my machine is 12 year old, during development, rails works so much better for me
@Hshjshshjsj72727
@Hshjshshjsj72727 Сағат бұрын
Linux os?
@AgustinIvanScolieri
@AgustinIvanScolieri Ай бұрын
You made some interesting points, while I did not look to much into laravel, Im starting to get into RoR and one thing you might got wrong is that the RoR also has a Guide page which is more easy to read than just a bunch of API specifications. Was actually at the left of the API sections.
@samldev
@samldev Ай бұрын
Ah good call out! I didn’t know about that
@EightNineOne
@EightNineOne Ай бұрын
@@samldev yeah Ruby guides are crazy comprehensive, just not written as well as Laravel. There’s actually quite a bit more first party info for rails.
@EightNineOne
@EightNineOne Ай бұрын
So at this point I’ve got more experience with Laravel but I’ve recently begun to focus more on rails and begun to actually prefer it. I wanna do a few responses: 1. Laravel is indeed MORE batteries included, however once you leave the first party packages and dig more into third party stuff for Laravel, (spatie being the most notable exception) Rails begins to shine. There are a series of defacto gems and they tend to be of higher quality than most third party Laravel packages. The ROR team don’t do a good enough job of exposing them, leading to that feeling you describe. It’s not actually as fractured as JS, but the lack of direction at times can make it feel that way. Devise, for example IS the defacto auth for rails, there’s been discussion of true first party auth though. Clarity and documentation are Rails’ two biggest weaknesses though. 2. Inertia does work just fine in rails, as you say, they really need to embrace it properly, inertia is AMAZING. the third biggest issue with rails is DHH. Basically I agree with you entirely 😂. Inertia is actually pretty popular and growing in rails. For certain apps the turbo/stimulus approach is actually great. But inertia is undoubtedly better 3. Yup. But then again, Laravel is basically a flavour of PHP that insulates you from the worst of the language. Rails, without trying to sound romantic, is very much like writing vanilla ruby, it’s a very natural extension of the language. Every time you fall out of the Laravel bubble and start writing vanilla PHP…ew. But it is certainly preference and some people bounce off Ruby hard. I personally think the juice is worth the squeeze. The learning curve for Ruby is similar to python and if you know python, it makes learning Ruby actually quite easy. 4. Laravels docs are phenomenal. Rails is extremely comprehensive but they suffer from a bit of an identity crisis. They’re too obtuse for beginners and Ruby guides are too flabby to be a good reference. It kind of sits in the worst spot. The docs are in the process of being massively overhauled though. 5. The rails community IMO are friendlier, has a greater population of experts happy to share. There’s also a TON of similarly profitable businesses run on rails to this day, they just do less bandstanding (this isn’t a criticism as such) they’re just getting on with it and share more privately. But ultimately, they’re just two flavours of great. If I’m in the scenario where I need guidance on something obscure, I tend to get a lively and open conversation in rails world more often. From my list here it looks pretty well tied and probably slightly in favour of Laravel TBH. But the devil is really in the detail, the reason I’ve started favouring rails over Laravel is three things really: Speed, robustness and flexibility. Rails conventions and the brevity, cohesiveness and readability of rails code means you can do things RAPIDLY and well first time (most of the time) you get that “write it once, confused as it can’t be that simple, but yea, it actually is” feeling scarily often. And for the times when you need to do something more novel or exotic, or “getting off the rail” this continues, for those times you have to stop and google something in Laravel and have a slightly painful time, 7 times out of 10 in rails, the first idea you had is often one that is workable, and if it needs revisiting, it’s easy to refactor and remains readable. It’s really down to how much insulation and abstraction going on in Laravel to remove you from raw PHP. There isn’t as much in rails and it’s a better ride. Rails is just as opinionated, but also provides an awful lot of power (this isn’t always a good thing admittedly) and ability to support the things you want to do in a way that Laravel just doesn’t. Great video by the way!
@samldev
@samldev Ай бұрын
Such a great comment, thanks for taking the time to write it! A page on the Rails site with a simple list of the de facto packages would go a long way towards getting newbies up and running. Truthfully that was the biggest decision making factor for me when I picked Laravel, was the confidence that I was taking the road most traveled. I totally believe the brevity of Rails makes you feel like you're just flying through features. When I look at the syntax I feel slightly jealous 😂 or even just looking at the Inertia community adapter, it's so clean and well done. For what it's worth, I tweeted at Josh Cirre who works at Laravel and he confirmed the Rails adapter is community maintained despite being in the official Inertia Github org. Now that Inertia 2.0 has some sweet new features coming, I'd still say it's a point for Laravel by being officially supported. I still get the itch to play with Rails and have to force myself not to because it's just a distraction from actually shipping things or making videos 😁
@EightNineOne
@EightNineOne Ай бұрын
@@samldev resources across the board absolutely need more surfacing. You have to dig for everything, not always that hard, but still. Laravel really is the gold standard for documentation. I can feel why you went the Laravel route. Again, you can get to that level of confidence in rails, but again, official channels or a prominent creator is not there. On Inertia, I really really want rails to embrace it in an official capacity. I saw a podcast where Taylor said “If I could get DHH in a room and show him inertia, he’d drop Hotwire straight away” while I don’t entirely agree, inertia is too good to not get on board with. FWIW I find Hotwire waay better than livewire, which feels a bit incongruent and messy IMO. I would recommend not scratching that itch. You’ll just end up a rails dev. Doubly true if you ever get Phoenix curious. Phoenix is a work of art. Good chatting to you :)
@HanifCarroll
@HanifCarroll Ай бұрын
@@EightNineOneon the Hotwire over livewire topic, I haven’t used either (just started getting into Laravel this week), but I like the Livewire syntax and philosophy more. I like that related code is all kept together, much like a single file component in Vue. The streaming html response stuff in a different controller just doesn’t sit well with me.
@hentype
@hentype 29 күн бұрын
Never really got into 3rd party packages in laravel since I've always coded anything custom I needed and never felt the need for outside laravel packages. Never a fan of communities as well, I learned to code for my own use cases (didn't study IT/CS) and never felt the need of that community in the last 15 years of working on my own personal projects. Reading docs and guides was enough for me personally. I'd agree on the part where Rails is just more beautiful, compact yet readable in general and powerful when it comes to what you want it to do without much obstacles.
@christophrumpel
@christophrumpel Ай бұрын
Nice video and welcome to the PHP/Laravel community ✌
@samldev
@samldev Ай бұрын
Thanks Christoph!
@sonoftroy8572
@sonoftroy8572 Ай бұрын
But you can’t forget about Symfony! It’s just as amazing
@abrahamibrahimovic2866
@abrahamibrahimovic2866 Ай бұрын
Wanted to say the same. Laravel and Rail are both great, but I personally prefer Symfony. It seems more structured but also more flexible for me, Also form handling is done much better with Symfony, I prefer also Doctrine over eloquent. And for building APIs we have the API-Platform with Symfony, but soon you will also be able to use it with Laravel. Last but not least,, Symfony hast by far the best documentation.
@hentype
@hentype 7 күн бұрын
This, the better comparison would be Symfony vs RoR instead of laravel.
@yp5387
@yp5387 Ай бұрын
I subscribed as soon as you mentioned your answer in the beginning of the video. I have seen so many comparison videos and eventually they say they both are good at the end 😂. and I am like what the…
@timbd87
@timbd87 Ай бұрын
I think monolith support for front end frameworks would be an awesome addition to rails. Going all in on turbo streams / frames means you can compromise the UX. I do use turbo, but also sprinkle in either vanilla JS or Vue components where needed. If the monolith support was there, i might go all in on a FE framework
@johanandre5338
@johanandre5338 Ай бұрын
Reason for using RoR: it's not PHP.
@James-l7n3n
@James-l7n3n Ай бұрын
Both are very good, it's just way easier to add Vue or React or whatever you want within the same ecosystem when using Laravel. In rails you might pull your hair out unless you separate things entirely with rails new project --api.
@GeneralOfTheArmchair
@GeneralOfTheArmchair 28 күн бұрын
:) I think your sum up is if you are coming from react choose laravel. If you are coming from angular choose rails. I think you should drop the language familiarity as an argument. I know people are tempted to do it but I think it setup people to reinforce their believe that learning something different (ming the word different not new) is in a way bad thing. In a world where software engineers are bombarded with different technologies and languages, reinforcing a believe like this sets up new software engineers on a path where what they've learned sets them on a path to only seek familiar technologies and not care that much about whether those technologies are fundamentally right for their use cases.
@_unknown_guy
@_unknown_guy Ай бұрын
If you want to use less JS, Rails is the way. It's half a joke. I would say RoR's main focus has been serving HTML and sprinkle JS on top. Of course going full JS frontend can be done without big issues. The first party approach is bit different, Rails tend to provide adapters like ActiveStorage or ActiveJobs, because there is already bunch of established gems that goes way back. Also gems are not only RoR thing, gems are for all Ruby ecosystem, Your mentioned Devise more RoR specific, but then something like omniauth or even i18n is not RoR specific and can be used with Sinatra or Hanami. I see why you like the Laravel first party approach, for new user it's great. For RoR most of the time there is 2-3 established gems that are perfectly fine and you learn the options over time and there might be advantages for some use case to use other options. But for JS devs, I can see why they would go Laravel way.
@11vag
@11vag 15 күн бұрын
I'm desperately trying to leave the JS ecosystem and found myself looking at these two options. I just want to learn one thing, and build fast. I don't want to deal with configurations, incompatibilities and changes made to every single framework every two seconds. As another comment pointed out down below, it's really concerning to see how nextjs changes things so fast that by the time you think you are done kind of understanding how to use that thing, they have already come up with something different claiming it's the recommended approach. I'm so done with JS. Done.
@williambuckley5601
@williambuckley5601 3 ай бұрын
Inertia is something I use often, both with and without Laravel. Calling it first-party is misleading given the recency of that situation, and the lack of development.
@samldev
@samldev 3 ай бұрын
Taylor Otwell has said they’re announcing some new Inertia features at Laracon US later this month, so I disagree - I would say it’s first party supported. Curious to see what the new features are!
@williambuckley5601
@williambuckley5601 3 ай бұрын
@@samldev Let's see! It's already feature rich and has a protocol simple enough to be rock solid wherever it's used so anything they add would be a bonus. We've not seen a change in approach to its development since the initial announcement that it was being brought under the Laravel umbrella but I'd be delighted if that were to change and genuine commitments were made to its continued development. Quite how Inertia has remained such a hidden gem in the wider Laravel ecosystem is beyond my comprehension. Looking forward to your upcoming videos covering it.
@samldev
@samldev 3 ай бұрын
@@williambuckley5601 agreed! Since inertia fills that protocol niche, I can see how it could be called “finished software”, so I’m curious what little niceties they’re going to bring us.
@drugoviic
@drugoviic Ай бұрын
Taylor mentioned why, also it's maintained by the laravel core team, it's first party supported
@hentype
@hentype 29 күн бұрын
Yeah, i got invested in inertia on a laravel project 2 years ago but ditched it and rewrote the whole project with livewire instead since the lack of development at the time made me see it as having a deem future. Not going back anytime soon since livewire is more actively supported by laravel itself anyway.
@nyambe
@nyambe Ай бұрын
How does it compare with nuxt 3? The thing is than many projects are parcial functionality. Auth and other things might already exist
@GeneralOfTheArmchair
@GeneralOfTheArmchair 28 күн бұрын
On reason 4. I think you confused the API part and guides part on the Rails site with the all in one documentation style of laravel.
@saduschima
@saduschima 27 күн бұрын
What does one thing have to do with the other? It's like comparing WordPress with Angular. LOL
@MatthewKennedyUK
@MatthewKennedyUK Ай бұрын
Nobody on gods green earth wants to write PHP
@ihateheartbreak
@ihateheartbreak 2 ай бұрын
i tried both, laravel is really cool and things just work but ror is like fast web development like there are gems you just install and you hve to configure some things. ror scaffolding is just amazing
NO MORE BUGS | Real World Laravel
17:04
Sam Lewis
Рет қаралды 828
Laravel First Impressions From A JavaScript Dev
21:08
adamdotdev
Рет қаралды 136 М.
HELP!!!
00:46
Natan por Aí
Рет қаралды 37 МЛН
У вас там какие таланты ?😂
00:19
Карина Хафизова
Рет қаралды 18 МЛН
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 96 М.
BEWARE these Laravel attributes | Real World Laravel
19:10
Sam Lewis
Рет қаралды 5 М.
The Only Database Abstraction You Need | Prime Reacts
21:42
ThePrimeTime
Рет қаралды 219 М.
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 814 М.
5 Secrets to Becoming a Badass Ruby on Rails Developer
28:01
Mix & Go
Рет қаралды 24 М.
Write Laravel, not PHP (feat. Aaron Francis) | 029
58:45
Backend Banter
Рет қаралды 20 М.
I Was DEFINITELY Using The Wrong Terminal Shell
9:59
DevOps Toolbox
Рет қаралды 51 М.
Is This Really the "Laravel of JavaScript"!? Let's Check Out AdonisJS!
43:01
Rails World 2024 Opening Keynote - David Heinemeier Hansson
1:05:46
Ruby on Rails
Рет қаралды 106 М.
HELP!!!
00:46
Natan por Aí
Рет қаралды 37 МЛН