As our apps will most likely run on Linux servers, it's critical that we ensure our tests run (and pass) on Linux as well as on Macs. A massive pain point when writing tests for our server-side Swift apps is remembering to add those tests to the
allTests list or even adding a test case to the
LinuxMain.swift file. The problem is that
XCTest can find all our tests at run-time on macOS but not on Linux. Therefore we might not realize we're missing some. Ole Begemann with another great article this week writes about how to solve this problem with a few lines of code.
If you’re providing an API, chances are you’ve already experienced sudden increases in traffic that affect the quality of your service, potentially even leading to a service outage for all your users. However, by implementing a few API rate limit strategies, you can ensure your API is always available for everyone and decide when to scale it depending on its actual usage.
Another Vapor+Docker tutorial. This time on how to run your app on the Google Cloud Platform. Again, this tutorial uses Vapor, but any other server-side Swift framework would work just as well as the key technologies here are Swift, Docker and the Google Could Platform. If you fancy Kitura or Perfect, just swap the relevant bits with the implementation using your framework of choice and everything will work just fine.
The WebKit team explains what the Grid Layout is and how to use it. The Grid Layout is another
display type that defines a Grid, of course, similar to what you may have already used with Bootstrap or any other CSS framework.
Working with CSS to produce similar results used to be a very hard task until recently. Bootstrap was one of the first frameworks to address the issue. Now we have built-in CSS layout systems that try to make our life easier. We can choose among so many options these days: the Grid Layout, Flexbox, Bootstrap grids and more!
Which is your preferred one?