Live data from Hacker News

The Whole of WordPress Compiled to .NET Core and a NuGet Package with PeachPie

hanselman.com

21–30 of 102 posts

Re: The Whole of WordPress Compiled to .NET Core and a NuGet Package with PeachPie

#21
post #13

Earlier quoted context omitted.

Do you have any examples of the bad practices you are referring to?

Probably the use of globals etc. This might also be a backwards compatibility thing though.

Developing anything for wordpress is a nightmare, it's not only PHP-nightmare, but also plenty of bad practices, poor API, wired workarounds...

Re: The Whole of WordPress Compiled to .NET Core and a NuGet Package with PeachPie

#24
post #17
post #3

It would be amazing if they rewrote wordpress in C# using modern design patterns.

One of the major selling points of WordPress is its huge array of 3rd party plugins. You'd need to port the most popular ones before the C# version got any traction. How's Linux for .NET hosting? Because Linux hosts are generally cheaper than Windows hosts.

I've been having great luck with ASP.NET core / nginx. Very stable, low overhead with 40k req/sec served in a ubuntu VM. I hate MVC, so I've been using Nancy (Sinatra based) as the web framework. I'm highly confident in .NET Core being production ready.

Re: The Whole of WordPress Compiled to .NET Core and a NuGet Package with PeachPie

#25
post #7
post #3

It would be amazing if they rewrote wordpress in C# using modern design patterns.

You could take “C#” out of that sentence and still be accurate. Wordpress is not and I imagine never will be anywhere close to “modern design patterns”. It’s not even close to old design patterns, unless Heinz has a namesake software design pattern. Wordpress uses practices that were considered a bad idea a decade or more ago, and still refuses to change.

You can also take "modern design patterns" out of that sentence and still be accurate. Its usually just a form of cargo-cult-programming that hasn't been found out to be terrible yet.

Re: The Whole of WordPress Compiled to .NET Core and a NuGet Package with PeachPie

#26
post #7
post #3

It would be amazing if they rewrote wordpress in C# using modern design patterns.

You could take “C#” out of that sentence and still be accurate. Wordpress is not and I imagine never will be anywhere close to “modern design patterns”. It’s not even close to old design patterns, unless Heinz has a namesake software design pattern. Wordpress uses practices that were considered a bad idea a decade or more ago, and still refuses to change.

For clients and writing actual content nothing beats Wordpress. The editor is great and a lot of people have used it before so, from a developer point of view, I believe that with Wordpress you should give people what they want. The alternative of demanding they use some 'better' CMS means that the content never gets written or updated.

However, not to disrespect the work that has gone into Wordpress, how hard can it be to write something better for the frontend and get marketplace adoption?

I do not like the frontend 'coding standards' and mess of plugins. Starting straight from the raw wp_ mySQL tables is a less insurmountable task than hacking some theme and bloating it out with 'jQuery' plugins that should never have been plugins. It seems that it is the ecosystem of design agencies with their lorem-ipsum big-up-front-designs and allegedly 'agile' workflows that have made Wordpress into something I do not like working with. Particularly when the add-ins make the backend far removed from sensible, making it a nightmare CMS for clients.

Hasn't anyone written a decent frontend for it that is not a tacky theme with ten thousand lines of CSS of which 97% is not used and a megabyte of scripts to get the carousel and share links working?

Re: The Whole of WordPress Compiled to .NET Core and a NuGet Package with PeachPie

#27
post #4

Earlier quoted context omitted.

Decompile the resulting library and start refactoring and adding comments?

Why would you start with a decompiled binary when the source code is available?

Because then you don’t need to look at the source code

Re: The Whole of WordPress Compiled to .NET Core and a NuGet Package with PeachPie

#28
post #4

Earlier quoted context omitted.

Decompile the resulting library and start refactoring and adding comments?

Why would you start with a decompiled binary when the source code is available?

Because he is trying to sound like he has a clue, lol.

Re: The Whole of WordPress Compiled to .NET Core and a NuGet Package with PeachPie

#29
post #22

Can this solve the Wordpress security nightmare ? are we going to see hosting services built on PeachPie in the near future ?

The bulk of WP security issues stem from the 'writable file system' defaults that many plugins (and, to some extent) core either expect or encourage.

I can't say all, but the huge bulk of security issues I've seen revolve around some exploit which ends up writing a new file, or overwriting an existing file, which is then publicly accessible. If your file system is not writable, the large majority of WP exploits go away. However, you lose the "press here to upgrade your entire site and all the plugins in one easy step!" functionality, and the "upload files via the browser" ease-of-use.

If you're truly modifying public media files on regular basis, a non-writeable file system kinda stinks (either make the FS writeable or use an external media host, which adds complexity and cost). MOST systems I run in to aren't doing this often - it's "put up the site and updates some pages every few months" (or, blogging, which is often just text). For these, I recommend turning off write permissions to the whole of the WP system, and periodically turning it back on to do updates, then turning it off again.

Yes, this doesn't cover 100% of exploit cases, but nothing does, and I've found this to go a moderately long way to reduce the impact of various exploit attempts.

So, to answer the question, I would say "it depends". If the .net hosted version also by default allows for writeable media that is also executable, then there would be problems. However, I don't expect a .net-based system would allow you to get a ".aspx" file in a publicly accessible URL and have it just execute when accessed (unless there's some deployment mode that would allow for that?)

Post reply on HN