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

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 88

  • @MrHopp24
    @MrHopp24 Рік тому +23

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

  • @poggybitz513
    @poggybitz513 10 місяців тому +30

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

  • @rysw19
    @rysw19 Рік тому +13

    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 Рік тому +2

      that's super interesting actually

  •  11 місяців тому +23

    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?

    • @BrandonSorenson-fb3gg
      @BrandonSorenson-fb3gg 12 днів тому

      Yeah, not sure about the threaded thing, the most annoying thing is dealing with moving an old monolith from mod-php to fpm-php and making sure you are tuning your application correctly

  • @overholted
    @overholted 9 місяців тому +19

    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 2 місяці тому +2

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

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

      @@berserkerrxii5776 fr LOL

  • @tyu3456
    @tyu3456 Рік тому +30

    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 5 місяців тому +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 3 місяці тому

      @@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.

  • @LukasRotermund
    @LukasRotermund 5 місяців тому +9

    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.

  • @sentient_carbon
    @sentient_carbon 11 місяців тому +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.

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

    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

  • @DarenC
    @DarenC Рік тому +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!

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

    Wow this debate really clarified the vs. framework discussion

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

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

  • @AndreiTelteu
    @AndreiTelteu 10 місяців тому +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

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

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

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

    Underrated video, enjoyed this a lot

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

    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.

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

    Best explanation of what really laravel is.🎉

  • @woodmanmade
    @woodmanmade Рік тому +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 Рік тому +1

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

    • @woodmanmade
      @woodmanmade Рік тому

      @@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)

  • @frnjtt-pn6wj
    @frnjtt-pn6wj 2 місяці тому

    Great content!! very insightful for beginners

  • @johnhandelaar
    @johnhandelaar 6 місяців тому +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.

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

    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.

  • @oardi
    @oardi 4 дні тому

    The talk was nice.
    But typing is pretty good and important, even in PHP.
    Talking about an API, creating DTOs is pretty easy and it would prevent exposing Properties/Attributes as you define only those that are meant to be sent to a client.

  • @JLarky
    @JLarky 11 місяців тому +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 😂

    • @backendbanterfm
      @backendbanterfm  11 місяців тому +2

      You want truth and facts??? Wrong pod

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

    but you cant use laravel in wordpress can you ?

  • @ryanvelbon
    @ryanvelbon 6 місяців тому

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

  • @IshCaudron
    @IshCaudron 5 місяців тому +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?

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

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

  • @Zakaros1000
    @Zakaros1000 5 місяців тому

    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...

  • @kahnfatman
    @kahnfatman 5 місяців тому

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

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

    Lane said fuck

  • @CharlesMartel829
    @CharlesMartel829 6 місяців тому +10

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

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

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

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

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

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

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

    • @AayushiRaj-n7i
      @AayushiRaj-n7i Місяць тому

      $noob

    • @KimYoungUn69
      @KimYoungUn69 День тому

      You used Euro signs?

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

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

  • @MrFluteboy1980
    @MrFluteboy1980 26 днів тому

    25:00 a fractal of bad design was a tear down of PHP what 5.4??
    Fast forward how many versions that have come since then, it's hard to see how that article is even valid anymore.

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

    What about Symfony & Drupal?

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

      They have less money for marketing.

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

    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? 😹😹😹

  • @JanJozefo
    @JanJozefo Рік тому +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 Рік тому +3

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

    • @JanJozefo
      @JanJozefo Рік тому +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 Рік тому +3

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

    • @KonstantinosMK
      @KonstantinosMK Рік тому +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.

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

    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.

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

    44:26 me before I started using TS

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

    golang only language can compete with php/laravel productivity

  • @boopfer387
    @boopfer387 5 місяців тому

    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?

  • @razt3757
    @razt3757 11 місяців тому +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 6 місяців тому

      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.

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

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

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

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

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

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

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

    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.

  • @TheOnlyJura
    @TheOnlyJura 5 місяців тому

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

  • @TheKaosTux
    @TheKaosTux 5 місяців тому

    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 3 місяці тому

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

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

    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.

    • @KimYoungUn69
      @KimYoungUn69 День тому

      This comment is written by a Brainf*ck programmer

  • @IshCaudron
    @IshCaudron 5 місяців тому

    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 11 місяців тому +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 5 місяців тому +1

    Write PHP, not Laravel.

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

    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 3 місяці тому

      its easy and awesome to use lol.

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

      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 Рік тому

    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 2 місяці тому

      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