Don’t break the web or why html is important

I am a member of the advanced WordPress facebook group and its seems every few days someone posts and article on there waxing lyrical about the latest javacsript only theme they have built using the latest JavaScript framework and the rest api.

Dont get me wrong, I love javscript, and I think the rest api is one of the best things to happen to WordPress but every time I read about someone usea front end framework to build a theme I shake my head.

A wise man once said,

just because you can doesn’t mean you should

This applies to so many things, especially JavaScript when used to output content.  In order to explain we all need to be reminded of the way the web is traditionally designed namely:

  • HTML for con­tent
  • Css for pre­sen­ta­tion
  • Javascript for func­tion­al­ity

This combination might seem old hat but it was created by smart people with good reasons.

When done properly it has three major strengths

  1. It conveys meaning
  2. It is robust
  3. It has a clear separation of concerns

However it can be slow so today many advocate using JavaScript to interract with apis to replace this traditional paradigm. This has  major advantage in that can be substantially faster as the client side javascript can request only the information that it needs. However it also means that javascript is now the creating the content as well as the providing the functionality

However lets just compare how this compares to the traditional approach. Namely:

Conveying meaning.  Yes javascript can convey an experience that may be indistunguishable to the eye BUT the web is not just a visual medium for humans. Machine like search engines, and screen readers are important and in most cases a javascript front end is invisible to these agents

Being robust. Javascript is a not a fully standardized lanaguage and is notorious for conflicts and errors, and being browser depe3ndent. So an error on a javascript front end usually means the whole site falls over. In contrast a traditional semantic html front end degrades gracefully

Separating concerns. In a JavaScript front end you are tightly coupling functionality with content and potentially presentation as well. This actually if you change the api or you change your javascript the whole thing falls over. In contrast html is html and if the JavaScript stops working you still have the html.

Javascript is important but its not a replacement for html. Its future is in rproviing functionality, both in enhancing the reading experience and in making the eually important area of creating, updating and deleting content on the web.

Finally I’d like to urge you that is you need speed work on the basics like http caching, or look to modern technologies like http/2 and service workers.

Introducing LH Archived Post Status

LH Archived Post status is a WordPress extension that creates an additional posts status available for content that may no longer be relevant to most visitors but should be available publicly (perhaps for historical purposes).

I built this plugin as UI needed this flexibility whilst using WordPress as a CMS. The plugin adds a new post status that enables posts and pages (and custom post types) to be archived. Archiving in this context means that the content is still publicly available but is not published on the front page of the site or the feed. I was not satisfied with other archiving solutions which hid the content for all non logged in visitors and was not configurable.

Continue reading

WordPress development is apathetic

There has been a lot of discussion that WordPress is becoming less user friendly and indeed it has got some traction as the recent WordPress 3.8 is certainly aimed (amongst other things) around making the dashboard more user friendly. Given this I don’t think wordpress is becoming less user friendly, however it’s never been friendly to newbies.

Instead I think the area where Worpress has dropped the ball is that sensible projects that could make its so much better are not being tackled, instead development seems to be based on UI improvements and quick wins. These are great but a better WordPress platform would make these sort of improvements easier. Indeed a better platform would enable people to build their own UI. Thus rendering the rolling MP6 (and similar initiatives) into the core moot (because developers would be rolling their own version of the dashboard through plugins). Continue reading

Some clarification to the webmentions discussion

In reply to this analysis by Barnaby Walters of my original article.

Barnaby you wrote:

The evidence is against you here, as almost all known usage of webmention has been for short replies which don’t make sense without context.

Actually we aren’t disagreeing, maybe I didn’t express myself well when I wrote “At the moment of the method is built around a POSSE architecture. This works well for long form articles which can stand alone but address issues or ideas that are posted on an external website”. Continue reading

Thoughts on extending webmentions

I recently installed Matthias Pfefferle’s web mention plugin. It is a great plugin and hopefully when he has polished it up further he will push it out to the wordpress.org plugin repository so it can enjoy a wider audience. I actually think the Jetpack team should look at including an extended set of this functionality in its plugins as the potential for distributed sharing that the indieweb provides could be a major distinguishing feature for WordPress, and certainly a better bet than trying to roll their own social networking ecosystem. Continue reading

LH RDF not just xml anymore

LH Rdf is back!!

Yes development has started again and the first stop is to add additional formats to the output. Previously Lh Rdf only supported RDF-xml and has been designed almost exclusively around that. Therefore to add other formats I have bundled the Easyrdf library into the plugin. When the query string lhrdf is added to the feed URL the Easyrdf parser is invoked to parse the rdf xml output string and the output is then available in various triple formats.

See code extract:

$graph = new EasyRdf_Graph();
$graph->parse($out,”rdfxml”);
$data = $graph->serialise($_GET[lhrdf]);

The format chosen by value of the lhrdf variable E.G. http://localhero.biz/?feed=lhrdf&lhrdf=json

As well as simply being cool, having an option to output JSON is the main benefit as the triples are now no longer imprisoned by the same domain policy.

Visualising RDF with Incontext

Surfing around the internet I recently discovered SURF‘s InContext Visualiser, which I think is a neat way to visualise of RDF relationships, especially OAI-ORE aggregated publications

I also discovered that people have already created a set of WordPress plugins (see: http://ep-books.ehumanities.nl/ ) to visualise books and other similar publications. However blogs do not fit into a book/chapter model.

However given there is already a schema for publishing blog data and my lh-rdf plugin already exposes most publicly available WordPress blog data as RDF using that format. It was an obvious next step to get the visualiser working with the LH RDF output. I have done so and hopefully you think the output is cool.

https://shawfactor.com/visualiser-test/

Believe in the power of the factor