Turn your WordPress Website into a Progressive Web App (PWA)

Progressive Web App

What is a Progressive Web App?

Some of you may be wondering what a PWA actually is, allow me to explain. It’s a JavaScript file that uses Web Sockets that performs various tasks. Tasks such as caching your files for faster page loads. Caching also allows a user to view your website even when the user is offline. This means they can still view all of your wonderful content in mobile or broadband blackspots. This does however mean that it won’t be up to date until they have an internet connection, but at least they can still view something.

Another thing it does is allow your users to install your website to their phone. This then acts as an app that has a splash screen and loads very quickly.

All of this makes it really easy for your users to view your site time and time again and keeps them engaged for longer. It’s a huge win and the way to get it is super simple…

As easy as 1, 2, 3!

I’ve recently gotten into the habit of turning my websites into PWAs, it turns out, it is actually fairly straightforward. WordPress has been the most straight forward so far. Simply install Super PWA and update the settings of the app.

You can then test this works by using Chrome, pressing F12 on your keyboard clicking “audits” and then performing an audit on your website. It should look something like this…

Progressive Web App

Congratulations, your website is now a PWA and you should give yourself a pat on the back for all that hard work. Now go tell your users about how great your website is now it’s a PWA.

We don’t need a social networking website. We need building websites to be more accessible.

Laravel controllers and routes

Some may know that I’ve been wanting to build an open source social networking website for a long time. The trouble with building a social networking site is there is so much to do. Especially if you want to build something that’s on par with the likes of Facebook.

No one wants to help build it with you and it’s hard to build all of it yourself. I really wanted to get something out there, especially with the news on Facebook recently. I thought to myself “this is it, I need to build this now”. I then start building and just get overwhelmed with the amount of work that needs to be done.

There are already open source social platforms out there already, but I thought I could build it better (I was so wrong about this). There are also decentralised social networking platforms that are great, but it isn’t accessible to everyone.

This got me thinking, what we need to do is make building a website easier and cheaper. We need a platform that similar to that of myspace where you can build your profile how you like, but more limited so we don’t have a huge mess with flashy gifs.

We then also need the ability to add a custom domain and connect that as easily as possible. People would then be able to have their own personalised website that is also their profile.

They should have full control over what is shown and what isn’t and they should be able to download that code fully to allow them to move to another server if they so choose.

These sites/profiles should be able to connect (or subscribe to) one another. I suspect in a very similar way to how WordPress and JetPack connect to one another.

I guess you could reskin WordPress as a more profile based website and have a platform like wordpress.com that allows users who are a less experienced sign-up and build their profile. More advanced users will download and its places on their server and then start building their profile.

Post your RSS feed items to Facebook and Twitter

If you have a Blog in a CMS which isn’t WordPress, Drupal or Joomla, then you will likely not have some automated way to post your new blog posts over to Twitter or Facebook.

I have started using [IFTTT](https://ifttt.com) to automate a lot of my workflow, but I couldn’t find any applets which would automatically post my feed items to Facebook or Twitter. I then went and created my own RSS applets, but hard coded the URL as it was just for my personal use. I then thought to myself “I bet other people may find this useful”. So, I decided to create similar applets, but you can set your own RSS feed URL and have it post to your Twitter page, or you can post it to a Facebook business page.

Check out the [link here](https://ifttt.com/makers/checkeredmichael) and let me know what you guys think.

Of course, it doesn’t have to be just your blog items, it could be anyones blog items. If you would like them posted elsewhere, then please let me know and I can create the applet for you.

5 of the best programming books

Cross development problems

## Working Effectively with Legacy Code
Amazon.com | Amazon.co.uk

![Working Effectively with Legacy Code](/storage/app/media/0131177052.jpg)

Michael C. Feathers

The average book on Agile software development describes a fairyland of greenfield projects, with wall-to-wall tests that run after every few edits, and clean & simple source code.

The average software project, in our industry, was written under some aspect of code-and-fix, and without automated unit tests. And we can’t just throw this code away; it represents a significant effort debugging and maintaining. It contains many latent requirements decisions. Just as Agile processes are incremental, Agile adoption must be incremental too. No more throwing away code just because it looked at us funny.

Mike begins his book with a very diplomatic definition of “Legacy”. I’l skip ahead to the undiplomatic version: Legacy code is code without unit tests.

Before cleaning that code up, and before adding new features and removing bugs, such code must be de-legacified. It needs unit tests.

To add unit tests, you must change the code. To change the code, you need unit tests to show how safe your change was.

The core of the book is a cookbook of recipes to conduct various careful attacks. Each presents a particular problem, and a relatively safe way to migrate the code towards tests.

Code undergoing this migration will begin to experience the benefits of unit tests, and these benefits will incrementally make new tests easier to write. These efforts will make aspects of a legacy codebase easy to change.

It’s an unfortunate commentary on the state of our programming industry how much we need this book.

Amazon.com | Amazon.co.uk

## Clean Code
Amazon.com | Amazon.co.uk

![Clean Code](/storage/app/media/0132350882.jpg)

Robert C. Martin

An extremely pragmatic method for writing better code from the start, and ultimately producing more robust applications.

Amazon.com | Amazon.co.uk

## Refactoring – Improving the Design of Existing Code
Amazon.com | Amazon.co.uk

![Refactoring – Improving the Design of Existing Code](/storage/app/media/0201485672.jpg)

Martin Fowler, Kent Beck

Users can dramatically improve the design, performance, and manageability of object-oriented code without altering its interfaces or behavior. “Refactoring” shows users exactly how to spot the best opportunities for refactoring and exactly how to do it, step by step.

Amazon.com | Amazon.co.uk

## Design Patterns
Amazon.com | Amazon.co.uk

![Design Patterns](/storage/app/media/0201633612.jpg)

Ralph Johnson, Erich Gamma, John Vlissides, Richard Helm

Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a catalog of simple and succinct solutions to commonly occurring design problems. Previously undocumented, these 23 patterns allow designers to create more flexible, elegant, and ultimately reusable designs without having to rediscover the design solutions themselves. The authors begin by describing what patterns are and how they can help you design object-oriented software. They then go on to systematically name, explain, evaluate, and catalog recurring designs in object-oriented systems. With Design Patterns as your guide, you will learn how these important patterns fit into the software development process, and how you can leverage them to solve your own design problems most efficiently. Each pattern describes the circumstances in which it is applicable, when it can be applied in view of other design constraints, and the consequences and trade-offs of using the pattern within a larger design. All patterns are compiled from real systems and are based on real-world examples. Each pattern also includes code that demonstrates how it may be implemented in object-oriented programming languages like C++ or Smalltalk. 0201633612B07092001

Amazon.com | Amazon.co.uk

## Patterns of Enterprise Application Architecture
Amazon.com | Amazon.co.uk

![Patterns of Enterprise Application Architecture](/storage/app/media/0321127420.jpg)

Martin Fowler

This volume is a handbook for enterprise system developers, guiding them through the intricacies and lessons learned in enterprise application development. It provides proven solutions to the everyday problems facing information systems developers.

Amazon.com | Amazon.co.uk


* [Top 5 Laravel Books](/post/top-5-laravel-books)