Live data from Hacker News

Laravel 9

laravel-news.com

151–160 of 262 posts

Re: Laravel 9

#151
post #106
post #89

Earlier quoted context omitted.

Non-PHP, non-Laravel person here just trying to learn. That looks pretty good to me. What bad practices does it encourage?

I wrote that example, which is simplified, but here are some security things to keep in mind when dealing with PHP/MySQL: - Always use PDO prepared statements to avoid SQL injections - Should probably implement a CSRF token check - You shouldn't output values directly from the user/database and that can lead to XSS attacks (either sanitize the stored data, or when outputting it make sure the page is always interprete…

Always use PDO prepared statements to avoid SQL injections?

Sanitize your data and use whatever driver you want. Prepare statements are like sending xml instead of json. If you are populating a database with known data why add the overhead?

Re: Laravel 9

#152
post #29
post #4

Earlier quoted context omitted.

This doesn't match my experience at all, and given Laravel's popularity... this comment would be a lot more valuable with a why . I will say I opt out of the starter packs and Laravel Sail (their Docker-for-dummies basic setup) in favor of a more bespoke setup, but my Laravel experience has been great otherwise.

Not the OP, but one thing that stands out for me is the (lack of) quality of the documentation. It reads more like a book (that tries to explain how to do things) than a reference (an exhaustive list of all classes, methods, parameters etc.). Ok, it's nice to have the former, but the latter would be far more important!

It's actually not unreasonable to expect something that exists between the main documentation and the automated API documentation. Sounds like a great idea for someone to build and contribute back to the community!

Re: Laravel 9

#153
post #10

Laravel and Drupal 7+ frankly ruined PHP for me. PHP as a platform is KISS and elegant, and I still admire some of its features such as built in templating, filesystem based routing, etc. But whenever I look back at Laravel, I remember how dangerous overly complex fluff with a nice logo is to a platform.

> Laravel and Drupal 7+ frankly ruined PHP for me.

You don't have to use either. It's like saying something like "Britney Spears ruined music for me".

Just go with Symfony and be done with it.

Re: Laravel 9

#155
As a solo bootstrapped SaaS founder that literally relies on my app to pay my rent and food, I owe my sanity to Laravel. I've been doing web development for 10+ years. Nothing else understands the needs of a business owner AND solo programmer like Laravel does.

I worked with Python (Flask/Django) for (4+ years) longer than I worked with Laravel (only 1 year), and yet I'm already 10x more productive in Laravel than I have ever been in Python.

Software projects follow Conway's Law, i.e. [1] the software architecture reflects the team structure. Laravel reflects the needs of business owners and one-man-companies because it is built by a business owner and has an ecosystem supported by one-man-companies who build high quality products for profit. I want beautiful high level abstractions AND a theoretically sound framework that is battle-tested in production. Laravel gives me both.

The number of headaches that Laravel just solves for me, out of the box:

0. Background Jobs/Queues/Rate Limiting/Retry logic handled by the excellent queueing framework

1. Rock solid server deployments/DevOps handled by Laravel Forge

2. Seamless version upgrades handled automatically by Laravel Shift

3. Backend-agnostic full-text search built into the framework with Scout

4. ORM which seamlessly enables caching, lazy loading, advanced subqueries, dynamic scoping, or just mixing in raw SQL when you need it

5. And there's just so much more. I live and breathe Laravel.

[1] https://en.wikipedia.org/wiki/Conway's_law

Re: Laravel 9

#156
post #108

Earlier quoted context omitted.

The biggest benifit to something like Laravel is that a new developer to your team can step in and know where everything should be and how it should generally work without asking. There is good documentation so you dont have to write that for your foundational code, just your business logic. A bunch of bespoke packages strung together with no logic does not provide that. You can surely look up how one package works b…

I can see how it's seen as a benefit, but the flipside is that you're teaching your developers Laravel, not PHP. They assume whatever they do, they do in a good way because it's Laravel that does it which is great, but it abstracts actual knowledge. It's like if a developer uses SQL exclusively through an ORM and DBAL, how much can they be expected to know about the workings of SQL performance, indexes, etc. I also f…

Being Laravel focused and knowing what is happening underneath the hood are not mutually exclusive. A mature developer knows when to stray from the framework when its absolutely needed, not when it just seems like a fun thing to do. 99% of the time the frameworks predetermined path is the right way as its the simplest to maintain.

Re: Laravel 9

#159

I met Taylor a few years ago at a conference we were both speaking at. Coming from the iOS world, I had no idea who he was. "So, what do you work with?" "PHP mainly", he said. I replied "That sucks, sorry man." ¯\_(ツ)_/¯

That's kind of a mean thing to say. Maybe that's what your shrug meant?
Post reply on HN