DEV Community

Cover image for Why Theo is Wrong & We'll Get a Laravel for JavaScript

Why Theo is Wrong & We'll Get a Laravel for JavaScript

vincanger on May 29, 2024

JavaScript's Need for a Full-stack Framework “Why Don't We Have A Laravel For JavaScript?”. This is the question Theo poses in his most ...
Collapse
 
jakewilson profile image
Jake Wilson

You guys have completely missed AdonisJS. Backend JS framework built specifically to mimic Laravel.

adonisjs.com/

Collapse
 
vincanger profile image
vincanger

Adonis is mentioned in both the video and the article!

Collapse
 
jakewilson profile image
Jake Wilson • Edited

Yeah sorry I realized that after posting.

So the article I guess is not that JS frameworks haven't tried to go the Laravel route, it's that the ones that have done it successfully have just not gotten popular enough.

Honestly the problem is that the JS ecosystem moves too fast. There are too many new, shiny JS thing-a-jigs coming out all the time that are practically unmaintained after a few years. So even if someone comes out with something like this that truly is the (current) perfect solution, it gets ignored by so many JS devs because it's easy to assume it's just another new thing that will be forgotten in 2 years.

Laraval is successful because it was awesome but also it came out at a time where there weren't tons of big frameworks that felt "just right". Codeigniter was getting old, Symfony was super confusing and used too many "magic methods", CakePHP was a dinosaur. Laravel was timed perfectly and was simple and brilliant to use. Also the PHP "ecosystem" was extremely new. The idea of package managers was still very new.

The JS module based ecosystem is just moving so fast it makes it hard for anything to get traction. React got really popular because Facebook pushed it hard and because it was doing virtual DOM stuff the best of anything that had tried it before. Even now there are arguably much better solutions than React like SvelteJS but again, it's easy for dev's to ignore it because is it just the latest shiny thing (I know Svelte isn't). I mean when was the last time you saw a job listing for Svelte?

Anyways, good article. Thanks,

Thread Thread
 
vincanger profile image
vincanger

Yep. This is the point. Hopefully the js ecosystem is reaching a stabilizing point so that the right framework around it can be built (it seems to be case)

Collapse
 
kulemantu profile image
Kago Kagichiri

Agreed. AdonisJS may not have the popularity of the other frameworks, but if I were moving engineers over from Laravel and Rails, I'd pick this. Methinks Wasp is more like Terraform for JS and may be a cognitive jump from coding to configuration...

Collapse
 
martinsos profile image
Martin Šošić

Vince I am thankful you took the initiative and time to write this article, it is important to have two sides in every argument and to show the whole picture so people can make their own conclusions, and this article brings the missing piece of argument to the video in question.

Collapse
 
vincanger profile image
vincanger

thanks for the support, Martin!

Collapse
 
darkmatterdev profile image
darkMatterDev

Good article! I definitely agree on the "loudest" comments. Everyone talks about Next because they have marketing and they have conferences but their alternatives do not. Personally I really like Adonis but they are not growing because they are quiet. I want a batteries included framework! Yes I have used Next, Nuxt, Nest, Adonis, and every other JS framework but I always go back to Laravel and Rails. In 1-2 lines in the terminal, I have a fully featured app with authentication, authorization, session management, validation, email, notifications, websockets, database setup, event queues, the whole nine, and with configuration all set up for me -- all under 10 seconds. And all of that is 1st party. The choice is simple! No JS framework, that I have used, comes close. Instead I have to choose between 3rd party alternatives and hope that some influencer doesn't make me feel bad on my decision, hope that whatever I choose has long term support, hope that whatever I choose is as robust as its Laravel/Rails counterpart, and hope that I don't have to replace whatever I choose with some new trendy alternative some influencer recommended. This process is absurd!

Collapse
 
gavinsykes profile image
Gavin Sykes

I subscribed to Josh Cirre recently, and he proposes that Laravel is the Laravel for JavaScript. Not everyone would be inclined to agree of course, but I certainly would!

youtube.com/watch?v=MGwgJeThQk4

A lot of the pieces are there already though admittedly there are some missing, for example I'd love a way to automate just running through your Laravel app and generating your TS types based on your models and resources, save you having to update all that manually.

Collapse
 
ariaieboy profile image
AriaieBOY
Collapse
 
gavinsykes profile image
Gavin Sykes

I knew it, I knew there would be! Thank you for this :D

Collapse
 
matijasos profile image
Matija Sosic

Yes, I think that's what makes for that Rails-like feeling everybody is talking about. Is there anything preventing Laravel from doing that?

Collapse
 
programmersoham profile image
Soham

Awesome Post Vinny 👏

Collapse
 
vincanger profile image
vincanger

🙏

Collapse
 
licto profile image
Licto

Vince, hats off to you.
The combination of memes and graphics always brings a smile to face!

Collapse
 
vincanger profile image
vincanger

haha thanks. no one has every commented on that aspect of the article. glad you enjoy them :)

Collapse
 
matijasos profile image
Matija Sosic

This is a really informative overview! I especially love the chart with rails/laravel and others, that shows it takes time to develop such a framework.

Collapse
 
vincanger profile image
vincanger

Yeah that really helps put things into perspective:)

Collapse
 
philipjc profile image
Philip J Cox • Edited

Program. Don’t follow trends. Less abstraction more thinking. 😀

Collapse
 
okchien profile image
asf afsa

tks author

Collapse
 
vincanger profile image
vincanger

ur welcome

Collapse
 
xet7 profile image
Lauri Ojansivu

Is there any PHP-like cheap shared hosting for Javascript or Ruby? URL?

Collapse
 
roguealien profile image
Rodrigo García

Well after reading your post I'm still thinking he's right. Why? Javascript best feature it's also its worst feature which is: it grows to fast.

Having in mind this growth and what you're saying is that they take time, which it does specially for mature, but by the time it has mature enough there will be probably a better way to do the same or much of it faster and with new stuff in mind. I believe the best thing is to have the payloadcms approach, to grow alongside other tools.

Although thinking in a kind of "future proof" project would be to have EVERYTHING in modules that can be updated single handed without affecting the others. For example you want AUTH? Install the package that handles it and creates everything for you, you want to use MVC here's the module, you want GraphQL here's the other module, and so. Think this would be a better way to future proof it instead of bundling everything together and hiding everything behind.

Btw I have tested AdonisJS and I'm currently using it in a production project it won't be my default way to go as backend but will probably go to payloadcms and nextjs if the integration goes as great as advertised.

Collapse
 
sonofyah profile image
son-of-Yah

You should consider giving AdonisJs a good review

Collapse
 
hrgdavor profile image
Davor Hrg

I sincerely hope not.

Collapse
 
knajjars profile image
Khalil Najjar

What can we do to sky rocket Adonis popularity?

Collapse
 
shanos profile image
Stefan Schulz

Strapi is also a kind of laravel for js

Collapse
 
eddsaura profile image
Jose E Saura

Wasp again... mmmmmm

Collapse
 
tan_sven_d3f70bbd8e75609c profile image
tan sven

Comparison of performance to Adonis?

Collapse
 
subjectoriented profile image
SubjectOriented

Is SvelteKit+Svelte not considered fullstack? What else do you need?