Live data from Hacker News

Laravel 9

laravel-news.com

241–250 of 262 posts

Re: Laravel 9

#241

Earlier quoted context omitted.

I love hearing about developer experiences by solo devs. As a potential solo dev, I was actually looking to go the Spring Boot route. I think Java has gone in a better direction the past few years, and I prefer it over PHP due to static typing, functional programming (to a point), and the tooling. Spring Boot seems to provide a lot of the same development productivity. My only other experience is with Rails and Djang…

I also find these decisions very hard. I switched from NodeJS to Spring Boot some 5 years ago when I found that the JS community moved faster than my clients could pay me to keep up to date. It has been great to make apps in Java with Thymeleaf, until I wanted to add dynamic frontends (a lot of advantages vanished) or when I tried to put Java on my CV. I am now considering switching to .NET and Angular. I would be ha…

Check out NestJS (https://nestjs.com/) - it's a typescript framework for Node inspired by both Spring and the Angular architecture.

Re: Laravel 9

#242
post #90

Earlier quoted context omitted.

If I am working alone, I sometimes do similar stuff. But if I am working with others, I don't really want to deliberate over every new architectural decision if a project grows. I want to be able to say, "Hey, can you make a new storelocator page" and then they can get it done using the docs. They know where models, controllers, views live, they know how to make migrations for the new tables, they can even google "st…

I took over an enormous system that a third party developer built in Laravel. Not good code, particularly, and not particularly good database design. Also no documentation really. But the implementation was pretty clearly pure Laravel, and the migrations ran without issue. So that was immediately a huge weight off my mind, because I knew I would be able to maintain the live, stage and dev boxes sanely. The two bigges…

> Expedience kills software

Unfortunately, this is how the majority of software is written nowadays. This is one of the reasons I prefer to build things slowly, think about stuff, implement them nicely, find clever solutions and optimize where it's possible. I know I could build more stuff and earn more money if I rushed things more, but I prefer building nicer stuff instead of more stuff. For most outsourcing companies, this doesn't really make economic sense though, but for product-driven companies it is still possible if the leadership decides to do it.

> the implementation was pretty clearly pure Laravel, and the migrations ran without issue

Being able to refactor/change one part of the code without being afraid that something else might break is an excellent reason to use a framework. Once you understand how that framework works, even if a codebase is bad, you can know what and how can break if not implemented properly. It increases the visibility of "code smells".

Re: Laravel 9

#243
post #242

Earlier quoted context omitted.

I took over an enormous system that a third party developer built in Laravel. Not good code, particularly, and not particularly good database design. Also no documentation really. But the implementation was pretty clearly pure Laravel, and the migrations ran without issue. So that was immediately a huge weight off my mind, because I knew I would be able to maintain the live, stage and dev boxes sanely. The two bigges…

> Expedience kills software Unfortunately, this is how the majority of software is written nowadays. This is one of the reasons I prefer to build things slowly, think about stuff, implement them nicely, find clever solutions and optimize where it's possible. I know I could build more stuff and earn more money if I rushed things more, but I prefer building nicer stuff instead of more stuff. For most outsourcing compan…

> Being able to refactor/change one part of the code without being afraid that something else might break is an excellent reason to use a framework.

Yep. It's also more or less essential when something is subcontracted, like this was. In this case I think there were hard-working, competent developers who were burned by the original spec hiding a lot of undiscovered complexity, and what would have been a really good piece of work went inevitably quite wrong. The subcontractors clearly desperately tried to finish it within their parameters, and the result is something that met most of the spec but satisfied nobody.

(The framework decision they made wrong was in the front end, because there they made the disastrous choice to run with Angular 1.x -- which was presumably an in-house skill -- and not push to at least use 2.x. The resulting project is the precise kind of agony that Angular 1.x is famed for.)

Re: Laravel 9

#244

All else being equal, how do we feel about Rails 7 vs Laravel 9 in 2022? Giving the breadth of both frameworks I am pretty certain there has to be one objectively better choice. Which one is it? Why?

I think Rail's latest take on frontend build tools is a great direction. They really messed up their Webpack integration in my opinion, and Laravel Mix isn't much better (but it is a lot easier to use). Overall, I think it would just be a matter of which language you know better.

Let's say I know neither. Which should I pick and why?

Re: Laravel 9

#245
post #136

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." ¯\_(ツ)_/¯

What was his response?

We both just laughed

Re: Laravel 9

#246
post #137

Earlier quoted context omitted.

I don't think either is objectivly better - if for no other reason than ruby and php being quite different languages. Personally I much prefer ruby - but I could perhaps see myself reaching for Laravel for a project depending on requirements.

What requirements does Laravel meet that Rails does not?

I'm guessing it's feasible to deploy to shared hosting for example?

Re: Laravel 9

#248

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." ¯\_(ツ)_/¯

We're used to it . You're wrong, though!

Haha not surprised - ecosystem seems to be doing very well.

Re: Laravel 9

#249

Earlier quoted context omitted.

Does Laravel have anything akin to the Rails Guides? (ie, higher level based on what you want to do, rather than API-level documentation)

https://laracasts.com/

Rails has a number of "cast" sites as well. There are times however that you just need well organized text documentation.

Re: Laravel 9

#250
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…

Thank you. Somehow, I thought the tree structure they described for breaking down program logic was the problem. Obviously I agree with all the other stuff, which is table stakes for a safe web app
Post reply on HN