Posts

 

The shoebox - a manifesto for transmat.io

Over the last couple of years I have been thinking about how we view each other through the web, the content we post and the interactions we have. Like many people, I am not happy with the path Facebook and Twitter are taking us on.

Rather than just get upset at the every increasing monoculture that is slowly distorting the early promise of the web. I want to help build a new type of relationship that we can all have with the web and these sites. These are the ideas that have directed me.

Shoeboxes and mementoes

When I was a child, my brothers and I all had a shoebox each. In these we kept our mementoes. A seashell from a summer holiday where I played for hours in the rock pools, the marble from the schoolyard victory against a bully and a lot of other objects that told a story.

We all collect mementoes of some sort, they are the stories that we use to define ourselves. These stories are not static things built in stone, but a living part of us. We often reshape them through time as our view of life changes or our memories colour them. They are also used in different combinations to weave the way we present ourselves to the different groups of people in our lives.

The webs idea of memory is not humanistic

Today large amounts of humanities online content is published on social networks. These sites seem to consider every bit of content/interaction to have the same level of importance. In a recent talk Maciej Ceglowski said:

The Internet somehow contrives to remember and too much and too little at the same time, and it maps poorly on our concepts of how memory should work
Maciej Ceglowski, beyond tellerrand 2014

The incumbent social networks seem unable to forget a single piece of content we give them, as it is required to power their business model of profiling us for advertising. At the same time we don’t have enough control within these spaces to curate our stories. To be able to group together those things that are important to us and subdue those that are not. I would like to build publishing environments that map to the way we keep mementoes and tell stories.

My presence on the web needs a new foundation

For me to rebuild a presence on the web I need to take back control of how I create, collect, distribute, store and publish my content. Only then can I curate a more personalized representation of myself.

Transmat

I have been working with a small group to build transmat.io, it:

  1. Collects digital content for publishing, it’s not just a file store.
  2. Has a content creation and collection interface that is designed for mobile first and for social content such as status updates and check-ins.
  3. Simple distribution tools that link pre-existing services, allowing you to control your own content while still being part of the conversation on social networks.
  4. Imports pre-existing archives from Twitter, etc.
  5. Provides a simple API allowing the reuse of content i.e. in blogs.
  6. Provides auto backup in HTML for longevity.

Transmat is just a foundation on which I am going rebuild my blog. It’s not a story telling tool in itself, it’s more like my online memory from which I can pull and weave content from.

I also hope Transmat and all its tools will help others collect and reuse their digital content so they can weave their own stories. If you’re interested why not sign up for an invite. https://transmat.io

  • transmat
  • indieweb
  • indiewebcamp

Playing with webmentions

I am just about to rebuild my blog to try and reclaim a bit of my digital life, before doing that I have switch on Matthias Pfefferle WordPress plug-in for WebMentions to see how it works.

Mentions:

Awesome :) Also, make sure you add a SubToMe button :) There is a WP widget so that people can follow you easily too.

@glennjones nice! I hope everything works fine. BTW you can use SemPress (http://notizblog.org/projects/sempress/) if you don’t want to update your whole theme by hand…

AppCache and SSL

UPDATED POST:

We have just hit a bit of an issue with AppCache whilst we were deploying a new version of a client site. It’s not really a bug, but more a lack of clarity in the current documentation and different implementations in the browsers.

It has taken me sometime to understand how the NETWORK: section of the AppCache actually works. In the end, I had to build a series of AppCache tests to figure it out.

The story

We setup the NETWORK: section of the AppCache to point at a rest API


NETWORK:
//example.com/api/*

# This code is an incorrect use of AppCache

Breaking AppCache

As we deployed our site we wanted to run the API that is on another domain under SSL. So we changed the URL in the NETWORK: section so it started with https and added the certificate to the site. i.e.


NETWORK:
https//example.com/api/*

# This code is an incorrect use of AppCache

At this point Chrome stopped making API requests, we were only initially testing with Chrome.

First mistake – putting the * wildcard in the wrong place

Our first mistake is that we wrongly added the * wildcard to the end of the URL. Each entry in the NETWORK: section can be one of three types. These entries are usually added as a new line directly under the NETWORK: section header. The entry types are:

  • * wildcard on its own
  • relative or absolute URL
  • URL “Prefix match”

Examples of the correct use of AppCache NETWORK: section


NETWORK:
/data/api/
https//example.com/api/
*

“Prefix match” URL

A “Prefix match” is a strange concept – it’s a URL that is used as a “starting with” matching pattern. If your API has many endpoints but they all live in the path http://example.com/api/ then that’s all you need to add to the NETWORK: section. The * wildcard can only be used on its own and means any URL.

Second mistake – URLs should have the same protocol and domain as the manifest

There are other rules that effect the use of URLs in the NETWORK: section. All URLs have to use the same protocol scheme i.e. http or https and be from the same domain as the manifest.

Browser implementations of these rules do differ, Firefox is strict and insists on the same domain, where as other browsers only insist on the same protocol scheme. See the test examples I have built to demonstrate this.

In effect, that means to get good support across the major browsers you can only use URLs in the NETWORK: section if they are to the same domain as the manifest.

The fix is to use the * wildcard and not URLs

The vast majority of sites sidestep the complexities of URLs, by just applying the * wildcard on its own i.e.


NETWORK:
*

This will work with the manifest on one scheme (http) and the API on another (https). The wildcard does not have the same rules as URLs.

You have to ask why the hell the authors of the specification added all this complexity if all that happens is that everyone applies the * wildcard.

Thanks to Jake Archibald for some pointers to the answers as I waded my way through this.

  • html5 appcache

Response Day Out Conference

I went to the Responsive Day Out event

Web and asset fonts

There were a number of good practical take aways from Richard Rutter, Josh Emerson and Andy Hume talks on web fonts. Josh’s talk had a couple of neat ways of progressively enhancing content with resolution independent icons stored as a web font. I particularly liked the use of a data attribute in the HTML and content attribute in the CSS in his code examples


// CCS
[data-icon]:before{
   content: attr(data-icon);
   font-family: 'Cleardings';
   speak: none;
}

// HTML

@clearleft

});

I also thought the use of ligatures to allow the replacement of words in your text with single icons was good. Take a look at the forecast.is example site Josh put together to illustrate the approaches he talked about.

Part of Andy’s talk on “The Anatomy of Responsive Page Load” covered the method the Guardian mobile site is using to load and cache its custom web fonts. It is a form of progressive enhancement, where only browsers that pass the following tests display the custom font:

The server then sends a base64-encoded font so it can be cached client-side in localStorage for reuse on further page requests.

Patterns of navigation

David Bushell took an in depth look at UI patterns use for navigation. He divided the common patterns found in current responsive design into five :

His talk finished with a useful list of considerations you should be focusing on when making responsive design choices about navigation.

For me one of the strongest points David made was all the ways someone can now interact with navigation i.e. mouse, keyboard, touchpad, touchscreen, stylus, voice, movement, remote and games-pads. True device independence is not just about screen size, a point massively reinforced in Anna Debenham’s talk. Her love of game consoles always heartens me and is a good antidote to those who consider the web a web-kit monoculture. Take a look at her console site its a great resource.

Progressive enhancement

Both Andy Hume and Tom Maslen have been involved in building large-scale responsive sites for the Guardian and BBC respectively. Their talks both focused around the practical use of progressive enhancement. Tom laid out the much talked about “Cutting the Mustard” concept from the BBC i.e. dividing user agents by modern functionality support.

The BBC’s core experience of HTML4 is delivered to all browsers, but an enhanced JavaScript experience is loaded onto any browser that supports the following:

  • querySelector
  • localStorage
  • addEventListener

I was impressed with the script loading optimisation the Guardian is using. Somehow the new async and defer properties for a script tag had passed me by.



This allows a script to load directly after the HTML at the same time the CSS is loading. They fallback to use appendChild(script) on browsers without support for these new properties. This support detection has to be done server-side.

Media queries (the future or not)

More than one speaker said that they expected their use of CSS media queries to reduce as we move through the next couple of years. I got the feeling that these comments are a mixture of a response to both an over fixation on this area of CSS, but also a belief that other elements of CSS will play a much larger part in creating fluid layouts in the future.

So it was interesting that Bruce Lawson’s talk about future standards development centered so heavily around new media queries that can target device types like touch and remote. This felt like a mixed message.

Things that where un-said

There are two topics I would really liked to have heard about. These are the two difficult subjects of display advertising and web apps vs responsive design

I thought the approach my friend Jeremy Keith took in sidelining the subjects and the people asking about them was not as productive as maybe getting speakers to hit the subject full on. To be fair these issues were most likely out of the scope of this event, but they will be the anchor around responsive design’s neck and they deserve a honest straight-up engagement.

Death of Photoshop and winging it

Sarah Parmenter started the day by being honest and saying she often feels she is just winging it while creating responsive web designs. Her comfortable and well-homed design processes of the past had been lost in the move to responsive design.

A few of the speakers also made reference to the fall from favor of the Photoshop centered design workflow. With some contempt being levelled at the idea of the ‘deliverable’, a Photoshop layout given to a client as if it were the end point in its own right.

I think both points are rooted in issues of client communication.

Photoshop has not been removed from our toolkit, just its output can no longer be the crutch by which we dumb down the way we communicate complex design problems to our clients.

This new world of thousands of device formats and usage contexts means we have to draw clients more fully into the design process with all the subtle and complex trade offs involved in resolving a responsive design.

I am sure Sarah is not winging it; just like most of us feeling the uncomfortable uncertainty that always comes with change.

Thanks

The event was a thought provoking day of responsive web design. Even if I have not mentioned all the speakers, they all did a great job. Thanks to Jeremy and Clearleft for putting on the event. The day was split into groups of 3 speakers all doing a 20 minutes slot with a small joint Q&A session together. A good format I hope they will use again.

Speaker’s slides

Speaker’s notes

Audio recordings of talks

Write ups by other people:

  • Events
  • design
  • progressive enhancement
  • responsive design
  • web fonts
Mentions:

Thanks for the write-up, Glenn.

On the subject of advertising, I thought we did tackle that reasonably well (although briefly) during the Q&A, particularly from Elliot.

As for “web apps”, my pushback was serious: come up with a definition of the term that we can all agree on, and then we can discuss it. But until then, I don’t see what value there is in creating an artificial divide (that nobody can agree on) between some websites and others. Why do we need that distinction? (serious question)

Also, Paul and Mark did address the question in the Q&A, even if it wasn’t as in-depth as you would’ve liked. The whole day was very quick-fire so no one topic was getting dwelled on for particularly long.

Brand new microformats 2 parser

I have just released a brand new microformats 2 parser for node.js. You maybe thinking microformats are so 2006, but this is new. Hear me out…

Demo API /> http://microformat2-node.jit.su/

Try the API with: /> http://the-pastry-box-project.net/ /> http://microformats.org/

New life in the semantic web

A lot has changed in the last couple of years; the search engines have started to use semantic mark-up to improve their listings. Google’s rich snippets feature has created a secret army of SEO people who are quietly marking up big parts of the web with semantic data. Not that there are not already billions of microformats on the web.

HTML5 created a third standard of semantic web mark-up to add to the mix of RDFa and microformats. Then the search engines clubbed together and brought us schema.org. After a few catfights between the standards supporter clubs, these events have brought us a small rebirth of the semantic web.

microformats 2

The microformats community has revisited it’s standard and come up with “microformats version 2”. At first, I thought why! I don’t like change unless it gives me something worthwhile. After reviewing the work, I think the wholesale change to a new version of microformats is worthwhile because:

  1. The authoring patterns have been simplified even more and they are based on real life use cases e.g.: Glenn Jones is a valid microformat
  2. />

  3. microformats 2 addresses one of the biggest problems in maintaining microformats in real sites. The class names are now prefixed i.e. class=”fn” is now class=”p-name”. The prefixes like “h-*” and “p-*” tells you a class is a microformat property and helps make sure classes are not moved or deleted by mistake
  4. />

  5. Like microdata, microformats 2 now has a full specification for a JSON API. This is important as it means the parsers should now have the same output and also browsers could implement this API.

New parser and test suite

Most importantly for me I wanted to help move forward microformats, I liked the fact that the API design aligned microformats 2 a little closer to microdata and RDFa. So I have invested a couple of months of my time to building a brand new JavaScript parsing engine and a comprehensive test suite.

microformat-node GitHub https://github.com/glennjones/microformat-node /> Test Suite GitHub https://github.com/microformats/tests

I have just open sourced a new version of microformat-node using this parsing engine. Soon I will create a browser compatible version of the engine and update the microformat-shiv library which powers browser plug-ins etc.

The test suite took a long time to develop, but should provide an excellent starting point for anyone else who wants to develop a new microformats 2 parser. I know Barnaby Walters has already started working with it for his php-mf2 parser.

I hope this work will help microformats and the concept of the semantic web move forward another little step. Enjoy

  • Microformats
  • node.js
  • Projects
Mentions:

Ho nice! We’ve been *wanting* to add support for hAtom for years now… but this may be the right trigger!

Excellent Glenn!

So, who is actually using microformats version 2? If nobody then what is the point of converting my website to something that will break what is current there (microformats version 1)?

Instead, why not wait for HTML 5 to be ratified, and then convert to Microdata. Microdata is supported by W3C, and so will win in the marketplace. Microformats are a dead end.

Regards, /> Bogus

To Bogus Name

The semantic web is a bit of a mess at the moment, three standards to do one thing. For the record W3C are actually supporting the development of both Microdata and RDFa. Microformats are still hugely popular, with 70% of all structure data domains in 2012 according to the Web Data Commons.

With any new format, adoption is always a chicken and egg situation. I think that microformats 2 has some very good qualities which are worth supporting and encouraging. As a developer I can do that by providing the tools for people to take something conceptual and use it for real.

The web community has not done a very good job of joined up effort with the semantic web. What is heartening is to see how all three standards are starting to converge a little, through the efforts of people like Manu Sporny and others.

I would not wait W3C to sort out which standard will win out, it will not happen. The three standards will continue to develop, pulling from each other.

In the end I am never get to tie to individual standards just to the ideas and concepts that drive them. Building this parser is a much about seeing if ideas behind microformats 2 supply the best mix of ‘easy of authoring’ and flexibility in what date can be described. Something all three standards have tried to balance in the past, but just misses the mark.

So no it brand new standard no one is using it just yet, a bit like HTML5 was then that first started and no and microformats are not dead end.

Regards, /> Glenn

Thanks for the good work. I have been think of creating a new microformat to representing tourist attractions. How can i create a parser to process the new microformat?

Glenn, this is AWESOME!

I’ve tried a whole bunch of pages with microformats2 with your parser and it works really well.

A few clarifications from “Bogus”‘s post: /> * You can use both microformats2 and microformats1 simultaneously no problem. /> * It’s going to be years before “HTML 5 [is] to be ratified” – but that’s no reason to not to use it. /> * As Glenn points out, W3C has many ways of marking things up: microdata, RDFa, microformats are all listed on w3.org/html5 in the “Class: Semantics” section. W3C also uses microformats on their events pages, and in numerous specifications to markup the authors/editors and other information. /> * There’s a lot of microformats2 use in the wild – the spec links to a few of them.

But what’s particularly great is that Glenn’s microformats2 parser fully supports the well-adopted “original” microformats, so e.g. to Julien Genestoux’s point, clients and sites can use the parser to consume hAtom, which is incredibly well deployed across the web (every WordPress blog and more).

Once again, thanks again for your awesome work Glenn, on both the microformats2 parser and the test suite.

-Tantek

In full agreement with Tantek, this is awesome.

NodeCopter Brighton & kinect-drone

Last weekend I attended NodeCopter Brighton, a day of hacking AR-Drone’s and node.js. I wanted to control the drone by hand jestures using the Kinect’s motion detection abilities.

Links to the high-res versions (.mov, .mp4 or .ogv) of the video

Hackdays are funny, sometimes everything comes together, other times small things just trip you up. Unfortunately Saturday was a day when nothing seemed to work for me, mainly because I made the mistake of loading the wrong version of a USB driver.

On the upside that day I bumped into Aral getting coffee at Taylor St who pointed me to a project he did using Kinect with processing.

So after a couple of hours of hacking after the event, I could wave my hands and fly a drone. Once I had the right USB driver installed.

Thanks to everyone who made the day possible, I had a great time. I am glad with others, Madgex was able to sponsor the event.

You can download the project from github kinect-drone, enjoy

  • JavaScript
  • node.js
  • ar-drone
  • drone
  • nodecopter

Faster version of microformat-node

I have just uploaded a new version of microformat-node. The parser now takes between 30-40 milliseconds to parse an average page, about 8 times the speed of the last version.

Features of new version

  • About 8x faster at parsing
  • Will now load onto Windows based hosting solutions correctly
  • Inbuilt cache system, which can be customised
  • Upgraded logging and trace options
  • Upgraded unit test system
  • Added support for JavaScript promise

 

Example: http://microformat-node.jit.su/ /> Code: https://github.com/glennjones/microformat-node

 

I have changed how the method calls work so if you are using the last version you may have to update your code. The parse methods parseHtml and parseUrl now follow the standard pattern used in node.js and return an error and data object rather than just the data object.

with URL


var microformat = require("microformat-node");

microformat.parseUrl('http://glennjones.net/about', function(err, data){
    // do something with data
});

or with raw html


var microformat = require('microformat-node');

var html = '

Glenn Jones

'; microformat.parseHtml(html, function(err, data){ // do something with data });

using a promise


var microformat = require("microformat-node");

microformat.parseUrl('http://glennjones.net/about').then( function(err, data){
    // do something with data
}));
  • JavaScript
  • Microformats
  • node.js

New node.js microformats parser - microformat-node

I have built a node.js microformats parser, it is based on my previous javascript parsing code. It has been packaged up so you can easily be add to your projects using npm.

Source code: https://github.com/glennjones/microformat-node /> Test server : http://microformat-node.jit.su

Install


npm install microformat-node

or


git clone http://github.com/glennjones/microformat-node.git
cd microformat-node
npm link

Use

with URL


var shiv = require("microformat-node");

shiv.parseUrl('http://glennjones.net/about', {}, function(data){
    // do something with data
});

or with raw html


var shiv = require('microformat-node');

var html = '

Glenn Jones

'; shiv.parseHtml(html, {}, function(data){ // do something with data });

with URL for a single format


var shiv = require("microformat-node");

shiv.parseUrl('http://glennjones.net/about', {'format': 'XFN'}, function(data){
    // do something with data
});

Supported formats

Currently microformat-node supports the following formats: /> hCard, XFN, hReview, hCalendar, hAtom, hResume, geo, adr and tag. Its important to use the right case when specifying the format query string parameter.

Response

This will return JSON. This is example of two geo microformats found in a page.


{
    "microformats": {
        "geo": [{
            "latitude": 37.77,
            "longitude": -122.41
        }, {
            "latitude": 37.77,
            "longitude": -122.41
        }]
    },
    "parser-information": {
        "name": "Microformat Shiv",
        "version": "0.2.4",
        "page-title": "geo 1 - extracting singular and paired values test",
        "time": "-140ms",
        "page-http-status": 200,
        "page-url": "http://ufxtract.com/testsuite/geo/geo1.htm"
    }
}

Querying demo server

Start the server binary:


$ bin/microformat-node

Then visit the server URL


http://localhost:8888/

Using the server API

You need to provide the url of the web page and the format(s) you wish to parse as a single value or a comma delimited list:


GET http://localhost:8888/?url=http%3A%2F%2Fufxtract.com%2Ftestsuite%2Fhcard%2Fhcard1.htm&format=hCard

You can also use the hash # fragment element of a url to target only part of a HTML page. The hash is used to target the HTML element with the same id.

Viewing the unit tests

The module inculdes a page which runs the ufxtract microfomats unit test suite.


http://localhost:8888/unit-tests/

Notes for Windows install

microformat-node using a module called ‘jsdom’ which in turn uses ‘contextify’ that requires native code build.

There are a couple of things you normally need to do to compile node code on Windows.

  1. Install python 2.6 or 2.7, as the build scripts use it
  2. Run npm inside a Visual Studio shell, so for me, Start->Programs->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio Command Prompt

If you have the standard release of node it will probably be x86 rather than x64, for x64 there is a different Visual Studio shell but usally in same place.

  • JavaScript
  • Microformats
  • node.js
  • node.js
  • parser

Looking for new things to do

From this Friday I am looking for new things to do. I have pulled out of working full time at the company I co-founded. I will remain a director and major shareholder, and no Madgex is not in trouble in fact the opposite, it has just had its most profitable quarter in its history. After helping restructure it over the last year I have the opportunity to do other things.

This has left me in the lucky position of being able to follow my passions. I want to try to take the product research and design I have done commercially for years and mix it with my interests in open web and standards development.

In the next few months I want to research and build projects in a number of areas:

  • Web Intents/Activities
  • Personnel data stores using services like Dropbox
  • Possibility of semantic data reuse
  • Mobile web apps – the right way

I am sure within a few months I will want to work with teams again as I always want to design and build products that impact people’s lives, that usually means lots of calibrations, but at first I want some time to open my mind to new people and ideas.

No sitting on beaches for me. Watch this space I am about to turn up the volume…

  • madgex
Mentions:

Awesome! Looking forward to the result of your investigation!

DevUp 2012 - Barcelona

Last Friday I went to DevUp 2012 in Barcelona. The event focused on HTML5, but interestingly for me it mixed two different development communities. As well as web developers there is a whole world of games developers who are embracing HTML5 or more precisely Canvas. Darius Kazemi from bocoup did a talk which made a side-by-side comparison of the web and games development culture. As a games developer in a JavaScript company he had some nice insights.

I missed Javier Usobiaga talk on Responsive Web Design, which is a shame, but managed to go to the session by Ibon Tolosana on CocoonJS. It takes HTML5 canvas based games and boosts their performance by using an OpenGL ES execution environment. Through the day a recurring theme seemed to be that the current performance of Canvas on phones is just under what the gaming community are looking for. Although like petrol-heads I feel they will always want just a few extra frames per a second. The best example of this was Miguel Ángel Pastor’s talk on cross compiling JavaScript from C++. Not an approach I would take, but interesting.

I hope people found my talk “Beyond the page” on API’s of interest. The Web Intents demo did not work, although I am in good company as Paul Kinlan had the same trouble when he visited Barcelona. Maybe adding that one last demo at 1am the night before was not a good idea! Next time I am going to have backup screencasts.

The PeopleStore HTML5 app I showed on the day is unfortunately not online, but the codebits area of my site does have demos/code of some of the API’s it uses.

 

/> /> />

Sorry the video does not show the demo’s there is an earlier screencast of some of these demo’s from a previous blog post.

I would like to thank Ideateca for inviting me to speak and putting on such a good event, the live translation services and high quality video which was streamed live added to the events success.

  • Data Portability
  • Events
  • Canvas
  • DevUp
  • DevUp12
  • html5
Mentions:

Congrats for the great talk and thank you for participating in HTML5 DevUp! It’s been a pleasure! Hope to see you again soon! /> Best, /> Isabel

Data formats:

API