Systems | Development | Analytics | API | Testing

Honeybadger

A guide to PHP attributes

When building web applications in PHP, there may be times when you want to add metadata to annotate your code that can be read by other parts of your application. For example, if you've ever used PHPUnit to write tests for your PHP code, you'll have likely used the @test annotation to mark a method as a test in a DocBlock. Traditionally, annotations like this have been added to code using DocBlocks. However, as of PHP 8.0, you can use attributes instead to annotate your code in a more structured way.

How to build a Rails API with rate limiting

APIs are the bread and butter of the internet. The ability to interact with our applications programmatically enables interoperability and makes our lives as developers easier. Unfortunately, web applications are vulnerable to malicious actors that seek to misuse them or degrade their performance, which is why rate limiting is an important part of any API.

Clean code with PHP namespaces

A widespread issue developers run into when building applications is grouping and organizing code correctly so that it is easier for other developers to understand and collaborate. Conflicting class names, functions, and other code blocks is an issue for developers, and PHP offers a way to tackle this problem by adding namespaces to the language in PHP 5.3. In this article, you will learn everything you need to know to start using namespaces to organize your code efficiently in PHP.

Adding views to an API-only Rails app

Ruby on Rails has long been celebrated for its ‘convention over configuration’ philosophy, simplifying web development for countless programmers. However, what if you’ve started with a lean Rails API-only application and now find yourself needing a front-end? This isn’t uncommon, especially with the rise of JavaScript frameworks and SPAs.

Sending email in Laravel with Mailgun

As a web developer, you will often need to send emails from your application. In fact, if you've been a developer for more than a few months, you've probably already had to do this. You might want to send emails for a variety of reasons, such as sending a welcome email to new users, sending a password reset email, or sending a notification to a user. Laravel makes it easy to send these types of emails to single recipients, thanks to some handy features such as mailables and notifications.

Running Solid Queue in production Rails apps

Background jobs are essential to many Ruby on Rails apps. Since the introduction of ActiveJob, Rails developers have been able to manage their background jobs as natively as they do their database records. Still, ActiveJob requires you to select (and support) a backend adapter that will implement ActiveJob's backend. Many use Redis, a memory cache, to queue and process background jobs. Redis comes with incredible speed but is yet another dependency to maintain.

Shipping Rails logs with Kamal and Vector

The ability to record and see everything happening across your web applications is essential when building resilient and highly available systems. All of your events—from application logs to errors to user behavior—contain data that could be useful to you and your team. When you have a central place to access all this information, finding issues and their root causes becomes easier because you have the data at your fingertips.

Account-based subdomains in Rails

For many applications, access is usually through a single domain, such as yourapp.com. This way, the application developer is able to offer a unified experience to all users. This works great most of the time, but imagine a situation where you need to give each user a customized experience; how would you achieve this? One of the ways you can customize the user experience in a single application is by using account-based subdomains.

How to build an API with Go and Gin

Have you ever found yourself rummaging through the fridge, trying to figure out what groceries you have and what you need to buy? Okay, maybe this isn't a super serious problem, but what better way to manage this chore than by building a web API? In this guide, we'll craft a grocery management API with Go and Gin. If you're new to API lingo, CRUD might sound a bit... well, crude. However, it's a fundamental concept! CRUD stands for create, read, update, and delete.

Working with DynamoDB in Laravel

When building your Laravel applications, you may sometimes need to use a NoSQL database to store and retrieve data. One popular choice is Amazon DynamoDB, a fully managed, serverless, and highly scalable NoSQL database service provided by Amazon Web Services (AWS). In this article, we'll take a brief look at DynamoDB. We'll then delve into how to use DynamoDB as a cache store in Laravel, and how to store Laravel models in DynamoDB using the baopham/laravel-dynamodb package.