YouTubevideo· May 28, 2024· 29:48· 15K views on YouTube

Laravel is the Laravel for JS

Watch on YouTube ↗
0:00

React at a moment you like. The best moments light up here.

transcript

67 moments
  1. so laravel seems to be getting a lot of attention recently whether it's an Aaron Fran's video or Taylor otwell posting about a to-do list on Twitter and then joining Dax Adam and Ryan to talk about remix and laravel or Theo posting a video about laravel and JS and the whole ecosystem I've already skimmed through the video but I want to take a deeper look record it and give my thoughts as to why there isn't a JS framework within

  2. Lille if you've been writing code for a while you were probably around for the rails era when suddenly out of nowhere we had a way to build applications with this weird new language Ruby that allowed us to have server and client together in a way that kind of made sense you would write a template you would fill its data out using the model view controller Paradigm and structure through the view and the template what you wanted the user to see and this is a magical pattern that is how so many of the applications we know and love were built and how many of them are still built today services like GitHub are

  3. still powered almost entirely by rails they've moved a lot of the client to things like react but the general structure is built around the patterns that rails was one of the first things to invent in the OG Ruby Era the goal of this video is not to talk a bunch of about Ruby or LEL or all these other Solutions and the LEL in the title has larel it's funny Taylor actually in his podcast with Adam and Ryan and Dax

  4. said that a lot of people Miss Browns it and he doesn't really care but he says it is pronounced larl but we won't fault him on that as a purpose here because larl is an awesome framework and I don't want to sit here and pretend it isn't it is the PHP framework for web Artisans which sounds a little bit pretentious see we agree with something so he says Lille is a great framework he doesn't want to pretend it isn't but let's be real we're JavaScript devs we've said way more pretentious stuff in our time

  5. I'm bringing up Lal because it is a very important example of an all-in-one framework what do I mean by all-in-one well if we take a look the ecosystem you'll start to see what I mean and the fact that it takes a page scroll a three column structure to see all the options here showcases the level of stuff that exists here and if we just click the getting started and you see how many things are included there are

  6. Primitives for so many things in LL from setting up a mail server to managing notifications like push notifications websockets all of that stuff to having a live update layer which if I go back to the main page here as someone who has read through all of of the documentation for notifications document itself or just any of these services like mail anything like that are usually longer

  7. than some of the documentation on nextjs combined there it is Livewire the most productive way to build your next web app powerful Dynamic front UI without leaving PHP you're able to update the client as new data comes in or as a user clicks a button you can see the result come back in all coming from the server where your UI is being powered by the servers side code and is constantly interacting back and forth via something like a we socket these are all really cool things he probably just doesn't know but

  8. the it's not via a websocket you could have push your notifications within a live wire app which is laravel's version of a websocket but the uh live larl live wire is using Ajax so really is basically HTM X for laravel so it's sending you know HTML over the wire things and having one framework that includes all of this so you don't have to go find the right solution for your problem it's just there there's a lot of

  9. value to this and there's a reason people getting so hyped about lval and solutions like it there's a reason that we started in the same place with rails back in the day the reason and that's the exact reason why I made my very first video on this channel was why I choose larel because of that whole piece of I I I don't like having to search for things and I think that as we go along in this video that me and Theo probably

  10. agree a lot there that there are people even in the JS ecosystem who don't want to have to look and search for everything in a package they don't want to have to make those decision themselves there are people who like making those decisions and that's great then if you want to use laravel to have all that stuff on your back end you can still do everything that you want on the front end if you want and if you want to piece all your service together you can do that as long as we're building awesome things go for it is because when

  11. you went hunting for Solutions the ones you would find would often suck like suck really hard the alternative to the rail stack back in the day was the mean stack the mean stack was Express angular and node and of those four things I can definitively say at least two of them are a mistake if not three that's the problem though the alternative to rails which was an all-in-one solution that had recommendations for every problem you might have was a thing that was so

  12. insanely modular and the parts were not necessarily built to be very compatible with each other that we could glue them and it could work but it didn't always great and if one of those parts was hard to implement or build around and it turned out to not be a great part that sucked and it really was awful feeling like the solution you picked was wrong the new one that just came out was right and now you're behind you'd have to catch that thing up that doesn't really happen in these other ecosystems we don't see a bunch of stuff in larl where people adopted the wrong version and now

  13. they're miserable trying to upgrade or they picked the wrong thing to manage their off and now they're trapped in having a miserable time you what else doesn't really have that problem anymore react this is I understand what he's saying and I think that the difference within larl one and Lille in rails and Frameworks like that Phoenix for example they have the senority in the sense that they have

  14. been doing these same things so that they have garnished this stabilization and Trust from the community to say hey anything that you want to build within your application you can build it because we have a solution for that and the second second part is it's not just oh we have an opinion on a solution for that which is probably going to get to in a little bit with within T3 stack and even things like the Epic stack by KY dots those are great opinions but at the

  15. same time there's a difference between it being opinions of a collection of pieces that you say hey these all work well together pick and choose which parts you want but this is a great stack that works well together there's a difference between that and a stack that is first party maintained by a single team within rails within Phoenix within Lille it's all maintained by a single team so you don't have to worry oh is that going to be out of date then the

  16. maintainers aren't you know scrambling to figure out how it's going to work with that collaboration piece the good thing with the JS world is a lot of these people are still in solid collaboration with each other so even though it's not necessarily all maintained by the same team you do have teamwork in the sense that those pieces are still being collaborated together why we can go so much more modular now with so much less pain and that's the thesis of this video that

  17. we're about to dive deep on the reason we don't have a ll for JavaScript is because things are so much better without it to be clear we have tried there are lots of attempts to do an all-in-one framework for JS the ones that I have pulled up here are Blitz which if you're not familiar is very very similar to what I did with create T3 app and when I say I I mean my community because I didn't really build create T3 app create T3 app is a starting point that includes a bunch of our recommendations we don't really recommend Prisma anymore we really push for drizzle because it's a better

  18. experience overall and we learned and have moved on since trpc is a great way to do client server interactions but you can Al so like even even this I understand that you for 70% of applications and maybe even less the things that you're wanting to build within an application you're not necessarily needing things like cues or mailing or notifications or events all

  19. of those pieces when you actually have to say hey I am going to need something like that and then you're searching for it again it's not included in this framework it's not included in this collection you still have to find that yourself now the maintainers might have like opinions of okay maybe you'll use you know ingest for cues or maybe you'll use resend for email and that's great that's awesome but it's not the the

  20. connections the code the boiler plate put all that together is not maintained by the creators of this collection create T3 app in this example and even if they do have opinions they're not in charge of those connections though that code that boiler plate so it's still defaulting and pushing off where those pieces are cobbled together is it until you need it or is it just these this core Services also use server components now

  21. too tail and CSS is the best way to write CSS even like the rails and The Elixir communities now largely agree with that that thankfully next off is an open source authentication layer that you and Lille communities probably agreed with that for forever because Adam we came out of the larel community and Adam dodev Adam Elmore said in one of his videos about larel he said people don't even argue about Tailwind in Lille there's some people who do but people don't even argue because they just use it and that's it just comes out of the

  22. box with people who are starting a new lville app most of the time I don't know the exact percentage or exact number but most of the time they start with a opinionated starter kit and even if they don't the majority of packages are using taale one anyway so you might as well just use it can use if you don't want to use it there are also Services you can integrate here as well typescript because we don't think you should be ready vanilla JS anymore very rare that it makes sense for application code and next as the core piece we're building

  23. around Blitz was originally very similar the difference being Blitz has its own version of a lot of those things its own wrappers around those things and doesn't really give you a way to remove the ones you don't want or replace them with something else instead because it's meant to be a lot more like rails the creator of Blitz Brandon Bayer flyer on Twitter built Blitz because he missed the rails experience of just having a working solution for every problem you might run into the solution might not be perfect but it at least works and is there and he doesn't have to think about it sadly Blitz did not particularly take

  24. off okay this is the issue there's no create Blitz it's just the one Blitz thing so it's really hard to compare installs which is what I wanted to do but it is not trivial to do so so I won't do that I would be a weird dunk anyways Blitz is far from the only only one of these Solutions though there's also Adonis create with smoke backend applications in record time the types first framework for building web apps and API servers they're not as focused on the UI side but you can integrate UI stuff in it a lot of people always ask

  25. me about my thoughts on Adonis because I my thing I guess is the JS Lille guy the JS person and I like Adonis I never got into Adonis because I had already moved on to Lille when I started searching for that something else the one thing that I uh think that the maintainers are incredibly focused and they have something great going for them and I don't know what Theos point is that he's GNA try to make here but the one thing

  26. that I think Adonis has that is a negative for them in one sense is they're trying to be the laravel for JS and I don't think JS developers want that even the ones who are looking for something new they would rather move to Phoenix to rails to laravel instead of trying to find a piece that works and I think something just don't translate well so some things like the old version of how to do MVC which I think Adonis

  27. for the most part has adopted I think I saw someone who's trying to build a live wire type thing for Adonis which I think would be fantastic because then you could have rsc's within Adonis and still have all that background stuff working for you so I think that's a great move but the structure of of an application and even just the way that you write code and the MVC type framework St most JavaScript Developers who are living in next to yes who are living in remix

  28. don't want to move to something like that it seems like a a step back in a lot of ways this is much more focused on the server side making apis with the whole ecosystem of all the tools and parts and DBS and ORS and controller type things you might want or need and it looks and feels a lot like Ruby and rails so if that's what you're looking for you have the solution there and then there is redwood redwood is particularly fascinating they have some really cool stuff coming soon if you're not already familiar with redwood it is kind of an alternative to but it's much more

  29. focused on being batteries included having all the react conventions all the backin stuff a giant graphql server built into the framework with the ability to interface between client and server storybook built in as well which God I really hope they delete at some point because the story would is rough it's an interesting option that has also historically found issue finding a customer base and getting adopted to this day I don't know anybody who's actually shipping Redwood that isn't part of the Redwood team which is sad cuz it seems like a really good solution

  30. I've had great conversations with them it's really interesting stuff but nobody seems to care they're actually coming out now moving to server components and moving off of graphql which is awesome especially if they have a good migration story but despite existing having all these Solutions and being the rails for JavaScript which as we've established here we have three options and arguably cre3 app is a fourth option but we're more modular our goal is to give you the parts and let you opt in and out these Solutions did not take off and even create T3 app barely did especially when

  31. you compare it to things like just vanilla xjs with typescript there's a reason for that though the reason is because it's so much easier to take pieces in and out in this ecosystem when it was hard to I I think there's also some other options so one of one of the ones that probably excites me the most and I think remix with their Stacks has the ability to do this to become this probably even more so than the T3 stack

  32. because remix has a little bit more opinions as well as how they are web first in terms of remix standards work besides nextjs the other ones that I have become familiar with I think are interesting to check out is wasp Ling rails like framework for react no JS and Prisma again they are gluing all these pieces

  33. together but they do have more opinions on everything about oth and email and testing as well as websockets and stuff like that so I think that they are also in a great place to do that I think Redwood is the only one that has opinions about yeah they have mailer notifications okay so it seems like they do have a a decent amount of things out

  34. of the box when it comes to all of those pieces put together but it it's still it's still a lot that they lacking and I think to Theo's point it's that Frameworks like laravel Frameworks like rails Frameworks even like Phoenix for example still have five plus years on them in the case of Phoenix the case of rails and larl nine almost 10 plus years already in advance so maybe in

  35. five plus years it's going to look a lot different for the nextjs and the remixes and the JS communities but I think it's also going to look a lot different for the Lille type communities as well to adopt a solution and it was even harder to identify a good solution and the Absolut worst part when most of the solutions sucked having an all-in-one that was guaranteed to be good enough was a fantastic thing especially when you look at those other languages and realize how hard it is to make packages or framework like things there's a common saying in

  36. the react World now which is that if you're not using a framework you're building one and on one hand this is meant to be a dunk on the people who say I don't need next or remix or any of those things I can do it myself but the more important undertone here is that effectively any appdev can build the exact framework they need with the parts they do and don't want JavaScript has a bunch of massive advantages here it's way easier to swap these pieces in and out and compose them and the ecosystem around everything from npm to react components to hooks to all the stuff that we adopt and use in these

  37. infrastructures and servers and applications it's all much easier to compose change swap in swap out rewrite and do what you want with and over time those pieces have gotten really really good that's the magic that makes JavaScript so special and that's the reason we'll probably never see one of these rails or laravel like things succeed in the JS ecosystem because it's an E I I'm trying to think of the best way

  38. way to to put this but I think that the benefit that Theo is talking about here for the JS ecosystem is that it's so modular it's so flexible to build that you are basically have this creative freedom creativity and this freedom to say hey I don't have an opinion on how I should do this notifications events cues mailing

  39. whatever you want so I'm going to take this package and make my own uh make my own standard and make my own library for this and that could be a great selling point for developers I I think that there's a lot of developers who probably have just learned because that's what they they've learn to expect from that standard from that ecosystem from that

  40. Community I think in a lot of ways the JavaScript ecosystem the JavaScript Community has become addicted to building almost like setting up your code editor and I don't mean this in a very harsh or very negative way at all because I think the JavaScript community and the Lille shouldn't be at war with each other they should be connected just like Taylor and Ryan kind of talked about on their podcast is you can have

  41. nextra as on the front end and lville backend to help with all of those opinions those mailers notifications events all that stuff or you could just use inertia like the Tailwind UI folks and have react on your front and and then just handle all of your your structure and your data logic and your database and events and mailing and cues and everything on the back end that you need and just serve up views with react on the front end so I don't think it's

  42. Us Versus Them thing like many people before may have said in terms of Aaron Francis or Taylor but that mindset of wanting to have that flexibility to build the packages that you want almost has this connotation of I want to set everything up I I want to build all of this stuff so that I can finally get to start building and if that's what you want to do great go for

  43. it be be able to put all of your pieces together build your Linux be dhh for a week and and start building out your Linux machine and say hey this is exactly what I want it to be within my react ecosystem this is my react framework and now I can build with it but I think that's where Lille becomes exciting even as a back end or even with react for most JavaScript folks who are tired of having to set up their Linux set up their code editor set up their

  44. log in the sense that it's never going to be finished so why not just start with a finished product already ecosystem where we have infinitely more people making awesome new solutions that improve on certain problems that the existing Solutions didn't not happy with Prisma well there's three guys in the Ukraine making drizzle which is way faster way smaller generally easier to work with and has a lot fewer of those quirks don't like next we got waku and remix pushing the

  45. boundaries of what you can do with react don't like react well we got solid and spelt as phenomenal solutions for you to adopt as well this is the magic of JavaScript not a flaw in the idea that JavaScript is somehow fundamentally worse because we don't have a laravel is so confusing to me because we have three and no other language has so many great full stack all-in-one Solutions much less so many great pieces that we can compose and Assemble to our own best

  46. solution these are the yes I think that is the that's the point you have this flexibility within the JavaScript land to say okay if you don't like this then you can choose something else and I think that a lot of people might see that as a negative connation for something like Lille or rails for example where you might say you only have one off solution you only have one Q solution you only have one database solution and if that's the mindset that you want to go in as a

  47. developer of saying hey I like my options then I think that that's great you don't have to use laravel in that sense or maybe you want to just use larel for One Piece maybe you just want to use larel for your cues or your jobs or something like that but I think there are a lot of people who are tired of having to choose yet another piece or have to have an opinion they're like I just someone make my choices for me I don't want to have to make choices

  48. anymore and with that you can use what you're comfortable with react felt view on the front end and then just have a battle tested batteries included framework on the back end strengths it would be great to have solid on the front end with Lille I actually saw someone's trying that out with inertia that would be I love solid so I think that would be a great next step of JavaScript it might suck a

  49. little bit that if you're learning the language and you look and there's 15 different options for one of the problems that you have and you're used to rails where there's only one it might feel a little bad to have to pick a solution because you're worried about picking wrong the reality nowadays is that it's hard to pick wrong if it's one of the solutions that's being recommended online and the doc that you're reading is less than 5 years old you're probably going to be okay you could start a react app today using Create react app and I might make some jokes on Twitter but it's a fine solution and if you realize it wasn't

  50. and you actually want to move to some other solution because I don't know you want to render the pages on the server or you saw these server component things and you were excited you can go make a new project using those Solutions copy paste components over and they'll probably work the way that JavaScript works is so much more accessible composable and flexible that the desire for these Frameworks just isn't there and if you're in the ecosystem for a long time you quickly realize you don't want that because you'll build a gut feel for the solutions that make sense for you and you can just keep using

  51. those instead as much as I love the new nexj server component stuff create T3 app still by default recommends the way that we did it 3 years ago which was render with Pages router a quick template on the server side and then the client side take over with trpc because that was one of the best ways to build really client Dynamic Heavy applications like what we built with ping we have not moved ping over because it's still a really good solution for that problem but if we wanted to we can and that's the magic sorry for the outfit change I realized I missed a point that I really

  52. care about with this discussion and I wanted to take some time to talk about it the idea that any one of these pieces that yes get swapped around a lot improved changed rebuilt constantly has an interesting side effect that people are reasonably concerned about that side effect is startups forming around these pieces in the larvel community the idea of an O company sounds funny because O is just a part of your framework but in the Javas and I think that's where the disconnect happens just like I've been

  53. saying before again this isn't a US versus them just like other people have said Aaron Francis made a whole entire video about it's not you know react versus Lille because larel team used his react and that's not what the the the the the actual argument is do you need more than just the core services that you might use with an

  54. application do you need opinions about that do you need actual first-party packages with the rest of your core services so if you're using a nextjs should nextjs have an opinion on how it does q's and how it does databases and how it does orms and all of that stuff and should that be maintained by the nextjs team well Lille already does that Lille has all their first party packages and they have control over all the pieces so if it doesn't necessarily work you don't

  55. have to say oh I'm going to strip that out and try something new it just works and so when it comes to having all of these choices within the JS ecosystem that's great but it depends on what you're wanting to do with it if you are a team that you're like hey we can decide we already have this application but now we want to make sure that this is specific and scalable for this particular p piece of our application or our product then that sounds great you can just pick and choose whatever you

  56. want in the jlc system but why force people to have to make that decision from the get-go script Community there are startups that do just that I think this is awesome because we have the options in JavaScript because some things make a lot of sense to just have a package for and O is one of those we have great options like OJs and Luchia to self-host open source authentication but when you realize a lot of the intricacies of off that suck like the compliance the creation of jws and

  57. dealing with those all of the weird Integrations at every level you might have to build to make this stuff work in the first place compliance with all the crazy things that big businesses expect getting all of that right sucks hard enough that a company can show up and do it and clerks or a first- party maintained uh package in a framework like uh authentication and social light for any kind of like social drivers not the first one they're one of many and if you look at other ones like off zero

  58. they were largely built around the rails community so this isn't a new thing so I'm really frustrated people seem to think it is that javascripts just forced everyone to go to Services no this has always been a thing more importantly the ability for anyone to build both a service for a thing as well as an open source alternative is better than it's ever been for every one of these big companies that's solving this problem there are five open source Alternatives made by developers just like us that you can contribute to yourself adopt do whatever you want to and if you don't

  59. like what they're doing you can Fork it and put it in yourself this is just not the case in these other ecosystems where all the tools are made by the same core team is a win it's not a negative the fact that JavaScript is the best place for these startups to start is not a failure of JavaScript it's again one of the strengths of it it's much harder for a company to take a vertical in their stack and turn that into a business if the vertical is something that's built into rails or LEL if they're in an ecosystem where every piece can be treated in this modular way one of those

  60. pieces could become a business if it's what makes sense for that piece there is no other ecosystem where this is the case and I don't get away people treat this like a negative I know a lot of devs that are more than happy still shipping react 16 barely even using Hooks and that's awesome because if that's what you're into and you like the solution you have you don't have to keep up and the fact that we have things going on constantly that's not a negative and I really am confused on like a deep level as to why people look at the JavaScript ecosystem see that

  61. there isn't a popular alternative to laravel and somehow blame us and say that javascript's worse for it it's not it's actually the magic of JavaScript and it's the reason I will keep betting on it forever long live JS and God bless the maintainers who made this ecosystem the best one in all of software it's a shame other communities look at it and think the good is bad because the good is unrivaled in any other space let me know in the comments why I'm wrong about PHP because I know you

  62. guys love to do that and until next time peace nerds so first off if anyone is frustrated or continuing to have this idea that it is Javascript versus lville I think that is not even close to where the argument lies and I think the argument and the frustration and internal struggle if you will is not with hey the JavaScript ecosystem doesn't have this it's with how are you

  63. wanting to start making an application how are you wanting to have this idea set in your mind and are you wanting to say hey I want to choose every single piece of my product and make sure it works the way I want it to work or are you wanting to just get up and running at the end of the day if you're both if both sides of those coins of both sets of people who like the customization and the I own everything piece and I have built this from the

  64. ground up piece if you're that kind of person but you're still shipping amazing products then great go for it within the lville ecosystem most people say hey all of this is out of the gate so now I can take my idea and I can just run with it and I think those two types of people in in their minds and of course there are are amazing people within the Lille ecosystem who are testing the limits and creating new options there are options within the laral ecosystem even outside

  65. of the first Party core maintained Livewire for example was not a first-party offering and it still kind of isn't it's it's maintained in a lot of ways by the core team but even inertia is was not for the longest time a first party maintained system all these things have kind of been explored and expanded in Lille ecosystem and then slowly piece by piece been brought in to the core services at the end of the day it's taking the application that you

  66. want to build building it as quickly as possible and then shipping it to your users and if you can do that and want to do that and choose your own packages within the JavaScript ecosystem then go for it great but if you kind of want to have a options those options given to you that's why full stack Frameworks include batteries included Frameworks and even things like remix Stacks in the create T3 app that's why they exist because they take all those bits and pieces and yes I think that within the

  67. JavaScript ecosystem at least for the moment right now you still are going to have to reach for other services you're still going to have to have your own opinions but if you don't want to have your own opinions and you want to kind of say hey here's how to do it take it and run build your app then lille's waiting

just you here