Service Workers

A List Apart runs an excellent article “Going Offline“.  In it, among other things, there’s one of the simplest explanations of the Service Workers technology that I’ve seen so far:

A service worker is like a cookie. Cookies are downloaded from a web server and installed in a browser. You can go to your browser’s preferences and see all the cookies that have been installed by sites you’ve visited. Cookies are very small and very simple little text files. A website can set a cookie, read a cookie, and update a cookie. A service worker script is much more powerful. It contains a set of instructions that the browser will consult before making any requests to the site that originally installed the service worker.

A service worker is like a virus. When you visit a website, a service worker is surreptitiously installed in the background. Afterwards, whenever you make a request to that website, your request will be intercepted by the service worker first. Your computer or phone becomes the home for service workers lurking in wait, ready to perform man-in-the-middle attacks. Don’t panic. A service worker can only handle requests for the site that originally installed that service worker. When you write a service worker, you can only use it to perform man-in-the-middle attacks on your own website.

A service worker is like a toolbox. By itself, a service worker can’t do much. But it allows you to access some very powerful browser features, like the Fetch API, the Cache API, and even notifications. API stands for Application Programming Interface, which sounds very fancy but really just means a tool that you can program however you want. You can write a set of instructions in your service worker to take advantage of these tools. Most of your instructions will be written as “when this happens, reach for this tool.” If, for instance, the network connection fails, you can instruct the service worker to retrieve a backup file using the Cache API.

Mailtrain – self-hosted Open Source alternative to MailChimp

Mailtrain is a self-hosted Open Source alternative to MailChimp and other similar mass-mailing and newsletter services.  Of course, being self-hosted, it can go only so far – you’ll still need to deal with mail delivery, SPAM filtering, and other modern days “benefits” of delivering mass mailings.  But it looks pretty complete in terms of features, so if you want to have full control and don’t mind investing a bit of time in setting up, check it out – you might get a better or at least cheaper alternative.

wpplugincheck – in-depth reviews of WordPress plugins

My WordPress radar noticed a new website – wpplugincheck.  This website provides in-depth reviews of WordPress plugins.  I’ve checked a few of those and they seem solid – honest and to the point.

There’s a gadzillion of websites online that review WordPress plugins (occasionally including even my own blog), but most of those either get too commercial with sponsored posts, or turn into collections of “5 best of this” and “7 awesome of this”.  I hope the site continues and gets into a routine of publishing reviews of the new and updated plugins, especially focusing on the areas where there are a lot of choices, or not enough.

WordPress Plugin Boilerplate – a standardized, organized, object-oriented foundation for building high-quality WordPress Plugins

WordPress is an excellent system for a whole lot of different projects and needs.  It’s widely used, fast, and flexible.  However it does show its age in many ways.  One of the areas where things could be a lot better and simpler is the WordPress plugin development.

WordPress plugins are still non-trivial to develop.  This is mostly because WordPress is behind the current technology in many ways: new features of PHP programming language, such as Object-Oriented Programming (OOP), namespaces, dependency management with composer, unit testing, etc.   There are good reasons for this, but those don’t help WordPress plugin developers.

What does help is, for example, this WordPress Plugin Boilerplate, which is a standardized, organized, object-oriented foundation for building high-quality WordPress plugins.  Using it still requires a bit of effort and dumb find-replace changes.  But it saves a tonne of time, as well as trial and error, especially for those people who are working on their first or second WordPress plugin.

Parsing: a timeline

Parsing: a timeline” is a historical timeline of parsing, as done by computers and computer programming languages.  It starts well before computers were actually invented, from the time where people started thinking about what is a language, what it consists of and how it works.

Even though this article is mostly aimed at technical people, I’m sure pretty much anyone will find interesting bits in there, as some of the names and works mentioned are well known outside of technical industries.  For techies, you’ll find all your favorite names in there – Markov, Turing, Boehm, Chomsky, Knuth, Dijkstra, Wall, and more.