Write Laravel, not PHP (feat. Aaron Francis) | 029

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • Lane and Aaron Francis sit down to talk about Laravel and PHP, and why everyone who uses them tends to make a lot of money. There seems to be something to avoiding the technical hype cycle and just shipping web apps that people want to use.
    Learn back-end development - boot.dev
    Listen on your favorite podcast player: www.backendban...
    Aaron Francis' Twitter: / aarondfrancis
    Aaron Francis' UA-cam: / @aarondfrancis
    Aaron Francis' SQL Course: planetscale.co...
    Learn to make Screencasts: Screencasting.com
    Like & subscribe for the algo if you enjoyed the video!

КОМЕНТАРІ • 83

  • @poggybitz513
    @poggybitz513 8 місяців тому +27

    "Telling a fish water is weird" lmao. Aaron is super funny and very articulate. Thank you Lane for this amazing podcast.

  •  9 місяців тому +20

    I'm in favor of static-typed languages like Go and Rust.
    However, I can say that I appreciate languages like PHP for writing scripts or some particular HTTP tasks for example instead of Javascript.
    The reason is that writing PHP code (v8) feels to me more succinct than writing plain JS or indentation-based languages like Python or Ruby.
    That is because PHP has improved a lot its syntax, performance and added support for strict typing. Francis has a nice video about PHP's built-in features enums, pattern matching, closures, etc.
    Although PHP is single-threaded, if you want to do multi-thread PHP stuff, you have C extensions like Swoole.
    Or if you are worried about performance, the compiler team is working to get a new JIT for PHP to optimize it even better in the future.
    So IMO PHP is fairly decent at this point, so why not give a try?

  • @MrHopp24
    @MrHopp24 10 місяців тому +18

    Just downloaded Herd on Mac and got an app up and running in 10 minutes. Excited to build something with Laravel. Awesome episode!

  • @overholted
    @overholted 7 місяців тому +18

    I'm thankful for the lack of "side quests" in PHP. JS is a nightmare to wade through right now as a beginner. For me, it's an easy choice. Laravel and Vue.

    • @berserkerrxii5776
      @berserkerrxii5776 29 днів тому +2

      you can't say JS is a nightmare then use JS framework hahaha

    • @prodfragment
      @prodfragment 22 дні тому

      @@berserkerrxii5776 fr LOL

  • @LukasRotermund
    @LukasRotermund 4 місяці тому +8

    37:51 I would disagree in the sense that I use Golang not because I want to be able to handle 100,000 requests per second, which would be cool, but rather to drastically reduce CPU time and memory usage. After all, CPU time and memory are exactly what I end up paying for with cloud computing. And when Laravel advertises Severless for performance, just like JS/Node, I find that a bit dubious, because it ends up costing quite a bit when the credits are used up.

  • @southernfriedhackers
    @southernfriedhackers Місяць тому +2

    google is the reason i stay away and have no interest in GO. evil empire.

  • @DarenC
    @DarenC 10 місяців тому +8

    Hah! I use PHP as a templating language all the time! The CMS we use is written in Java, but we used it to produce PHP scripts. 😂 None of this front controller routing stuff, just an index.php in every directory. Bish, bash, bosh, job's a good 'un!

  • @tyu3456
    @tyu3456 10 місяців тому +29

    Talking about frameworks in JS land - yes Next.js doesn't compare to Rails and Laravel, but there IS a JS framework that's trying to be like that - it's called Adonis. It comes with auth, database, file storage, etc. Unfortunately the community and publicity is just nowhere near other JS frameworks for some reason. There's also Nest.js, but Adonis is a lot closer to those full-featured frameworks.

    • @rumble1925
      @rumble1925 3 місяці тому +1

      Yup, big thumbs up for Adonis from me too. It's a great framework. They really know what they're doing in terms of developer ergonomics.

    • @farxwaveeda2744
      @farxwaveeda2744 Місяць тому

      @@rumble1925 The integration of payload CMS with Next is awesome as well. You now get all these functionalities such as authentication out of the box.

  • @danibutg853
    @danibutg853 Місяць тому +1

    that title is so bad! learn the framework not the language? the podcast was good tho

  • @sentient_carbon
    @sentient_carbon 10 місяців тому +4

    I can relate with the disgust at 51:26.
    I'm a big php fan, but last week I was using a standard function, array_merge, which you'd think it merges arrays, right?
    Here's the kicker: if you try to merge arrays with numeric keys, it actually behaves as an append! That was a fun hour.

  • @AHN1444
    @AHN1444 2 місяці тому +1

    Raw PHP is perfectly fine, you can search the database in a couple of lines and create the result on the fly, no extra files, no library, no nothing, what's wrong with echo? is shameful to use it? is way cooler to have 1000 packages to do the same in other way? which they will have dependency problems? and you will be executing other persons code which could have virus?. If you have a big project is better to use a framework, I use svelte and GO lately, but I don't forget that for some cases PHP is way superior.

  • @IshCaudron
    @IshCaudron 3 місяці тому +1

    Oh god, I do understand now: I don't know it, I don't use it, but I know it sucks because it looks like it sucks. Is this reddit?

  • @osawereao
    @osawereao 9 днів тому

    There is no Laravel without PHP.
    So Laravel cannot be beautiful if PHP is not.
    I use Laravel and I started using Vanilla PHP from the onset for many years.
    I love PHP and everything around it's ecosystem, including Laravel.

  • @CharlesMartel829
    @CharlesMartel829 4 місяці тому +7

    Laravel is like macOS while Next is like some Linux Distro.

  • @AndreiTelteu
    @AndreiTelteu 8 місяців тому +2

    I think of typescript as just an easier documentation tool.
    When I don't care `as any` is my friend, and on important stuff just type a small type declaration, no big deal. `strict: false` always

  • @rysw19
    @rysw19 10 місяців тому +12

    My company has used PHP for a long time, and we’ll be gradually migrating new applications to go over the next few years.
    It might sound a little odd but they are more similar than you might think by the criteria that are most important to us.
    1. Despite what the guest says, they are both “batteries included” languages. Built into both languages are utilities for dealing with JSON, SQL databases, making HTTP requests, regex, email, etc. If third-party frameworks aren’t an option for you, you can roll your own pretty easily.
    2. Both value backwards compatibility. In golang they have their compatibility promise. In PHP you can get a 15 year old application running with only minor changes generally.
    3. The ecosystem. This is largely a product of the first two items, but both languages do have a good ecosystem. Composer and go get are the two best package management solutions I’ve used by a pretty wide margin.
    Syntax, performance, programming paradigms, and even static typing obviously make some difference in how you use a programming language, but their impact for many (most?) use cases is completely overshadowed by broader concerns.

    • @bootdotdev
      @bootdotdev 10 місяців тому +2

      that's super interesting actually

  • @JLarky
    @JLarky 9 місяців тому +2

    19:44 I enjoyed how he repeated "7000 engineers working on React" twice, given that React team has like 10 people and Facebook used to be 100% written in PHP 😂

  • @aimperialdesign6519
    @aimperialdesign6519 25 днів тому

    It ain't a tiring typing dollar 💰 sign because it looks money 🤑.
    🤣🤣

  • @frnjtt-pn6wj
    @frnjtt-pn6wj 16 днів тому

    Great content!! very insightful for beginners

  • @blu8762
    @blu8762 18 днів тому

    but you cant use laravel in wordpress can you ?

  • @gofullstack
    @gofullstack 2 місяці тому +1

    I'm making it 501 likes as a. PHP lover

  • @Thoer
    @Thoer 2 місяці тому +3

    Ex-PHP dev here. Calling PHP one of the older languages still in use is just weird to hear. Also very wrong.

  • @woodmanmade
    @woodmanmade 10 місяців тому +5

    Aaron basically saying he likes types (class instances) but not the syntax
    TS is clunky but we use it often for the same reasons he uses classes in PHP: so we know what we're working with
    And JS has an unfair aversion to using classes otherwise I think it would look quite similar at the end of the day

    • @raenastra
      @raenastra 10 місяців тому +1

      I think he's specifically not a fan of the structural typing in TS here

    • @woodmanmade
      @woodmanmade 10 місяців тому

      @@raenastra perhaps. I think inferred Typing would get him a long way towards appreciating it a bit more, but i understand he prefers the structure of class instances to raw objects. Just pointing out he could prob get a lot of what he likes in TS as well (tho no Laravel of course)

  • @JT-mr3db
    @JT-mr3db Місяць тому

    Next time someone says they hate x language with passion an vigor, simply ask them why.
    It's astounding how little insight they will have after the basic pebble throwing around types.
    Most virulent haters of any language are either purists, or sheep.

  • @aimperialdesign6519
    @aimperialdesign6519 25 днів тому

    Ah! I already followed Aaron Francis UA-cam before!
    Now follow this channel too. Keep it up!!!

  • @boopfer387
    @boopfer387 3 місяці тому

    Typescript... MS's reach into a biz they lost. I spend so much time leaning TS instead of coding, agreed hate it. Agree the pinnacle of react is over gone. Don't get it overly complex. V19 with now a compiler, so now all that pain with usememo, usecallback i can toss? nice how about Htmx, or livewire. Laravel is to me like .Net without the big prices. Host where i want not stuck with windows. I like .Net, next really? Lets jam a front end tech into this... huh?

  • @gofullstack
    @gofullstack 2 місяці тому

    5:56 I don't know a thing bout raw PHP. Is it a Framework? Or am I so dumb not to realise people use the word in place of "Vanilla" PHP? 😹😹😹

  • @Zakaros1000
    @Zakaros1000 3 місяці тому

    hey!
    Don't mess with Typescript, it basically fixed Javascript. haha.
    Isn't Vue a library like React? Why Vue instead of a full framework like Angular which goes slowly but stable with backwards compatibilty too?
    I can understand the hate for React, with all those libraries updating in diferent dates, and with breaking changes in frameworks like Next.
    But I see Vue as something similar like React, they even have Nuxt which almost sound like Next .-.
    Shouldn't it be a better option Angular? which is a Complete Framework that doesn't have that many updates like React and its thirdparty libraries but it is still cool and stable. I almost see it as a equivalent to Laravel but for Frontend...

  • @mattskov2917
    @mattskov2917 10 місяців тому +3

    Lane said fuck

  • @Jacek2048
    @Jacek2048 2 місяці тому

    Interesting chat, but:
    I don't think you guys know what static vs dynamic typing is.
    "We don't have huge amorphous arrays that we pass in PHP" - what? It's the exact thing I see most of the time.

  • @hesham14yahia
    @hesham14yahia Місяць тому

    golang only language can compete with php/laravel productivity

  • @bradtshortridge
    @bradtshortridge Місяць тому

    Laravel is just good, it works, it scales nicely for us, love it.

  • @gabrielbahash
    @gabrielbahash 2 місяці тому

    Wow this debate really clarified the vs. framework discussion

  • @code-island
    @code-island 3 місяці тому

    I cant even tell how this conversation was fantastic, you both are really good speakers. Im getting comfortable with laravel ecosystem and very happy with the productivity

  • @olivier5293
    @olivier5293 2 місяці тому

    Best explanation of what really laravel is.🎉

  • @purpinkn
    @purpinkn 10 місяців тому +3

    25:28 no it wouldn't break. People just wouldn't upgrade their PHP version, like it is now anyway. That much backwards compatibility leads to bloated, buggy code. Just ask windows.

    • @leeboy_
      @leeboy_ 10 місяців тому +1

      That is true to an extent… I think he was taking into consideration that most of those applications are on shared hosting and they don’t individually have full control on the servers, so breaking changes would indeed break.

  • @kahnfatman
    @kahnfatman 3 місяці тому

    I write "echo" whenever I create a Dockfile...

  • @anasouardini
    @anasouardini 3 місяці тому

    44:26 me before I started using TS

  • @oliverhughes169
    @oliverhughes169 2 місяці тому

    Underrated video, enjoyed this a lot

  • @gofullstack
    @gofullstack 2 місяці тому

    54:55 I don't remember typing dollar signs when writing PHP.

    • @Etcher
      @Etcher Місяць тому

      Are you sure you've actually used PHP then? In PHP, a variable is declared using the $ sign followed by the variable name 🤷

  • @DavidSmith-ef4eh
    @DavidSmith-ef4eh Місяць тому +3

    dude, laravel is the slowest framework that exists. eloquent is the worst ORM in the php eco system. the entire project is a joke. I'll stick witch php, but thx for the advice.

  • @LorenzoGiovenali
    @LorenzoGiovenali 2 місяці тому

    What about Symfony & Drupal?

    • @tarilonte
      @tarilonte 2 місяці тому +2

      They have less money for marketing.

  • @JanJozefo
    @JanJozefo 10 місяців тому +3

    Great episode! I got really excited when I saw it was out, but I can't help but feel a bit uncomfortable watching it because it seemed like Aaron was upset at something the whole time. Maybe it's just me. Hope everything is ok on his end.

    • @aarondfrancis
      @aarondfrancis 10 місяців тому +3

      Haha really?? I'm all good! Love to banter

    • @JanJozefo
      @JanJozefo 10 місяців тому +1

      @@aarondfrancis Good to hear! Yeah, I think it was the combination of the crossed arms plus the face you make when you're thinking that comes off as a bit angry. But as a PHP developer who's built a few libraries in his time, your takes on gradual typing and classes seem spot-on to me 😀

    • @aarondfrancis
      @aarondfrancis 10 місяців тому +3

      @@JanJozefo ha perfect, I shall forever be self conscious about my face now 😂😂

    • @KonstantinosMK
      @KonstantinosMK 10 місяців тому +1

      @@aarondfrancis I think it might be a combination of where the screen you're looking was located vs your webcam. I wouldn't go as far as calling it an angry/upset look, we're just used to seeing you more relaxed. Great talk by the way.

  • @jeffreysmith9837
    @jeffreysmith9837 3 місяці тому +1

    Php for getting shit done fast.
    Go for performance, low cost and low maintenance.

  • @johnhandelaar
    @johnhandelaar 4 місяці тому +1

    As I understand the extended failure-to-convey sequence about type-safety that never really got resolved as it relates to (eg) Laravel, the thing not being said is: in modern PHP a properly-instantiated class instance *can be a type*, and that's so much more useful than str/int/whatever nitpicky typechecking, and so easy to define in the class definition, that lower-level annoying type crap becomes unnecessary if you're actually... ya know. Working.
    (Yes, your description of Golang struct as being analagous to class-based typechecking is about right)
    All of us don't care so much about types. We care about not having type *errors*, especially hidden ones. Nitpicking cares about types and pragmatic struct/class validation cares about errors.

  • @ryanvelbon
    @ryanvelbon 4 місяці тому

    Podcast about backend? Been looking for something like this for years. Subbed!

  • @razt3757
    @razt3757 9 місяців тому +4

    49:22 he's saying TypeScript is not enforced at runtime, that's why he says "pretend types".
    TypeScript doesn't provide type safety, it provides type hints, and whoever disagrees better take a look at what Vite.js does.
    Vite.js will build your application if there are type errors, because they just gave up completely on the idea of enforcing types even at build time, they just delegate that to your IDE and your CI piplines or whatever you're using to deploy.
    Which makes sense, at least they're being realistic about TypeScript.
    On top of that there are also some pitfalls in TypeScript where it can be just wrong, specifically with arrays and union types.
    Just as a very simple example an Array con become a valid Array, which is nuts.

    • @feldinho
      @feldinho 4 місяці тому

      In practice, TS uses "type erasure", and it works like Java, Python, C, and many others. Languages like C#, Rust and PHP have "reified types", where type information is integral to the objects and kept on runtime. Type erasure is okay, and was not invented by TS. It's just another way to do things.

  • @TheOnlyJura
    @TheOnlyJura 3 місяці тому

    I make fun of Javascript (and yes, typescript = javascript)

  • @IshCaudron
    @IshCaudron 3 місяці тому

    So how is php today: "well, I just don't use it"
    PHP sucks so much that php developers "just don't use it".
    It reminds me of Java. it sucks so much that developers built alternative languages to use the jvm, just to avoid touching the language.

  • @science_trip
    @science_trip 9 місяців тому +1

    Write PHP not Laravel!

    • @exxon258
      @exxon258 День тому +1

      code should be framework agnostic! so yeah, you don't write laravel code, you write php code.

  • @rangingaway92
    @rangingaway92 4 місяці тому +2

    Write PHP, not Laravel.

  • @TheKaosTux
    @TheKaosTux 3 місяці тому

    PHP Frameworks… okay… you started talking about it… Laravel? Hmm.. No.. wouldn’t touch that.. Symfony? Yeah.. better.. but.. hmm.. Flow? Definitely!
    Oh you don’t know Flow? Ah… that’s the problem….
    And please… stop talking about Wordpress… that the worst thing that ever happened to the internet..

    • @farxwaveeda2744
      @farxwaveeda2744 Місяць тому

      Would you mind elaborating on how Wordpress is terrible? Just a few points, I would really appreciate.

  • @tarilonte
    @tarilonte 2 місяці тому

    Laravel is bloated, heavily opiniated and slow. It's made to sell courses, so it has a steep leaning curve and a fragmented and confusing ecosystem.

    • @scott_itall8638
      @scott_itall8638 Місяць тому

      its easy and awesome to use lol.

    • @Etcher
      @Etcher Місяць тому

      100% disagree with this. My company uses it because it's lighting fast (in both performance and getting up and running) and just like any other framework it is of course opinionated (otherwise how do you avoid DRY) but you're not locked into how it does something. It's very easily configured to allow you to do something in any way you want.

  • @ShadoFXPerino
    @ShadoFXPerino 10 місяців тому

    Laravel is just what happens when a .NET guy gets dumped into an PHP environment and gets an allergic reaction to the templating and cruft.
    So why does PHP need to be redeemed, apparently against its will, when you could just use something like C# or Go, built from ground up for the "modern" MVC and routing paradigms, without the cruft? It doesn't make much sense.
    If I'm going through the trouble to put the

    • @kurku3725
      @kurku3725 11 днів тому

      wrapping things in a docker to develop something is not a sane thing to do
      probably nix is a better option to keep track of all these php versions and extensions

  • @DeveloperOfGames
    @DeveloperOfGames 3 місяці тому

    imagine the day when we stop collectively glorifying incompetence and use systems languages like real programmers