WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#29497 closed feature request (invalid)

Allow WP plugins written in node.js

Reported by: michael.heuberger Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Plugins Keywords:
Focuses: Cc:

Description

This is probably a "stupid" feature request but I am not afraid to ask. To be honest, WordPress is very popular and great stuff. But PHP, yuck ... I have abandoned PHP years ago for node.js

Some clients of mine want me to develop custom plugins but I loathe PHP. Hence I am wondering if it's technically possible to write a plugin in pure JavaScript and run it on the server-side in a WP PHP process?

I think such a node.js integration would be soooooo cool and attract more developers! Even better, npm modules could become WP plugins. Imagine the possibilities - call me crazy, I don't care ;)

Change History (9)

#1 @nacin
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi michael.hueberger, thanks for the ticket, but this isn't the right place to propose this. This is probably best done as an unofficial experimental project somewhere. If you search Google on integrating node and PHP, I gather you'll find some interesting results.

Cheers.

#2 @michael.heuberger
3 years ago

At least I tried ;)

Tell me, will WP migrate to node.js somewhen in the future?

#3 @nacin
3 years ago

Unlikely.

#4 @nacin
3 years ago

Slightly longer answer: We don't use PHP for its dexterity, we use it for its portability and ubiquity. We're more concerned about building a great user experience than the stack we use for that. Helps that we have 14 years of knowledge and code built up on this one.

Also, thanks for throwing your idea out there and not being afraid to ask. :)

#6 in reply to: ↑ 5 @michael.heuberger
3 years ago

Replying to Denis-de-Bernardy:

https://github.com/bergie/dnode-php

Wow, thanks for the link - do you seriously can imagine it, writing a WP plugin in node.js with dnode-php?

#7 @Denis-de-Bernardy
3 years ago

Me? Not a chance.

Someone else? Probably not either.

It would basically amount to calling an executable or a web service on the same server (or a nearby one), repeatedly over the course of each page. Which seems like it would be dead slow. Imagine a ms of latency times the number of times WP calls its plugin API. You're instantly in multi-second territory unless you handpick the hooks you need -- which woukd require writing some PHP.

But then... give it a try on your end and see for yourself. The link was to highlight it's technically feasible.

Announce it on the wp hackers list rather than here when you're done writing some kind of proof of concept, as thisis not theright venue. You'll then see if it gets picked up.

Good luck.

#8 @michael.heuberger
3 years ago

Absolutely - agree, especially about the latency of that approach.

Ok, I will give the wp hackers list a try. Where it is? URL?

#9 @markoheijnen
3 years ago

See http://codex.wordpress.org/Mailing_Lists#Hackers.

Also I see the problems doing this in node.js after trying to do the authentication in a node.js server. Dealing with hooks and user permissions for example require a lot of copy/paste to have the same functionality in node.js. But I'm really curious what you come up with.

Note: See TracTickets for help on using tickets.