Craig Buckler, Aug 28

How to Create Printer-friendly Pages with CSS

Craig Buckler reviews the art of creating printer-friendly web pages with CSS, showing how to retrofit them to any site, at minimal cost, without affecting or breaking existing functionality — delighting users and raising your site above competitor sites.
SitePoint Team, Aug 27

Case Study: Builds Single Customer View with MongoDB

We spoke with Jon Vines, Software Development Team Lead at, about the experience of building the single customer view application, his development philosophy, and the impact it’s having at AO.
Craig Buckler, Aug 27

20 Tips for Optimizing CSS Performance

Craig Buckler discusses 20 ways to optimize your CSS so that it’s faster-loading, easier to work with and more efficient, covering analysis tools, CDNs, HTTP/2, CSS3, animations and transitions, fonts, concatenation and minifying, build tools, flexbox, grid, SVG, critical CSS, and more.
Simon Julian, Aug 26

Three ways to grow your traffic and capture audience

Simon Julian, Aug 26

Three winning strategies for setting up Google Adsense

Matt Raible, Aug 24

Build a Health Tracking App with React, GraphQL, and User Authentication

I’m going to show you how to build a GraphQL API with Vesper framework, TypeORM, and MySQL. These are Node frameworks, and I’ll use TypeScript for the language. For the client, I’ll use React, reactstrap, and Apollo Client to talk to the API.
Craig Buckler, Aug 24

The Benefits of Using CSS Grid for Web Form Layout

Craig Buckler discusses form layout in the age of CSS Grid, discussing the difficulties of laying out forms with floats and flexbox, and demonstrating the benefits of grid in terms of form layout, the possibilities it offers, and how and why to take a progressive enhancement approach to form layout.
SitePoint Team, Aug 23

Mobile Gaming: Build a Security Token Service with Object Storage Service

Through STS, you can issue federated users, who are managed in your local account system, with an access credential that customizes the expiration duration and access permission.
Ahmed Bouchefra, Aug 23

CSS Optimization Tools for Boosting PWA Performance

Ahmed Bouchefra shows how to use various tools and related techniques to help build a better PWA by focusing on CSS optimization — demonstrating how to remove unused CSS, inline the critical path CSS, and minify the resulting code.
Michiel Mulders, Aug 23

Smart Contract Safety: Best Practices & Design Patterns

Developing with a security mindset is extremely important as the cost of failure can be high and change can be difficult. It’s recommended to use secure design patterns like rate limiters, exit strategies or circuit breakers to protect your contract against unexpected events.
David Attard, Aug 22

CSS and PWAs: Some Tips for Building Progressive Web Apps

In this article on CSS and PWAs, David Attard discusses a number of techniques that can be used when creating the CSS required for the development of PWAs.
Craig Buckler, Aug 21

Real World Use of CSS with SVG

Craig Buckler describes various ways to use CSS with SVG, covering the benefits of using SVGs, a range of SVG tools, SVGs as static images, CSS inlined SVG backgrounds, responsive SVG images, HTML-inlined SVG images, SVG sprites, SVG effects on HTML content, and portable SVGs.
Nikki Stefanoff, Aug 20

How Hitting the Books Can Help Your Business

Nikki Stefanoff interviews Andrew Hardwick, the Managing Director of Hard Edge — a creative agency focusing on innovative brand communications — to get his thoughts on how entrepreneurs can continue to learn and grow while still staying focused on their business.
Ilya Bodrov-Krukowski, Aug 20

Using CSS Transforms in the Real World

Ilya Bodrov explains how CSS transforms can be used in the real world to solve various tasks and achieve interesting results — showing how to adjust elements vertically, create nice-looking arrows, build loading animations and create flip animations.
Ahmed Bouchefra, Aug 17

Easy and Responsive Modern CSS Grid Layout

Ahmed Bouchefra shows how to create a responsive modern CSS Grid layout, demonstrating how to use fallback code for old browsers, how to add CSS Grid progressively, and how to restructure the layout in small devices and center elements using the alignment properties.
SitePoint Team, Aug 16

5 Top Development Tools that Will Help You Do More in Less Time

Here are 5 great tools and services to make your life as a developer a lot more productive. Bonus content: 3 tips to get your developer skills to the next level.
Giulio Mainardi, Aug 16

Redesigning a Card-based Tumblr Layout with CSS Grid

Giulio Mainardi shows how to retrofit a popular, card-based Tumblr layout with CSS grid, demonstrating how to plan for responsive behavior and utilize other cutting edge CSS features such as object-fit: cover, @supports and the :focus-within pseudo-class.
Ilya Bodrov-Krukowski, Aug 15

Redesigning a Site to Use CSS Grid Layout

Ilya Bodrov demonstrates how to retrofit a layout with CSS Grid, showing how easy it is to utilize CSS Grid to create robust layouts. He also discusses fallbacks for older browsers, should you need them.
Claudio Ribeiro, Aug 14

Variable Fonts: What They Are, and How to Use Them

In this article, Cláudio Ribeiro looks at the exciting new possibilities surrounding variable fonts — now bundled with the OpenType scalable font format — which allows a single font to behave like multiple fonts.
Craig Buckler, Aug 14

7 of the Best Code Playgrounds

Craig Buckler lists 7 of the most popular code playgrounds tfor experimenting with your front-end code, such as CodePen and JSFiddle, along with suggestions for playing with back-end code, hosting your own code playground, and even installing an offline code playground in your own browser!
Craig Buckler, Aug 13

3D Transformation Functions in CSS

Craig Buckler shows how to add another dimension to your web pages and applications with the new 3D transformation functions and properties in CSS, covering transform, translate, rotations, scaling, perspective and more, along with z-index, browser gotchas, and ideal use cases.
Syed Fazle Rahman, Aug 13

24 JavaScript Libraries for Creating Beautiful Charts

This article provides a quick overview of 24 JavaScript libraries for creating charts and graphs — from heavy-duty libraries like D3.js to some super-simple options for representing data quickly and beautifully.
Craig Buckler, Aug 10

How to Install PHP on Windows

We've previously shown you how to get a working local installation of Apache on your Windows PC. In this article, we'll show how to install PHP 5 as an Apache 2.2 module.

Why PHP?

PHP remains the most widespread and popular server-side programming language on the web. It is installed by most web hosts, has a simple learning curve, close ties with the MySQL database, and an excellent collection of libraries to cut your development time. PHP may not be perfect, but it should certainly be considered for your next web application. Both Yahoo and Facebook use it with great success.

Why Install PHP Locally?

Installing PHP on your development PC allows you to safely create and test a web application without affecting the data or systems on your live website. This article describes PHP installation as a module within the Windows version of Apache 2.2. Mac and Linux users will probably have it installed already.

All-in-One packages

There are some excellent all-in-one Windows distributions that contain Apache, PHP, MySQL and other applications in a single installation file, e.g. XAMPP (including a Mac version), WampServer and Web.Developer. There is nothing wrong with using these packages, although manually installing Apache and PHP will help you learn more about the system and its configuration options.

The PHP Installer

Although an installer is available from, I would recommend the manual installation if you already have a web server configured and running.
Maxime Beugnet, Aug 09

Java and MongoDB 4.0 Support for Multi-document ACID Transactions

This article was originally published on MongoDB. Thank you for supporting the partners who make SitePoint possible.


MongoDB 4.0 adds support for multi-document ACID transactions.

But wait... Does that mean MongoDB did not support transactions until now? No, actually MongoDB has always supported transactions in the form of single document transactions. MongoDB 4.0 extends these transactional guarantees across multiple documents, multiple statements, multiple collections, and multiple databases. What good would a database be without any form of transactional data integrity guarantee?

Before we dive in this blog post, you can find all the code and try multi-document ACID transactions here.

Quick start

Step 1: Start MongoDB

Start a single node MongoDB ReplicaSet in version 4.0.0 minimum on localhost, port 27017.

If you use Docker:

  • You can use
  • When you are done, you can use
  • If you want to connect to MongoDB with the Mongo Shell, you can use

If you prefer to start mongod manually:

  • mkdir /tmp/data && mongod --dbpath /tmp/data --replSet rs
  • mongo --eval 'rs.initiate()'

Step 2: Start Java