Welcome to WebmasterWorld Guest from 54.224.49.217

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

In move away from PHP, WP launches new, open sourced Admin interface

built on Node.js and React

     
4:02 am on Nov 24, 2015 (gmt 0)

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month Best Post Of The Month

joined:Oct 12, 2000
posts:14993
votes: 132


http://www.wired.com/2015/11/wordpress-com-gets-a-new-face-and-joins-the-javascript-age/ [wired.com]

WordPress.com Gets a New Face and Joins the JavaScript Age

WordPress.com unveiled a new admin interface today for managing blogs, posting content, and reading other people’s sites. If you’re a regular user, you’ll notice a new look and feel. If you’re a code geek, you’ll notice something more remarkable below the surface: JavaScript instead of PHP.
5:17 am on Nov 24, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:7771
votes: 530


In a world of script and ad blockers and growing distrust of js, only those who use neither of the above will be happy with this change.
12:29 pm on Nov 24, 2015 (gmt 0)

Administrator from GB 

WebmasterWorld Administrator engine is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month Best Post Of The Month

joined:May 9, 2000
posts:24524
votes: 576


There's an interesting post from Matt Mullenweg which explains more about the changes. [ma.tt...]
4:29 pm on Nov 24, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts: 2678
votes: 90


The core server is still written in PHP. This is a combination of a desktop app that happens to be written in Javascript, and a a "thin" Node JS server to render the initial page.

It is something that will work well for wordpress.com. Maybe not so well for having your own Wordpress install on cheap hosting as you need to run Node as well as PHP.
4:38 pm on Nov 24, 2015 (gmt 0)

New User

joined:Nov 1, 2015
posts:2
votes: 0


It seems to good but it would take a little bit time for replacing PHP interface
8:43 pm on Nov 24, 2015 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8509
votes: 228


>>The core server is still written in PHP.

Though if this is successful, I would expect a full rewrite of the backend. Why have half your backend in node.js and half in PHP? And most professional programmers I know who use both have a *strong* preference for node.
9:32 pm on Nov 24, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts: 2678
votes: 90


I imagine most professional programmers who use PHP and anything else short of BrainF*** prefer the other language!

The problem with rewriting the core in a different language is that it would mean rewriting every single plugin and theme. It would also mean anyone running Wordpress would need hosting that supported Node which is likely to be more expensive as I believe it will require a separate long running processes for each install.
12:37 am on Nov 25, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
posts:4874
votes: 15


Their API layout sounds interesting, and way more friendly for the WP-uninitiated.
12:42 am on Nov 25, 2015 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:9630
votes: 479


I'll be watching to see if this changes the several hundred daily WP exploit attempts across my sites (even though not one uses WP.)
8:25 am on Nov 25, 2015 (gmt 0)

Senior Member from NL 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 25, 2005
posts:1498
votes: 198


The discussion title and homepage intro are quite misleading as this barely touches the WordPress software many use, for the foreseeable future anyway. It's only a new admin interface for blogs hosted on the WordPress.com platform. Whether it will eventually be rolled into the blogging software "will depend on what the community wants", Mullenberg says. I doubt the community will actually be "[moving] away from PHP" anytime soon.
4:25 pm on Nov 25, 2015 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8509
votes: 228


>>it would mean rewriting every single plugin and theme

Never stopped Drupal :-)

>>for blogs hosted on the WordPress.com platform
And, optionally, anyone with Jetpack installed, which is a LOT of WP users, especially as Jetpack expands it's offering.

>>professional programmers who use PHP and anything else short of BrainF*** prefer the other language!

My first job was programming in FORTRAN77. I'll take PHP thanks ;-)
.... but I get your point :-)
7:21 pm on Nov 25, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14017
votes: 520


most professional programmers I know

But WP isn't really about professional programmers, is it.
8:42 pm on Nov 25, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts: 2678
votes: 90


@lucy no, but assuming professional programmers have a modicum if judgement, what we are saying is that Javascript is better than PHP, but so is almost everything else.

@ergophone, I was taught Fortran 77, but never used it for real life applications. I think that a much higher proportion of Drupal's user base develop extensively on it, so they stand more to gain from the major changes - and they are nothing like as drastic as changing the language used in the core. It would be interesting to see how the Wordpress community reacted to a really large change like Drupal's.

To get back from hypothetical the new architecture would make it easier to write alternative Wordpress admin apps in any language on any platform as it means the REST API exposes everything you need to write an admin.
6:33 pm on Nov 27, 2015 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8509
votes: 228


I was taught Fortran 77, but never used it for real life applications. I think that a much higher proportion of Drupal's user base develop extensively on it,


I think these are two separate thoughts, right? Not that the Drupal user base develops on FORTRAN77.

I think you mean to say that whereas the Wordpress user base is mainly "users" and perhaps "themers" the Drupal user base is heavily "developer" and so changes that make development easier have bigger benefits for Drupal than Wordpress... and therefore they are more willing to tolerate big changes if it makes life easier two years from now?

Having put all those words in your mouth and assuming I've got them right, I'd say that's correct :-)
7:26 pm on Nov 27, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts: 2678
votes: 90


@ergophone, That is exactly what I meant. Lots of Wordpress "developers" are really "themers".
8:54 pm on Nov 27, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Mar 30, 2006
posts:1419
votes: 63


The change sounds good. It's not about PHP being entirely replaced by JS on a server side thing but I see a lot of people are getting this change as such thing (perhaps in the future?).

WP developers? I've seen more commonly used the term "Drupal/Symfony/Node experts" rather than "developers", that's just me, but regarding WP is more a self given name, many are not in fact at that level, what I don't understand is why so many take offense on this?

>>themers
yes, WP core is one thing, but what more and more people are getting into is the themes, and every single one is different, not to say you know one and suddenly you are a WP developer.

What's going to be funny? so many call themselves developers, while they just have to deal with PHP on a theme basis and WP API, that and JS, now it seems they will have to deal with Node too, more to the soup.
8:10 pm on Nov 29, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 9, 2004
posts:137
votes: 13


Gee, moving to js, what could go wrong? Wordpress is already slow, js will make that worse I'm sure. It will be interesting to see what actually happens here. I'd like to see a cpu monitor track the cost of this stuff on the client side, if it's like most js based website abominations, it's the same old juvenile thinking, that nobody uses tabs, and who cares about performance as long as it looks nifty. I anticipate things that were working breaking. I wonder if wordpress will do that idiotic thing of having multiple third party js requirements, or if they will display some competence and have the js files be part of wordpress.

However this may just be the admin control panel, I use other programs that use js admin control panels, and they are SLOW. Slow. Very very very slow. They are sort of neat, and my suspicion is that this is all that wordpress is going to do, add pointless js stuff to their admin tools to make them do something for eyecandy that they already do. Except now they will do it more slowly.

I'm glad I'm not a professional programmer, otherwise I'd have to disagree with those who, like clockwork, note how much they dislike PHP, but since all I do is non professional yet for some odd reason fairly industry leading website work that happens to use PHP extremely productively, ie, fast delivery of features, very low cost, what would I know? I guess there's real benefits to not being a professional programmer, now that I think on it, you can use good tools without obsessing about something that won't ever matter to the client or end user, so I guess I'll happily continue as a non professional programmer, delivering results, code, etc, year after year.

But what should I call myself then? I'm confused. Something made our industry leading features work, you know the ones, that's the ones that nobody else in the world has running, including billion dollar corporations. And one of our vendors, that's odd, they are also industry leaders, by far the most competent in their niche, they also run php, and their stuff is better than everyone else's. That's really strange. How can that be?

In my odd niche, the hardest part of the job, by far, is the logic. And, oddly, it's always the logic that is the hardest. Makes no difference at all what language it is, it's always the logic. Maybe because what I'm always concerned with is that logic, the language actually has only one requirement, to not get in my way, which PHP has a knack at doing, everything in it just happens to be exactly the way I want a language to do things, that's probably because I'm not a programmer I guess. From the first time I saw PHP, this is what I've thought. Never seen another language that wasn't annoying to me, because they didn't do things the way that a language that has always been written for and by people like me does them.

Could it be that if you ignore these dogmas, and focus on the actual task at hand, amazing results can occur? Might it be.... shudder, that the success of a project has less to do with the language than the programmers? Well, some are clearly bad choices, like Perl, because of how badly they allow you to write code (that can be controlled by strict rules, of course). Hmmm. Maybe a language that makes things easy on the developer and that doesn't dick him around with version breaks that produce no benefit to the client or end users might just be a good idea?

However, since I'm not a professional programmer, and I truly do not care about any of the alleged shortcomings of PHP, because it's never failed me in any project, ie, it's never given me a reason to offer excuses to the clients about why I can't do x or y, or why I need a team to do what I normally do alone, etc, luckily, I can be spared such worries.

One thing I've noted in the invariable PHP bashing is you almost never see what languages are being seriously recommended instead. PERL? Amazon devs would disagree strongly, but what would they know? Python? One asks, what is the actual overhead of making everything an object. Inquiring minds want to know. Plus having no brackets, absurd. So what languages are the real actually superior web development options? Remember, core requirements;

1. respect for developer time, and client money. That means, long periods of deprecation alerts before dropping support for language features. It means carrying along functions that there is no real reason to alter, like string functions having different parameter positioning of say, needle/ haystack.

I'm unaware of any web language in the world, with the exception of maybe sql, that is better at this. Python excluded themselves totally, as I believe has Perl with perl 6. The discipline required to not break things is something that I admire more and more the longer I engage in activities that involve programming (although, of course, I'm not a professional, since if I were, I would of course have my own favorite language that does stuff nobody cares about and nobody will pay me for).

2. Fast. PHP is fast. Speed has never been an issue, so that's not a factor were anyone to point to a language that is technically faster.

3. Easy to develop in. Powerful. No need to install external libraries to create solutions. ie, the language is fairly complete on its own.

So I'm curious, what are the better languages? I'm talking as someone who has maintained code for > 10 years in some cases, code which rarely needs rewrites, and when it does, the warning time I'm provided by deprecation warnings is in the many many years, ie, I can do it when I feel like doing it.

Now, with that said, wordpress has always been a really bad platform, it runs like molasses, but that's the fault of the programmers, not the language. Once its' cached, it's ok, though.

Though they are also the most reliable by far in terms of upgrading, in fact, wordpress is the only software package I don't worry about upgrading because it always just works.
5:27 am on Nov 30, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts: 2678
votes: 90


PHP is not fast. JS is fast. Look at some comparative benchmarks. Client side JS is often slower than server side PHP, but the main problem even there is that things like the control panels you complain about are badly written.

Python code is a lot easier for other developers to read, so it is easier to maintain - and "other developers" includes you a few months later. Python is slow, but in practice most of the heavy lifting is done by C libraries or by using constructs that are efficient in Python (list comprehensions instead of loops, making full use if its wide range of data types etc). There is a fast implementation of Python (Pypy) but hardly anyone bothers to use it (because you get at last equal speed improvements by writing a few bits of performance critical code in C or Cython). Python + Django (which I use) is highly productive and it scales (well enough for Disqus and Instagram to use it) - and scalability is more important than speed, and neither matters for most sites.

PHP has worked out so well for Facebook that they tried translating it to C++ to get decent performance, then gave up on that and developed a whole new PHP like language (that interoperates with their version of PHP) to let them move on from it. They started using only PHP, but now use a lot of different languages: Java, C++, Erlang, Haskell.....

The reasons you give for using PHP seem to boil down to performance (about which you are mistaken), a liking for C style syntax with curly brackets (a matter of taste, or an inability to adjust) and a dislike for using external libraries (which save your from reinventing the wheel and are far better tested than your own code will be).
5:28 am on Nov 30, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Mar 30, 2006
posts:1419
votes: 63


Though they are also the most reliable by far in terms of upgrading, in fact, wordpress is the only software package I don't worry about upgrading because it always just works.

Can't address (and wont) the several ideas posted in the way of agree/disagree, to me, many points are a matter of perspective, experience and personal opinion. And by experience I don't mean "if you know or not", I mean experience as sometimes stumbling upon things that don't work despite knowing how to do things on diff languages. Remember the many times we find on forums solutions that won't work on all cases, (despite many saying I always works as stated on the manual), it's not always true. Just saying, why? because there is one thing and one thing only that catches my mind and posting only about it wouldn't sound good to me.

WP upgrades always working? wow... Been there and having things broken, seeing other stuff broken (not mine) and studying cases. Sometimes things just go bad no matter if you are doing it the right way. And sometimes they just never work as expected. Google search returned 25 millions results on WP broken after upgrade.

[google.com...]

I'm not saying I disagree, just that "not always" works. I've worked on WP, what I don't like is having stuff broken on upgrades, yes it happens and it's ugly.
11:08 am on Nov 30, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2001
posts: 1265
votes: 13


what we are saying is that Javascript is better than PHP, but so is almost everything else.

This sincerely surprises me. Programming language choice is largely about personal preference. You have to know this? With few exceptions you can accomplish whatever you need to accomplish (and do it well) in almost any language.

Some people hate certain languages, while other people love them... but when it comes to the major, mature, languages there is nothing fundamentally wrong with any of them.

PHP has worked out so well for Facebook that they tried translating it to C++ to get decent performance

I'm sorry but that's just wrong. They were going to get comparable performance from any scripting language, and much less from most as benchmarks have shown.

They didn't start moving towards compiled code because of PHP, they did it because compiled languages are faster than ALL scripting languages.

Python is slow, but in practice most of the heavy lifting is done by C libraries

Much like PHP where a large majority of actions are handled by built in functions and objects written in C?

A million language debates over the years have proven that no one is ever right in "what language is better" conversations.
8:30 pm on Nov 30, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 9, 2004
posts:137
votes: 13


IanKelley, thank you for showing the intensely irrational anti php points graeme raised. I don't mind dislike, that's fine, we all have preferences, but to say things that are simply wrong merely expose that all we are looking at is bias, not fact, and certainly not informed opinion. For example, I don't like enforced indentation and no C like features, I find it a pain that gets in my way. I can type, so typing in clear delimiters does not slow my coding down, ie, {};, and if it does, the coder should probably find another line of activity to engage in. Logic is 99% of the problem in real coding cases, and in trivial cases, all languages are similar.

However, given there was no actual response, I have to admit that upon reflection, I started to think about why I like PHP, and I think it's precisely because it allows me produce solutions without having to become an alleged professional programmer, and I suspect strongly that one big reason I can produce such solutions is that I don't consider myself a programmer at all, for me the language is merely a wrapper for the logic, and it's the logic that creates the solution, so the language i want is the one that gets least in my way, and getting in my way is for example breaking all my code in an upgrade. I have better things to do with my time. But then I thought more, and realized, oh, this is that old zen thing, in the beginner's mind, the possibilities are endless, in the expert's, they are few. Since I barely have to think about PHP at all beyond learning some of the slightly inconsistent ways it does things (because, as noted, of their intensely strong belief that when you write code, it should keep working), it's been since day 1 for me the best wrapper for my logic, and for the client's needs. I've never hit a problem where some combinations of php, sql, and other server side scripting languages could not rapidly solve the problem, so there's been zero reason for me to move from php, though I do check into each and every new prospect I find in case someone has finally found a better way.

Since all php functions are c/c++ (I don't know which they tend to use, nor do I care, since php is fast) all he's saying is that scripting language x is the same as language y in this area (no surprise, they all are more or less). He admits python is slow, that's good, since if you make everything an object, that clearly must come as a cost. He ignores the respect for the developers (ie, years of deprecation warnings, and smooth handling of version to version changes, which requires a discipline that only many years can reveal. Python does NOT have that discipline. Period), which he must ignore, because python has a dismal track record on their upgrades breaking things. I have seen even small upgrades, like 2.5 to 2.6, reveal errors in a way I have literally never seen, in one case, python actually took an existing function, or method, I forget, name, and repurposed it, which kicked up errors on 2.5 and made the thing fail. When I saw this, I decided that python was permanently removed from consideration in my tool palette. Should python chose to become adults and create architectures that handle such things smoothly, like php does, and has done, I'd consider it again, but sadly, I need at least 5 years of clear evidence that such a thing is done, and by the time python shows that, I'll be long gone from the coding scene.

Further, as a suggestion, graeme, when your biases make your brain read different words than someone writes, my suggestion is to just stop, and say, I don't like x. Don't make up fairy tales about x that make your bias seem like an objective statement of fact, just say you don't like it and leave it at that. For example, when you say I'm reinventing the wheel etc, you totally misread what I wrote: I said I like all the builtin functions php offers me, which seriously minimizes the number of libraries I have to plugin , each of which is now a point of a failure in future upgrades. In other words, php is such a rich language with so many features that I simply almost never need to use libraries, though of course, I do, when required, classes in this case. SOAP, XMLRPC, all this stuff is builtin. Though obviously you will need to modify defaults when required. But you'd have to actually use PHP to know this. This is why I don't make comments about other languages that I haven't used beyond the things I do know as true about them. This is also known as knowing what you do and don't know, a basic principle of wisdom.

In other words, the dependency issue is largely under my control.

Rather than repeating more nonsense, why not read about Hack, the PHP derived language of facebook.
[fastcolabs.com...]

"It has been specifically designed to interoperate seamlessly with PHP," says Verlaguet, the technical lead on the Hack project, whose background includes a mix of formal academic study of programming languages and industry experience.


I realize that the notion that the developers of php tools tend to care A LOT about existing code bases, which translates to a deep and fundamental respect for the time of developers (a respect that is sorely lacking in most languages in the world now) makes certain of these concepts very hard to grasp if you are using a more 'modern' language that has no qualms about screwing you over randomly with little warning, but the more I do this type of work, the more deep my respect and admiration grows for those very few places on in computer landscape where my finite time and energy is actually respected as a core component of language design and implementation over time. And it is this that makes PHP continue on as the by far and away most dominant language on the web. And that's why if I raise this point, it's always ignored, because no other group has this much respect for its users. And if one does, let me know who it is. It's not python, it's not perl. I don't know about ruby, it may or may not be. I never use it or see it, so no idea.

I've read some of the more stupid but still commonly linked to criticisms of php, the one by the perl guy who clearly simply could never accept that php fixed perl, and by fixing it, that means the flaws of perl that made normal users dislike it were corrected, and the language normalized and made accessible, which is why PHP took off like a rocket on introduction. I think of php as fixed perl, I always have. And I believe it's one big reason Perl 6 took so long to get done, the real developer mind hours were grabbed by php years ago, that's the language developers, until basically very few people cared about perl anymore.

I've put timers on PHP driven forums, and I can tell you, that code is FAST. Not just slightly fast, mind you, it's stunningly fast. Most of the speed issues you see come from bad database schemas, and sloppy handling of those types of things (I have a backend tool written for a client that takes 10 to 15 seconds to generate a report because of the sql, NOT the php. Since it's just a backend tool nobody cares about that delay). And PHP 7 is supposed to be even faster, and not just slightly, I don't remember exactly, I think it's in the order of 2x faster. [zend.com...] yes, it's 2x faster, and 30% less memory use. And PHP was already super fast. This is what ongoing incremental improvement looks like, and good language design. Doesn't require breaking stuff like python 3 did, just makes it better. Who else does this? Most of the databases, MySQL, MariaDB, PostGRE do good incremental adult improvement because you are not allowed to break data in the real world. XFCE4 is doing that, as do most of the light weight window managers in *nix land, but NOT the bloated ones. Who else? Very short list. Shell languages do it. Does C do it? Go promises to do it, explicitly, though only within major versions.

I've read a bit about the facebook Hack php. Some of that logic is in php 7 from what I understand. I do understand why people who want to blindly criticize php have to find ways to ignore facebook, no matter how irrational. I really like the facebook ideas re php, particularly forcing typing etc, but these can actually be done now, since that is all free software, ie, opensource, if it's a big deal to you. All my code will work on php 7.

All huge sites are going to move certain things into C / Java etc, as they discover areas of optimization, that has nothing to do with the languages used, google always did that, though they generally were more honest about their use of python than most, they considered it merely a prototyping language, once the feature was ready for prime time it would get rewritten, probably now in Go, which is itself an interesting language, but one that is designed for large computing environments, ie, it's a language designed to handle the random bad behaviors found in large groups of programmers hired every year, and is very clever in that area.

So python is a huge fail for long term maintainable code, and doesn't take upgrades and the reality of long lived code bases seriously. That is why I excluded python from the options I would consider. Neither I nor my clients feel like engaging the cost in time required to run a slow language, since it offers essentially no benefit to either the client or the end user.

explorador, I'm sorry, I should have been more precise: wordpress when competently themed, and void of the putrid pile of extensions and incompetently done extensions plugins and vile themes that can only break on any upgrade, that is, a clean well run wordpress, is actually one of the easiest to upgrade software packages I've come across. However, while in spirit this is true, in fact, the scenario of badly done wordpress is the overwhelming norm, so in fact, you are right. But you can in theory make wordpress pretty good, IF you use it as it was designed to be used, as a blog, with a real theme. This if is so uncommon that you can safely say that in fact, upgrades of normal wordpress installs can be lethal. This is why I refuse to work on anyone's generic wordpress site, for any amount of money.
8:22 am on Dec 1, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts: 2678
votes: 90


This sincerely surprises me. Programming language choice is largely about personal preference. You have to know this? With few exceptions you can accomplish whatever you need to accomplish (and do it well) in almost any language


There are many good languages, but not all languages are equally good, and not all languages are good for the same tasks. Look at the Facebook technology stack and imagine implementing the stuff written in Erlang in PHP, or directly writing the PHP bits in C++ (not compiling PHP to C++, which they tried, but actually writing it in C++).

In the particular case of PHP, it has only ever really been useful for web development. Apart from the flaws in the language design [eev.ee], I am a proponent of using frameworks, especially full stack frameworks. Wordpress would not have the flaws discussed above if it had been built on a framework. Is there a PHP framework as good as Django or Rails? When you compare language + framework rather than just languages in a vacuum, PHP seems a pretty poor option.

I am currently learning Haskell partly because it is as different from Python (the language I have been using for most things for the last few years) as possible - statically typed (with an amazing type system and inference), compiled, purely functional, and lazy. Other languages I know are also very different from Haskell so it extends my tool set a lot by because it is likely to be good at the tasks that what I know already will be bad at.

I'm sorry but that's just wrong. They were going to get comparable performance from any scripting language, and much less from most as benchmarks have shown.


I agree with you (except that I am not sure about the "much less than most" bit). I am not saying PHP is particularly slow, I am disagreeing with lizardx's claim that PHP is fast (and, in particular, that using JS will slow Wordpress). JS has had a lot of resources thrown at its performance, and it is now fast. I would be surprised if the Node backend for the new admin is not significantly faster than equivalent PHP code. The front end may be slower at some things, but if it generates less network traffic it may feel more responsive, which matters more.

Much like PHP where a large majority of actions are handled by built in functions and objects written in C?


Exactly. My point is not that Python or JS is faster than PHP, but that raw language speed is usually unimportant so lizardx's claim that PHP is fast would be irrelevant even if it was correct.

[edited by: graeme_p at 8:53 am (utc) on Dec 1, 2015]

8:40 am on Dec 1, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2001
posts: 1265
votes: 13


I'd say that before node.js became popular PHP was the fastest mainstream scripting language (in part because so many of the things people use it for are covered by built in functions).

But you're right, node.js is now dramatically faster.
9:12 am on Dec 1, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:7771
votes: 530


Sysadmins: within around the next 24 to 48 hours, watch out for an upcoming update to node.js to cover off a couple of vulnerabilities.

The most serious, CVE-2015-8027, is a remotely-exploitable denial-of-service (DoS) bug that the node.js Foundation is keeping embargoed until the patch is issued.

The DoS bug affects all versions of v0.12.x through to v5.x, but not versions 0.10.x.


[theregister.co.uk...]

As with anything that changes core value, others will target. ... and JS of any kind is always under target, as well as php, python, etc.
9:23 am on Dec 1, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts: 2678
votes: 90


A lot of other languages have become a lot faster too. The distinction between scripting languages and others has become blurry too (because scripting languages with optional typing, dynamic compiled languages, JIT compiled scripting languages etc. have become more common).

I edited my comment (after your last reply) to mention frameworks. I think the existence of frameworks makes a big difference: among other things they reduce the value of PHP's built in functions, because the frameworks add functionality that matches the range (although probably not the performance) of PHP's built in functions and they do a lot more besides. If you use a PHP framework to match that, then you lose the performance advantage.
4:41 pm on Dec 1, 2015 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8509
votes: 228


The distinction between scripting languages and others has become blurry too (because scripting languages with optional typing, dynamic compiled languages, JIT compiled scripting languages etc. have become more common).


Plus opcode caching and things like memcached
[en.wikipedia.org...]
[en.wikipedia.org...]

Not to mention Redis, Squid, reverse proxies etc etc that blur those lines. Of course I'll bet the average Wordpress install has none of those running.
4:46 pm on Dec 1, 2015 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8509
votes: 228


Didn't realize that OPcache is now bundled with PHP by default beginnning with PHP 5.5.
[php.net...]
5:31 pm on Dec 1, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Mar 30, 2006
posts:1419
votes: 63


The thread is becoming more a PHP vs X-script-language-option in speed and other features, I think it's valid but we can find mixed "tested" results on speed and performance made by people experimenting on the web, or putting those to the test. So yes it's kinda valid but going on diff directions.

To me, what makes this move (and future potential moves) tricky and perhaps scary is: at first you depended on PHP only and Mysql. Ok and some cache stuff. So, usually any change on PHP would possibly mean adjusting some PHP stuff on your server. To put it differently, WP ecosystem faces what other tools have been facing: "hey dudes, my config is not working". And then a lot of people asking "what version of PHP do you have? what version of cache module? what driver?".

Now add to that NODE and perhaps in the future more stuff, this means more stuff to monitor. So, "sometimes" I prefer a tool that only has the JS running on the client and the *whatever* running on the server, less stuff to check, configure and test.

@lizardx: explorador, I'm sorry, I should have been more precise: wordpress when competently themed, and void of the putrid pile of extensions and incompetently done extensions plugins and vile themes that can only break on any upgrade, that is, a clean well run wordpress, is actually one of the easiest to upgrade software packages I've come across. However, while in spirit this is true, in fact, the scenario of badly done wordpress is the overwhelming norm, so in fact, you are right. But you can in theory make wordpress pretty good, IF you use it as it was designed to be used, as a blog, with a real theme. This if is so uncommon that you can safely say that in fact, upgrades of normal wordpress installs can be lethal. This is why I refuse to work on anyone's generic wordpress site, for any amount of money.

YES. I find your words hitting the nail on the head in many diff ways simultaneously. No offense intended to WP or WP-developers, but it's a blog software that mutated into a CMS-kinda-like... it's not bad itself, the problem is, the core tools are specific, the plugins were not born there so there is no guarantee it will work. It's like buying non branded replacement parts for your car, can work, and sometimes won't. It's a good tool (some will frame my words!), not it's not rare to say it, it's a good tool but extra stuff around WP has grown kinda out of control.

Coming back to my previous words, sometimes I just can't avoid using third party tools (not talking about plugins or WP), I mean any kind of web app. And I put a lot of attention of how many stuff that software has. Pure PHP, just like pure PERL, or pure ASP or whatever means less work, but when it's ASP + PHP + NODE + JS-client-side + etc... I just seek another path. So, getting node on WP doesn't only means "developers" having to mess with it, it also means extra checking, extra configuring, etc.
6:05 pm on Dec 1, 2015 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts: 2678
votes: 90


Now add to that NODE and perhaps in the future more stuff, this means more stuff to monitor


But you do not have to use this, it will remain option for the foreseeable future. I dislike having too many "moving parts" too, but it is becoming quite common for Node (and some other things) to be used like this for a variety of reasons: so you can render the same templates on server and client, so you can keep large numbers of connections open, so you can use websockets... and your main platform does not support it. There may not be a better alternative.

I can see a lot of potential benefits. A WP REST API that could also be used by native client WP admin interfaces. A WP admin front end that could work with other CMSs that emulated the WPs API.

It's a good tool (some will frame my words!), not it's not rare to say it, it's a good tool but extra stuff around WP has grown kinda out of control.


But if you are using WP as CMS (rather than as just a blog) then you need that extra stuff - it is huge range of themes and plugins that makes Wordpress attractive. The problem is that WP was never really designed to be a development platform but mutated into one. Just about anything that was designed from the start to be a development platform be a better development platform and will have a smaller but higher quality choice of plugins etc.

pure PHP, just like pure PERL, or pure ASP or whatever means less work


Why not a decent framework? Less work then either a CMS or code in pure whatever.
7:32 pm on Dec 1, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Mar 30, 2006
posts:1419
votes: 63


True and right, and this is perhaps the most sensitive point:

The problem is that WP was never really designed to be a development platform but mutated into one. Just about anything that was designed from the start to be a development platform be a better development platform
This 36 message thread spans 2 pages: 36