10 ms·
Building a better WordPress
- mizzao 11y agoInstead of making the whole REST API, perhaps we could consider using something like Meteor (or at least offer ways to skip the API altogether in favor of some other mechanism.)
- xj9 11y agoCouldn't you build something like that on top of the REST API?
- mizzao 11y agoYou should check out how Meteor (https://www.meteor.com/ https://www.meteor.com/) works. It makes REST pretty much unnecessary.
- detaro 11y agoBut then you don't have a nice REST API to integrate with different things anymore (authoring tools. exporting tools. frontends for devices that don't like meteor. ...) IMHO tying itself to a single front-end technology would be the totally wrong thing to do.
- jorjordandan 11y agoMeteor is not tied to any single front end technology, nor is it a front end technology. It has an optional templating system, but lots of people are using react now instead. I love meteor, but using meteor with wordpress sounds like a nightmare. I think it was probably suggested more as an alternative.
- detaro 11y agoOk, then I got that wrong. Meteor apps always seemed incredibly coupled and integrated to me, so I assumed it was one "package".
- coldtea 11y agoThe things people want to us WP for are totally unrelated to the things Meteor is good at.
- rmccue 11y ago> Instead of making the whole REST API Luckily, we've already made it. :)
- joeyspn 11y agoI think you meant implementing Meteor's DDP protocol and not the whole Meteor? https://www.meteor.com/ddp https://www.meteor.com/ddp
- jordanlev 11y ago> The WordPress admin interface is it one its best features, and provides a clean and elegant way of viewing and managing data lol
- d2xdy2 11y agoWhile not saying I whole heartedly agree with that statement, the admin panel is a major selling point.
- pbowyer 11y agoAnd yet I've never had a client say they like it, or find it easy to use. Neither did they find Drupal any better, but they have found other options easier to use.
- d2xdy2 11y agoI wouldn't necessarily take client praise as a testament to being good or bad. When I started out I was pushing WP sites; I usually gauged things by complaints (very similar vibe to when I was working on cars). I have had very few calls / emails about complaints with the WP admin area, though I do/did generally drop them into a less privileged account with less flashy buttons to break things with, as well as set their dashboard up with some notes about how to accomplish tasks specific to their usage (how to post / edit / delete, how to clear the cache manually if they had to, etc). I might be in the minority there, and I feel like that contributed a bit to the no-complaints thing... but even a vanilla WP admin area is very usable.
- angelofm 11y agoI would be interested in finding what those other options are, in all my career I never had any client tell me a CMS it's simple to use.
- d2xdy2 11y agoWhy is that? Getting the CMS out of their way is one of the primary reasons they outsourced development (or implementation, or whatever) to someone else (agency, freelancer, whoever). If what they're using day-in and day-out is in their way or not "simple to use", its hindering (to various degrees) their progress in doing what they want to do. If I make a website for a musician, they want to probably publish musician / band related stuff and go on making music; if they're having to figure things out or call me every time they log in... I've done a very, very bad job at giving them what they need. I can't say I've ever had a client comment to me that the system was difficult / non-obvious, especially when using WP (even the first few I pushed that used almost vanilla WP admin).
- wadetandy 11y agoThe biggest problem I see with the proposed solutions at the bottom is that the author arrives on the two node-based solutions as the preferred path forward. The reason Wordpress has become so successful over the years is that even the least expensive hosting provider has mod_php installed and you merely have to drop your installation files on the server via FTP. This is easy enough for many less technical people to accomplish. Node, ruby, and the like typically require more advanced and expensive hosting solutions, in my experience. Of course I haven't used any of these cheap hosting solutions or setup a Wordpress site in a couple years so I might be out of date on the state of things.
- rokhayakebe 11y agoRe:PHP. That's, this is why Wordpress won on the web.
- ac29 11y agoThe host I have a few business wesbites on supports Node, Ruby, PHP, Python, Redis, Memcached, MySQL, and MongoDB on all of their hosting packages except the very cheapest one. I think I'm paying like $100/year, although these are small/low traffic sites so I dont need or get a lot of disk or bandwidth. Then again I went out of my way to find a good host after dealing with so many terrible ones.
- servercobra 11y agoYeah, I was with him up until that point. That's a huge negative, and something that could be avoided very simply by using a framework other than React.
- onion2k 11y agoThat's all true, and there's no reason why Wordpress couldn't continue to service the users who want a simple solution for setting up a website ... But that doesn't preclude creating a new solution for professionals setting up websites for other people that's based around modern techniques and languages. The fact that Wordpress is used by developers setting up a CMS and being paid thousands of dollars for it is what could be improved upon.
- 11y ago
- et1337 11y agoI've been building and iterating little toy CMSes for years, each one a little better. Current version pros: - SQLite makes deployment and backups a breeze. I can also copy the SQLite file to create two versions of the site: "draft" and "live". Hitting "publish" syncs them. - From the developer's perspective, it's just a regular Python app, except you can insert user-editable elements into any template. - From the user's perspective, you can edit stuff right in the page. Works fairly well. Two big hurdles remain: - I rely on medium-editor[1] for in-page WYSIWYG editing. It's the best open source solution I've seen, but it's still horrible. Generates crap HTML[2]. - For major layout changes, the developer has to create a new template with placeholders for content creators to fill in. Ideally, developers would create building blocks that creators could then drag and drop in to place. [1] https://github.com/yabwe/medium-editor https://github.com/yabwe/medium-editor [2] https://twitter.com/etodd_/status/644898235836989440 https://twitter.com/etodd_/status/644898235836989440
- chrisacree 11y agoHave you tried Scribe editor? https://github.com/guardian/scribe https://github.com/guardian/scribe I've found it has better HTML output than medium-editor (though still not perfect) and has a more flexible design, though it requires a bit more developer involvement to get up and running.
- PebblesHD 11y agoI took this same route after trying to make a site with (an older version of) wordpress. My current version has everything I need for most of the websites I make, dynamic content, 'blog' style posts, comments integrated, analytics, and most importantly the actual page code is really clean. +1 for putting in the effort
- evunveot 11y agoHave you tried the "inline" option in TinyMCE 4? Basically you just give each editable element on the page its own, independently configured TinyMCE instance. TinyMCE's markup output is probably as good as it gets. http://www.tinymce.com/tryit/inline.php http://www.tinymce.com/tryit/inline.php
- cjbarber 11y agoIronic that this is posted on Medium.com. I expected an humorous article about Medium being the better WordPress. I think Medium might just be the better WordPress (for most, not all).
- rokhayakebe 11y agoMedium is a a blogging platform. Wordpress is a CMS. Medium is not a better WP, it is a better group blogging product, one of the many ways you can use WP.
- juhq 11y agoWordpress started out as a blogging platform. Who knows what Medium will be in ten years.
- wodenokoto 11y agoI have never build a Wordpress theme using jquery. What is he on about?
- coldtea 11y agoFirst, you might very well be an outlier. In which case, what you did or did not doesn't matter at all with regards to WP. FWIW, tons of WP plugins and themes (professional and popular free ones) use jQuery. Second, WP used jQuery itself in the management interface, which is actually what he was on about.
- mbesto 11y ago> Yet again, the RESTful API comes to our rescue. Thanks to its simple JSON output, we’re able to use JavaScript to its full potential, using ReactJS or AngularJS to craft beautiful and fast front end experiences, taking advantage of many of the new HTML5 browser APIs that have become available over the past few years, including localStorage and more recently, service workers. Even better, we don’t have to use jQuery. Can someone explain to me why using a front-end javascript framework for entirely static content would be a sound idea?
- voltagex_ 11y agoI wish I could just use the same APIs to dump out static pages to host on something like GitHub pages. External JS could take care of the stats (for the few users who don't block it)
- detaro 11y agoBecause that's what the cool kids use. /s I think a good API would be great to have for a CMS (and one could or maybe even should run the normal frontend of it), but not for this reason. EDIT: And if you build non-standard-CMS apps on top of or using data from the CMS, then you could use React or whatever and the API.
- darylteo 11y agoIt's just an example. I would never say anything is never a good idea... there just needs to be specific conditions that would require it. Hypothetically simple scenario could be running WP as user management, and i18n translations, for a single page application. For the most part, I can imagine a node.js application layer that simply interfaces with wordpress api in the back. WP can be upgraded as and when needed, and the frontend application isn't tied down by clumsy php templating. A separate api with oauth and token authorization could be layered on top for mobile applications. This is looking towards making wp more open to developers in other ecosystems (an area which is considerably lacking other places like .Net. Umbraco? Sharepoint? ew)
- wmil 11y agoI used to use a mobile RSS reader that was just a phonegap app. It was useful for downloading reading for my morning subway ride. Cell service on the TTC has been long project filled with fail. In general I expect that it's not the best solution. But look at projects like turbolinks. JS replacement is quicker than a full page reload.
- kijin 11y ago> the dependency on PHP can turn many developers away from using it Well, that's going to be the same no matter which technology you choose. The dependency on ReactJS is also going to turn many developers away from your proposed changes. Why turn away? Here's a possible reason: Instead of generating perfectly valid and semantic markup that can be understood by all clients from Lynx to Chrome as well as search engines, you want to turn every blog into a single-page "webapp" where the markup only contains some empty placeholders and all content is rendered separately by a hefty JavaScript framework. No, thank you. One thing I'm absolutely flabbergasted about is that we as a community have spent the last 10 years trying to get everyone to serve valid semantic markup, only to throw it all away. This tastes just as vile as using tables everywhere. There's a time and place where JavaScript MVC frameworks make sense. A blog ain't one of them. Even Medium is barely tolerable nowadays -- I am often forced to use the Reader View in Firefox to get rid of all the junk that Medium throws into every blog post. Please, please keep that junk to yourself. Don't pollute my precious WordPress with it.
- Hytosys 11y ago>One thing I'm absolutely flabbergasted about is that we as a community have spent the last 10 years trying to get everyone to serve valid semantic markup, only to throw it all away. This tastes just as vile as using tables everywhere. Using a DOM manipulation engine does not disqualify the developer from producing perfectly semantic markup.
- kijin 11y agoSure, but that beautiful markup only exists inside the Developer Tools of modern browsers, and only thanks to several megabytes of scripts that waste my time, data, and battery. Good luck loading that page with whatever the most popular browser is in 2040, or on archive.org if the original website has long disappeared.
- Hytosys 11y agoYou believe that HTML won't be deprecated by 2040, but JS will? You also believe archive.org won't make an effort to store JS files within that timeframe? The reality is that the modern web depends on JS, and the argument of deprecation won't change that anytime soon. We're moving forward, not backward. On a technical note, there is quite some effort in rendering React/Angular apps on the server in case it's serving an outdated browser. Edit: just realized that of course storing JS files isn't the solution to archive.org's challenge, it's storing server responses.
- Implicated 11y ago> the dependency on PHP can turn many developers away from using it That's interesting, as most people claim PHP and the army of developers that come with it, is a major factor in WP's domination of the CMS market. If WP had initially been developed in Python, perl or anything not named PHP would it be the dominating force it is today? (Honest question, I don't presume to have the answer) I'm a PHP developer, I hate working with WP but this whole article had me scratching my head asking "what? why?". This isn't 'fixing' wordpress, the author is essentially building a spec for a new/different CMS that isn't dependant on WP. There's lots of those not named Wordpress.
- redwall_hp 11y ago>If WP had initially been developed in Python, perl or anything not named PHP would it be the dominating force it is today? Most of the solutions around at the time were perl, including Movable Type, which was the WordPress of the time. The only reason anyone went with WordPress was because the MT developers jacked the price up, and WordPress was free at the right place/time.
- pp19dd 11y agoMT was fairly clumsy in some ways by comparison to WP, though my use of the word is very questionable. Updating templates was always a pain because we'd want to update a sidebar widget, and it would take hours to have that change reflected (regenerate all pages statically) because we had a legion of prolific writers and they churned out tons of content throughout the years. By comparison, WP was dynamic - change instantly reflected. Of course, that difference had its disadvantages - you had to make sure WP traffic didn't melt the server(s), optimize for the traffic, then finally give up on caching strategies after traffic growth overwhelms conditions, and upgrade to a CDN to basically imitate a static site you were avoiding. In some ways, we're making a full circle in blogging technology (and web in general), but here's a major WP disadvantage at this moment in time: it might take 32MB of ram to generate a 3kB page.
- wizzzzzy 11y agoI find one of the quickest and easiest ways to greatly improve working with WordPress (in my opinion) is to just install the timber plugin. This allows you to write template files in twig and does a good job of cleaning up the mess of HTML weaved into 'the loop'.
- EGreg 11y agoLet's face it. Wordpress works because of the themes. Hire a quasi developer to set it up for you with plugins, and they will find a nice theme to install. And the result - the end client WHO PAYS will get a visually nice site! Especially responsive themes. Take note, folks... theming and designers are crucial to your platform if you plan it to be used by a significant number of websites.
- aendrew 11y agoCouldn't agree more. Somebody above mentioned Drupal, which is also a widely-used PHP-based CMS, but (IMO) far superior to WP (Comparing the two communities is night and day — when I published my first Drupal module, I got hours of community support and released something that was high quality and reviewed by a member of the security team. With my first WP plugin, the most code review I got was somebody who ran it through a linter). Alas, theming Drupal is awful (especially if you're a designer who's invested in learning WP theming); my personal opinion about why it's never gotten anywhere near WP's market share is largely (largely!) due to the lack of themes.
- Silhouette 11y agoThere must be more to it than just themes. Sites like Svbtle and Medium rose to prominence pretty quickly and attracted significant numbers of contributors, despite very much trying to build their own brands as a blogging platform with a recognisable style in each case. Themes definitely help with the target audience WP is going for, particularly now that it's trying to be a CMS and not just a blogging platform. However, it seems likely that being PHP-based, and therefore easy to install on almost any cheap hosting even from many years ago, helps; plenty of hosting services would even provide ready-made WP installations. Being the de facto standard option also helps a lot in terms of building your community and ecosystem, and WP was the dominant blogging platform for almost an eternity in Internet time.
- bad_user 11y agoBemoaning WordPress for being built in PHP, then proposing something built on top of Node.js and Angular. Now I've heard it all.
- tilt 11y agoWhile I'd LOVE WordPress to be run on Node, don't forget FB runs on PHP, and they're investing in React. https://github.com/reactjs/react-php-v8js https://github.com/reactjs/react-php-v8js
- rmccue 11y agoSide note: we started the process of getting the REST API merged today: https://make.wordpress.org/core/2015/09/21/wp-rest-api-merge-proposal/ https://make.wordpress.org/core/2015/09/21/wp-rest-api-merge... (Feel free to ask questions if you've got any :) )
- gmays 11y agoThis is awesome, nice work and good luck ;)
- pbowyer 11y agoCongratulations, that's great news! What is the documentation status, as http://v2.wp-api.org/ http://v2.wp-api.org/ has a lot of gaps?
- rmccue 11y agoWe're working on it; meetings just started two weeks ago on our new documentation efforts: https://make.wordpress.org/core/2015/09/07/wp-rest-api-v2-docs/ https://make.wordpress.org/core/2015/09/07/wp-rest-api-v2-do... We've been short on time in the past, which is why our docs aren't up to scratch. Fingers crossed we'll get that sorted very soon!
- voidr 11y ago> the dependency on PHP can turn many developers away from using it. the dependency on <chose your programming language> can turn many developers away from using it. > Almost all interactive elements are built using jQuery, which, while a great library in many respects, is weak in comparison to many of the emerging front end frameworks we have today — ReactJS, AngularJS and others. Weak? what does that even mean? Also the author is horribly confused because he compares a library with two frameworks. Calling jQuery weak in this context is like calling C weak in comparison to Java, however, I would still prefer to write my operating system in C thank you very much. > I’ve already mentioned using localStorage as a mechanism for providing caching in front end apps, ensuring content is loaded quickly, avoiding ugly loading screens and flashes of blank content, but this only goes so far. As ReactJS (and soon AngularJS 2.0) can be run on the server as well as in the browser, we can pre-render the initial page load for the user on the server, and then hand-off all future content and navigation requests to the browser. You solve a problem that you introduced in the first place. I'm surprised I don't see MongoDb mentioned anywhere in this article. Wordpress is a pretty terrible platform to work on as a developer, however introducing trendy technologies will not make it any better. Ironically JavaScript is more similar to PHP than a lot of people care to admit: * JavaScript, just like PHP was not designed for what people are using it for today * JavaScript, just like PHP is riddled with bad legacy * JavaScript, just like PHP is trying to evolve to escape from that legacy and become more like other languages. The fact of life right now, is that PHP and MySQL are well understood technologies, countless web applications in production are using them, the same cannot be said for NodeJS and this has real world consequences, because running a NodeJS app on your laptop is totally different from running it in production. On a standard Ubuntu machine, having a production viable PHP installation is 1 apt-get install away and I get: web server set up, error handling, logging and a standard way to customise the system wide configuration. With NodeJS, I have to worry about restarting it if it fails, logging the error, handling them, configuring the web server etc. I find that people who criticize PHP, have no clue on what makes it so popular.
- mschuster91 11y agoWhat the author wants can be done way more efficiently with Drupal and its AJAX, not to mention that Drupal's data and template management is far better than Wordpress'. Downside with Drupal is that it ships with a stone-age version of jQuery, which sucks if you want to use any modern jQ plugin. Also, Drupal mixes config and data in the database, making proper separation of live/stage/dev a PITA.
- pmlnr 11y agoSure, dude, let's make a theme which is unusable with JS off. Also known as: instead of plain HTML let's complicate things as much as we can.
- deleted 11y ago[deleted]
- PythonicAlpha 11y agoI thought, WP was successful, because it was easy to deploy and easy to use ... and not because all the newest cool things where included ...
- matthewrhoden1 11y agoWhen I started to play around with Node and learning about NoSQL, this was the first thing I thought of. I knew this was going to happen.
- reustle 11y agoSure, this looks like a cool project, but good luck getting a bunch of non tech people to install node on some server. PHP is just too dead easy. What might be a good first step is to create a plugin for wordpress which creates these same rest endpoints and then replacing the frontend entirely (has been done before). Then, allow the backend to be swapped out with wordpress, this, ghost, whatever.
- wangii 11y agoSeems nobody cares about this question: what's the target market?