YouTubevideo· May 28, 2024· 29:48

Laravel is the Laravel for JS

Watch on YouTube ↗

transcript

64 moments
  1. Então, o Laravel parece estar recebendo muita atenção ultimamente. Seja um vídeo de Aaron Francis ou Taylor postando sobre uma lista de tarefas no Twitter e depois se juntando a Dex, Adam e Rian para falar sobre Remix e Laravel ou Tel postando um vídeo sobre Laravel e JS e todo o ecossistema. I'm going to look at the video, but I want to look at it more deep, grab it and give my opinion on why there's not a structure JS in Laravel.

  2. If you wrote a code in some time, you probably were close to the era Rails when, suddenly, do nothing, we had a way to create apps with this new and strange language Ruby that allowed us to have a client and a client together in a way that would make sense. You would write a model, would be able to do your data using the model, the visualization, the paradigm of the control and would be able to do the visual and the model what you wanted to do with the user. And this is a magic pattern that is how many of the apps that we know and we are created and how many of them are created today. Services like GitHub still are almost completely moved by Rails.

  3. They moved a lot of customers to things like React. But the infrastructure in general is built in terms of the patterns that Rails was one of the first things to invent in the era OG Ruby. The objective of this video is not to talk a lot about Ruby or Laravel or all these other solutions. And Laravel in the title is Laravel. It's funny, Taylor, in fact, in his podcast with Adam, Ryan and Dex said that many people pronounce wrong and he really doesn't care.

  4. But he said that he pronounced Laravel, but we will not be guilty for it. I have a purpose here because Laravel is an incredible structure and I don't want to be here and fingir that it is. It's a PHP structure for artisans that web, which is a little pretentious. Look, we agree with something. So, he says that Laravel is an excellent structure. He doesn't want to say that he is. But we are realists, we are a lot of developers of JavaScript. We have talked about things much more pretentious in our time. I'm mentioning Laravel because he is a very important example of a complete structure.

  5. What do I want to say with everything in 1? Well, if we look at the ecosystem, you will start to understand what I want to say. And the fact that you need to roll a page in a structure of 3 columns to see all the options here shows the level of things that exist here. And if we click on Introduction, you will see how many things are included. There are many things in Laravel, from configure email to email notifications, notifications, websockets, all these things,

  6. until you have a live streamer, which if you go back to the main page here, as someone who reads all the documentation of notifications, or just any of these services, email, whatever such thing, generally are longer than part of the document. Next, JSJS combined. Here is Livewire. The way to create your next app. Interface of user front-end dynamic and powerful without leaving the PHP. You can update the client when the data come or when a user clicks on a button.

  7. You can see the result return, everything from the server, where your user is being alimentated by the code side of the server and constantly interacting from one side to the other by the way of something like a web socket. He probably doesn't know, but it's not through a web socket. You can send notifications to a livewire app, which is the version of Laravel of a web socket, but the livewire of Laravel uses Ajax. So, in fact, it's basically HTML for Laravel.

  8. So, he's sending HTML things to the network and having a structure that includes everything. and everything. So, you don't need to find the right solution for your problem. It's just there. There's a lot of value in this and there's a reason why people are so entusiasmated with Laravel and solutions like him. There's a reason why we started the same place with the Rails. The reason, and it's exactly the reason why I made my first video on this channel,

  9. was because I chose Laravel because of all this part of that I don't like to have And I think, as we move forward in this video, I and Theo probably agree with that there are people, even in the ecosystem JS, that don't want to have to search and research everything in a package. They don't want to have to take these decisions so they can. There are people who like to take these decisions and that's great.

  10. So, if you want to use Laravel to have all these things in your back-end, you can do everything you want to do in front-end, if you want. And if you want to reunify all your services, you can do it. Now that we are building incredible things, go ahead. Because when you were looking for solutions, they were usually bad, bad. The alternative to Stack Rails was the Minstack. The Minstack was Mongo, Express, Angular and Node.

  11. And these four things, I can say that at least two of them are a mistake, if not three. This is the problem, however. The alternative to Rails, which was a complete solution with recommendations for all problems that you could have, It was something so insanely modular and the parts were not necessarily built to be very compatible between them, to be able to be able to work and work. But it never always worked well. And if one of these parts were difficult to implement or build, and it was not a good part, it was bad. And it was really horrible to feel that the choice was wrong.

  12. The new one that just left was correct. And now you're back and you're back to recover the last. This really doesn't happen in these other systems. We don't see many things in Laravel in which people adopted the wrong version and now are happy and now are trying to actualize or choose a wrong thing to do and now are preses and having a bad moment. You know what else has this problem? React. That's it. I understand what he is saying.

  13. And I think the difference between Laravel 1 and Laravel e Rails and frameworks like this, Phoenix, For example, they have seniority in the sense that they have done these same things. So they have acquired this stabilisation and confidence in the community to say Hey, anything you want to build within your app, you can build because we have a solution for it.

  14. And the second part is that it is not just, oh, we have an opinion about a solution for it. which will probably get a little bit into the T3 and even things like the Epic of Ken Seedodd. These are great opinions, but at the same time, there is a difference between opinions on a collection of pieces that you say, hey, all of them work well together, choose which parts you want, but this is a great deal that works well together." There is a difference between this and a pilha that is maintained internally

  15. by a single team within the Hales, within Phoenix, within Laravel. Everything is maintained by a single team. So you don't need to worry about it. Ah, it's going to be a bit of a new team? So the stakeholders don't keep working on this part of collaboration. The good thing about the world JS is that many of these people still are in collaboration solid with the others. So, even if it's not necessarily all maintained by the same team, you have a team in the

  16. sense that these parts still are being collaborated together. Why can we become much more modular now with much less difficulty? And this is the video that we are prepared to discuss. The reason why we don't have a Laravel for JavaScript is because things are very good without it. To make clear, we tried. There are many attempts to make a complete structure for JS. The Blitz, which, if you don't know, is very, very similar to what I did with the Create T3 app.

  17. And when I say I, I say my community, because I really didn't create a T3 app. The app Create T3 is a point that includes several of our recommendations. We don't recommend the Prisma. We really encourage the Drizzle because it's a better experience in general, and we learn and we're going forward to it. The TRPC is a great way to make interactions client-servidor. We can do this, like, even this. I understand that, for 70% of the apps, and maybe even less, the things you want to create in an app,

  18. They don't need to be things like emails, notifications or events. All these pieces, when you really need to say, Hey, I need something like this. And then you are looking for it. So, again, you are not included in this structure. You are not included in this collection. You still need to discover this alone. Now, the stakeholders can have opinions like, OK, maybe you use, you know,

  19. in Gestão para Sugestões ou talvez você use Reenvio para e-mail e isso é ótimo. Isso é incrível! Mas não são as conexões, o código, o modelo para colocar tudo isso junto que não é mantido pelos criadores desta coleção, crie o aplicativo T3 neste exemplo. E mesmo que eles tenham opiniões, eles não são responsáveis por essas conexões, esse código, esse modelo. Então, ainda está sendo padronizado e empurrado para onde essas peças são remendadas.

  20. It's just that you need to be just these main services. Also, use the server components now. Tailwind CSS is the best way to write CSS. Even the communities Rails and Elixir now agree with this, unfortunately. The next step is a authentication code with which you can talk. And the community Laravel probably agree with this a long time. Because Adam Wen saiu from Laravel and Adam.dev Adam Elmore said in one of his videos about Laravel that people don't discuss about Tailwind in Laravel.

  21. Some people discut, but they just use it. And it's what comes ready for use with people who are starting a new Laravel app. Most of the time, I don't know the exact percentage or the exact number, but most of the time, they start with a initial or open-in-it-it and, even if they don't do it, most of the package already uses Tailwind, so it's better you use it. You can use it. If you don't want to use it, there are services that you can integrate here. TypeScript, because we think you don't have to write vanilla. It's very rare that it makes sense for the code of the app.

  22. and the next as a central piece in which we are building. The Blitz was very similar at the beginning, the difference is that he has his own version of many of these things, his own rappers for them, and he does not offer a way to remove them as you don't want or substitute them for something else, because he was made to be much more similar to the Hales. The creator of Blitz, Brandon Bayer, Flybearer, on Twitter, created the Blitz because he felt the lack of experience of the Hales to have a functional solution for every problem you could face. The solution can't be perfect, but at least it works and he doesn't need to think about it.

  23. Unfortunately, the Blitz didn't go too much. Ok, this is the problem. There is no way to create Blitz. It's just something about Blitz. So, it's very difficult to compare installations, which is what I wanted to do, but it's not trivial to do that. So, I would not do that. It would be a strange game. In any way, Blitz is not the only one of these solutions. There is also the Addonis, which creates personalized personalized time record, the first type script to create apps and servers of app. They are not so focused on the interface of the user, but you can integrate things from the user interface.

  24. Many people always ask me what I think about Adonis because I think my lance is the guy of JS Dervo, apart JSO, and I like Adonis. I never interested in Adonis because I had migrated to Laravel when I started looking for something else. I think that the mantenedors are incredibly focused and have something great to their favor, and I don't know what the point is that Theo says here.

  25. But one thing I think that Adonis has and that is negative for them in a certain sense is that they are trying to be Laravel for JS. And I don't think that the developers of JS that do that. Even those who are looking for something new prefer to Phoenix, Hales or Laravel instead of trying to find something that works. And I think that some things simply don't translate well.

  26. So, some things like the old version of how to do MVC, which I think the Adonis adopted in great part. I think someone was trying to build something like Livewire for Adonis, which I think would be fantastic because then you could have RSCS in the Adonis and still have all these things in second-planning working for you. So, I think it's a great job. But the structure of an app and even the way you write the code and the things

  27. framework do tipo MVC, a maioria dos desenvolvedores JavaScript que vivem no NEX, JSI no Remix não querem migrar para algo assim. Parece um retrocesso em muitos aspectos. Isso é muito mais focado no lado do servidor, criando apps com um ecossistema completo de todas as ferramentas, partes, bancos de dados, OMS e coisas do tipo controlador que você pode querer ou precisar. E parece e funciona muito como Ruby e Rails. Então, se é isso que você está procurando, você tem a solução aqui. The connection to Redwood is particularly fascinating.

  28. They have some very cool things coming soon. If you still don't know what Redwood is a alternative to Next, but it's much more focused in having batteries included, having all the React conveniences, all the back-end, a great-end server, a great-end server with the capacity of interface between client and server. Storybook also. I really hope they exclude them in some moment because the story is difficult. It's an interesting option that also historically found problems for finding a base of clients be adopted. Until now, I don't know anyone who is really launching Redwood and not part of the team

  29. Redwood, which is sad because it seems a good solution. I had a great conversation with them. It's something really interesting, but no one seems to be worried. In fact, they are migrating to the server and they are running from GraphQL, which is incredible, especially if they have a good migration story. But, despite these solutions, they are all the rails for JavaScript, as we have established here, we have three options. And, without a doubt, the app CRT3 is a fourth option, but we are more modular. Our goal is to give you parts and allow you to enter and enter.

  30. These solutions didn't go and even create a D3 app. It's not that you compare things like Nex, JS Puro with TypeScript. There's a reason for this. The reason is because it's much easier to insert and remove pieces in this ecosystem when it was difficult. I think there's also some other options. So, one of those that probably most entusiasme, and I think that the Remix with your pilhas has the ability to do this,

  31. of the way to become this, probably even more than the T3 stack, because the Remix has a little more opinion, as well as how they are web-first in terms of work patterns of Remix and Nex.js. The others with which I'm familiar with and I think that are interesting to see are the Vasp Lang Rails, as framework for React, Node, JS and Prisma.

  32. Novamente, eles estão juntando todas essas peças, mas tem mais opiniões sobre tudo sobre o e-mail e testes, bem como WebSockets e coisas assim. Então, acho que eles também estão em uma ótima posição para fazer isso. Acho que o Redwood é o único que tem opiniões sobre sim, eles têm notificações de e-mail.

  33. Ok, então parece que eles têm uma quantidade razoável de coisas prontas para uso quando se trata de todas essas peças reunidas, mas ainda... Falta muito. E eu acho que, em relação ao ponto do TEL, frameworks como Laravel, frameworks como Rails, frameworks até mesmo como Phoenix, por exemplo, ainda têm mais de 5 anos.

  34. In the case of Phoenix, Hales and Laravel, 9, almost 10 years of antecedence. So, maybe in more than 5 years, things will look very different for Next, JS, Remix and the communities JS. But I think it will also look very different for the communities of Laravel. Adopt them a solution. And it was even harder to identify a good solution in the worst part, when the majority of solutions were bad. To have a guarantee of being good enough was fantastic.

  35. especially when you look for these other languages and see how difficult it is to make packages or things like frameworks. There is a common word in the world React now that says that if you don't use a framework, you are building a framework. And, on the other hand, this has the objective of being a direct to people who say, not need to do next, remix or anything like that. I myself can do this. But the most important thing here is that, effectively, any developer of the app can create the exact structure of the needs with the parts that want or not. The JavaScript has many advantages here. It's a lot easier to change these pieces and compose them.

  36. and the ecosystem in turn of everything, from the NPM to the React components, passing by hooks and all the things we use and use in these infrastructure, servers and apps. It's all very easy to make, change, change, and do what you want. And, with the time, these pieces became very, very good. This is the magic that makes JavaScript so special, and it's the reason why we probably never will see one of these things like Rails or Laravel success in the ecosystem JS because it's a ecosystem.

  37. I'm trying to think about the best way to say this, but I think that the benefit that Theo is mentioning here for the JS ecosystem is that it is so modular, so flexible to build, that you basically have this creative freedom and this freedom to say, hey, I don't have a opinion on how I do this. notifications, events,

  38. emails, emails, what you want, so I'll pick this package and make my own I'll create my own own and create my own own library for this. And this can be a great argument for developers. I think many developers probably learned because it's what they learned to expect that that pattern, that ecosystem of that community.

  39. I think, in many ways, the ecosystem JavaScript, the community JavaScript, turned to be a bit more than a building, almost like a configuration editor of code. And I don't say this in a very hard way or negative, because I think that the community JavaScript and Laravel should not be in war with each other. They should be connected, like Taylor and Ryan said in their podcast, or, you can have

  40. Next, JS no front-end e o Lara Vevel no back-end para ajudar com todas essas opiniões, esses e-mails, notificações, eventos e todas essas coisas. Ou você pode usar o Inertia como o pessoal da Tailwind UI e ter o React no front-end e, então, lidar com toda a sua estrutura, lógica de dados, banco de dados, eventos, e-mails, sugestões e tudo o que você precisa no back-end, e apenas fornecer visualizações com o React no front-end.

  41. So, I don't think it's a matter of us against them, as many people before me said in terms of Francis or Taylor. But this mentality of wanting to have this flexibility to create the packages that you want almost has this connotation of I want to configure everything. I want to create all these things so that I can finally start creating. And if you want to do it, great. Go ahead.

  42. in the sense that it never will be ready. So, why not start with a ready product? Ecosystem where we have infinitely more people creating new solutions that improve certain problems that the solutions exist not could be. Not satisfied with Prisma? Well, there are three cars in Ukraine creating the Drizzle, which is much faster, much less, generally easier to work and has much less peculiarities. Not like Next? We have the Vacuum and Remix expand the limits of what you can do with React.

  43. You like React? We have Solid and Split as great solutions for you to use. This is the magic of JavaScript, not a failure. And the idea that JavaScript is fundamentally worse because we don't have a Laravel is very confusing for me because we have three and any other language has so many complete solutions. Many less so many excellent pieces that we can build and build in our best solution. These are the... Yes, I think that's the point.

  44. You have this flexibility in the world of JavaScript to say, ok, if you don't like that, then you can choose something else. And I think many people can see this as a negative connotation for something like Laravel or Rails, for example, where you can say that you have only a solution off. You have only a solution Q, you have only a solution of data data. And if this is the mentality you want to have as a developer saying, hey, I like my options. So I think this is great. You don't need to use Laravel in this sense.

  45. Or maybe you want to use Laravel just for one part. Maybe you want to use Laravel just for your ideas or your work or something like that. But I think that many people are tired of having to choose one part or have a opinion. They think, I just do my choices for me. I don't want to do more. And with that, you can use the best for you.

  46. React Splat View no front-end e, em seguida, ter apenas uma estrutura testada em batalha com baterias incluídas no back-end. Pontos fortes. Seria ótimo ter o Solid no front-end com o Laravel. Na verdade, vi alguém tentando isso com o Inertia. Eu adoro o Solid. Então, acho que seria um ótimo próximo passo do JavaScript. It's a little weird if you're learning a language and look and see that there are 15 different options for one of your problems and you're used to be used to have a problem.

  47. You can start a little bit of a solution using Create React App. I can't do it on Twitter, but it's a good solution. And if you realize that it wasn't and really wants to migrate to another solution because, you know, you want to render the pages on the server or you can see these things

  48. of components of the server and you can be excited, you can create a new project using these solutions, copy and paste your components, and they will probably work. The way JavaScript works is much more accessible, combinable and flexible, so the desire for these structures simply doesn't exist. And if you are in the ecosystem for a long time, you will quickly see that you don't want this because it will create a intuition for you and will continue using them. For more that I am the new Next, JS, a component of the server, the app Create T3 recommends,

  49. as well as we have 3 years ago, which was to render with a page, a quick version of the side of the server, and then let the client take the control with the TRPC, because this was one of the best ways to create apps really hard and hard for the client, like the one we created with Ping. We don't move the Ping because he is still a good solution for this problem, but if we could, we could. And this is the magic. Sorry for the change of the hair. I realized that I lost a point that really matters in this discussion and I wanted to take a time to talk about this.

  50. The idea that any of these pieces that are trocadas very, better, alteradas and reconstructed constantly has a very interesting effect on the people who are concerned about this. This effect is the formation of startups around these pieces. In the community Laravel, the idea of a company seems to be a bit more than a part or framework. But in JavaScript... And I think that's where the disconnect is. As I said before, this is not a we against them.

  51. As some other people said, Aaron Francis made a whole video about this, not it? You know, React vs Laravel because the team uses React and this is not the... Argument real. You need more than just the main services you can use with an app? You need to opinion about this? You need to have a primary opinion with the rest of your

  52. main services? So, if you are using a Next, JS, Next Next, JS has a opinion on how he makes suggestions, how he makes data data and how he makes OMS and all these things and this should be maintained by the team of Next, JS. Well, the Laravel has this. The Laravel has all his primary packages and they have control about all the pieces. So, if it doesn't work necessarily, you don't need to say, ah, I remove this and try something new. It just works.

  53. And then, when it comes to all these options in the JS ecosystem, it's great. But it depends on what you want to do with it. If you think, hey, we can decide that we already have this app, but now we want to have a specific and scalable part of our product or product. So, it looks great. You can simply choose what you want in the JS ecosystem. But why force people to take this decision right now?

  54. In the community of scripts, there are startups that do exactly this. I think this is incredible because we have options in JavaScript. Because some things make sense to have just a package for them, and the O is one of them. We have great options like OfficeJS and Luxia for autohospedal authentication of code. But when you see many of the complexities of Office that are bad, like conformity, the creation of JWTS and all these weird things in all levels, You can create to make things work in first place, in conformity with all the crazy things that big companies expect.

  55. To do this right is so bad that a company can appear and do it. And Funcionários? Or a package maintained by the first part in a structure like Authentication and Social Social for any type of social driver. Not the first. They are one of many. And if you look for others like Off Zero, they were built in the community of Rails. So, this is not a novelty. I'm really frustrated because people seem to think that JavaScript forced everyone to go to go to the services. No, this was always something.

  56. The most important thing is that any one can create a service for something and also a alternative to open code is better than ever. For each of these big companies that are solving this problem, there are five alternatives to open code created by developers like us, which you can contribute, do not, do what you want and, if you don't like it, you can do it and install yourself. This doesn't happen in these other ecosystems, where all the tools are created by the same a team principal. This is a victory. It's not a negative. The fact that the JavaScript is the best place for these startups to start not is a failure of JavaScript.

  57. It's, again once, one of its strong points. It's much more difficult for a company to pick up vertical in your stack and transform it into a business if a vertical is something that is integrated to Hayles or Laravel. If they are in a ecosystem in which each part can be treated like this way, one of these parts can become a business if it makes sense for it. There is no other ecosystem in which this happens. And I don't understand why people treat this as negative. I know many developers who are more than happy to be able to launch React 16, using Rux.

  58. And this is incredible because if you like and like the solution that you have, you don't need to worry. And the fact that we have things happening constantly is not a negative. And I really am confused in a deep level about why people look for the ecosystem JavaScript, see that there is no alternative popular to Laravel e, in some way, they say that JavaScript is worse for it. Not it. In fact, it's the magic of JavaScript and it's the reason why I'm going to be apostating nele para sempre. Vida longa ao JS e que Deus abençoe os mantenedores que fizeram deste ecossistema o melhor de

  59. todos os softwares. É uma pena que outras comunidades olhem para ele e pensem que o bom é ruim, porque o bom é inigualável em qualquer outro espaço. Deixe-me saber nos comentários por que estou errado sobre o PHP, porque sei que vocês adoram fazer isso. E até a próxima, Nerds da Paz. Então, antes de mais nada, se alguém está frustrado ou continua tendo essa ideia de that is JavaScript versus Laravel, I think that this is not even close to where is the argument. And I think that the argument, the frustration and the internal struggle, if you prefer,

  60. is not about, hey, the ecosystem JavaScript doesn't have this. Is about how you want to start a app? How you want to have this idea defined in your mind? And you want to say, hey, I want to You can choose every part of my product and guarantee it works the way I want, or you just want to start working.

  61. If you are both sides of the coin, if both people like personalization and part, I am the owner of everything, and I built this from zero. If you are this type of person, but still is offering amazing products, then great. Go ahead. No ecosystem Laravel, a majority of people say, hey, everything is ready. So now I can take my idea and put it in practice. And I think these two types of people are in their minds.

  62. And of course, there are incredible people in Laravel that are testing the limits and creating new options. There are options within Laravel, even outside the primary network. The Livewire, for example, is not a primary offer and still not. It is maintained in various ways by the main team, but even the inertia was not a long time a system maintained by third-party.

  63. All these things were explored and expanded in the ecosystem Laravel e, so, slowly, piece by piece, were brought to the main services. In the end, you can pick the app that you want to build it the most quickly and, in seguida, send it to your users. And if you can do it and want to do it and choose your own package within the ecosystem JavaScript, so go ahead. Great! But if you kind of want to have these options, it's why the whole system is included in

  64. the batteries included and even things like the remix and the creation of apps T3, it's why they exist because they take all these pieces. And yes, I think that within the ecosystem JavaScript, at least for now, you will still have to find other services. You will still have to have your own opinions. But if you don't want to have your own opinions and say, hey, here is how to do, pick and execute, create your app, then Laravel is waiting.

just you here