PHP traits provide a convenient means of sharing methods between classes. There are times though that we may need to override or extend a method defined in a trait attached to a class. Let’s take a look at how we can achieve this.
This is the website of Andy Carter a PHP and jQuery web developer in the Steel City. Working with CakePHP (and a bit of Textpattern and Drupal too).
Using CDNs is great for improving site performance and lowering bandwidth usage on your server. However, they can also open up a security hole in your site. Troy Hunt has written a great piece about how you can protect your embedded content with subresource integrity.
The SRI Hash Generator website is a great resource for getting started with using subresource integrity (SRI).
I’ve written a piece on my Test Payment Cards cheat sheet for Smashing Magazine explaining the motivations behind it. You can read Testing Credit-Card Numbers In E-Commerce Checkouts over on the Smashing Magazine website now.
I’ve just released a new beta version of arc_meta for Textpattern 4.6.
As with the previous beta release, this one has a minimum requirement of Textpattern 4.6 which is also still in beta release; so neither of them are recommended for use on a live production site. However, if you use arc_meta and are testing the new version of Textpattern please check out this new release.
I’m a keen advocate for following coding standards. They help maintain consistency in code, especially when developing with others, and can generally help you to write better code. I work with Sublime Text for developing in PHP and have it set up to check against whichever coding standard I am currently using as I code. For PHP development the tool to use is PHP CodeSniffer which I’ve previously written about setting up for Sublime Text 3 on this site.
Package managers like Composer for PHP and NPM for Node have become essential tools for simplifying a developer’s life. A package manager is a tool for keeping track of what you’ve installed, as well as installing and upgrading packages. They also check for dependencies and compatibility. Bower is a package manager for the web.
A beginners guide to the task runner Gulp. Taking a look at why you should use it and why it is possibly better than Grunt.
- RT @streetartsheff: The new look streetartsheffield.com is here 🎉 Find out more in our blog: streetartsheffield.com/blog/redesign #sheffield #streetart… 13 November 2016
- RT @paddyashdown: Wasn't the Refo about making British judges sovereign and independent? Then they are & get this. As sheer hypocrisy it's… 5 November 2016
- Useful cheatsheet for Yarn infinite.red/files/yarn.pdf #yarn #npm #webdev 2 November 2016
- RT @streetartsheff: It's great to see so many artists at work across #Sheffield this week. #FeatureWallsSHF continues this weekend. #street… 29 October 2016
- RT @hdv: EU Parliament approves web accessibility directive; members now have 21 months to reflect it in their local laws https://t.co/3cbS… 27 October 2016