Live data from Hacker News

Write PHP Code Within Next.js Components

github.com

91–100 of 107 posts

Re: Write PHP Code Within Next.js Components

#91
post #75

Earlier quoted context omitted.

I installed wp with a theme a few years ago and the box was turned into a zombie file dump. Modern php is still not there.

“I installed some third-party PHP software and didn’t turn on auto-updates for that software, and then my server got hacked” is a hit on your server admin skills, not PHP.

The attack vector was directly through php. Everything was upgraded to the latest. It was the theme that was hacked. How that is related to admin skills makes no sense.

Re: Write PHP Code Within Next.js Components

#92
post #60
post #45

Earlier quoted context omitted.

Next has always been inspired by PHP. in his keynote Rauchg even spent like a moment of silence dedicated to the PHP Lambo, completely out of context. it must have been confusing to others not in on the joke but for those of us in the audience it was great

Isn't PHP Laravel author owner of a Lambo? I wonder what the plate reads.

Thats the origin of the meme.

Re: Write PHP Code Within Next.js Components

#93
post #60
post #45

Earlier quoted context omitted.

Next has always been inspired by PHP. in his keynote Rauchg even spent like a moment of silence dedicated to the PHP Lambo, completely out of context. it must have been confusing to others not in on the joke but for those of us in the audience it was great

Isn't PHP Laravel author owner of a Lambo? I wonder what the plate reads.

It reads FACADE

Re: Write PHP Code Within Next.js Components

#94

Earlier quoted context omitted.

All these haters of Javascript, you'd think no one actually uses it.

Javascript is widely used for frontend development because it's the only choice, not because it's a well-designed language that developers love.

I love typescript. It’s not my fav but it’s far from the worst.

Re: Write PHP Code Within Next.js Components

#95
post #68

Earlier quoted context omitted.

How do you version the functions? How does the server determine which function to call? Does it use the name of the function, or its source code file, or something else? If I rename the old version and call it `actionOld` while the new version is `action` will it know how to call the old one, or do I need to do the opposite (call it `actionNew`)? What if I move the old one to a different file?

You can use a v1 folder for your v1 functions. The server identifies functions by path and name of the action. Similar to a url. So like a url if you want a new one, you'd create actionNew, and if you move the location of the function it would break old versions without a redirect.

Is this documented anywhere?

Re: Write PHP Code Within Next.js Components

#96

Earlier quoted context omitted.

I've been working exclusively in javascript/node since 2015 and nothing in the JS ecosystem has ever felt as productive as rails or django or laravel. Maybe it's rose tinted glasses when working on those select few projects but compared to the node ecosystem I'm bashing my head against the wall updating libraries that provide no migration docs seeing alternative solutions saying "we don't support X, sorry." It's just…

Have you used Next? I’ve found it more productive than anything because I can reuse the same code, DTOs, components, rendering, etc.. across server and client. It feels like I’m building a single app instead of dealing with using one code base to build the page and another to update it on the client. No extra JS frameworks needed. Plus TypeScript/ES6 is crazy productive - destructuring, structural typing, super expre…

I used Next a few years ago, I'm extremely weary of proprietary frameworks. Especially those with VC funds. I've been around long enough to knows what eventually happens to those tools (the company goes bust, no one wants to maintain it, and people move to new things).

I'd be more of a fan of Vercel if they moved ownership of Next.js to the OpenJS Foundation and gave monetary support through that org instead. Obviously this would require movements to have react there as well; but if you cared about nurturing an open ecosystem it seems like the altruistic move.

I'm exploring HTMX for certain use cases at work. That library feels like the only new innovation happening in the web dev world. All the other frameworks are way too "same-y." Angular, react, svelte, solid, vue; they're all riffing off each other which is fine, but none of them really offer something completely substantial from one another. Just different syntax, with different bundle sizes, with different performance.

HTMX is just wildly different in that regard.

Re: Write PHP Code Within Next.js Components

#97

Earlier quoted context omitted.

I'm still yet to see something as productive as PHP for web apps, ecommerce etc. You ask for a customised e-commerce shop with many standard features out of the box. How long will the Java or Rust engineers quote you? A year? Php? A week?

I've been working exclusively in javascript/node since 2015 and nothing in the JS ecosystem has ever felt as productive as rails or django or laravel. Maybe it's rose tinted glasses when working on those select few projects but compared to the node ecosystem I'm bashing my head against the wall updating libraries that provide no migration docs seeing alternative solutions saying "we don't support X, sorry." It's just…

To make it worse, there are like 10 half assed frameworks claiming to be the “rails” of node.

Not a single one of those provide even a way to do translations, run a background job and most don’t even provide an ORM or a way to validate input.

It’s a freaking joke.

Re: Write PHP Code Within Next.js Components

#98

Earlier quoted context omitted.

I've been working exclusively in javascript/node since 2015 and nothing in the JS ecosystem has ever felt as productive as rails or django or laravel. Maybe it's rose tinted glasses when working on those select few projects but compared to the node ecosystem I'm bashing my head against the wall updating libraries that provide no migration docs seeing alternative solutions saying "we don't support X, sorry." It's just…

Have you used Next? I’ve found it more productive than anything because I can reuse the same code, DTOs, components, rendering, etc.. across server and client. It feels like I’m building a single app instead of dealing with using one code base to build the page and another to update it on the client. No extra JS frameworks needed. Plus TypeScript/ES6 is crazy productive - destructuring, structural typing, super expre…

I think you are confusing a productive language with a productive ecosystem.

Using typescript and next maybe you are super productive writing code, but in the big scheme of things you are not productive if you have to reinvent the wheel and write your own framework.

Neither Next nor typescript will give you an integrated solution for translations, background jobs, schedules, validation, ORM, queues, file uploads, authentication, authorization, etc.

Granted, you’re super fast writing typescript but we are not talking about the same kind of productivity I think.

Re: Write PHP Code Within Next.js Components

#99
post #49

Earlier quoted context omitted.

What direction would you prefer Vercel went in?

I don't really have a strong opinion. Vercel is a really loud voice in the React world, so I guess I'd like them to survive a post-zero interest rate policy world (many growth companies have struggled). Or at least, not push paradigms and features specific to their needs on the React world, then run low on cash, leaving those paradigms functionally unsupported and half adopted by other React libraries. My needs that…

I think all this RSC is a big fuck up.

A feature nobody needed that breaks the ecosystem and introduces huge amounts of complexity.

It hurts to see.

Post reply on HN