Globalization has changed more things than one can imagine – and software development is not immune. Combined with the recent trend for separating client side and server side operations, poly-repositories have become a de facto standard for application structure.
However, for all its benefits it may not be sustainable for small teams or businesses eager to break out of the conceptualization phase and deliver an MVP (Minimum Viable Product). In such scenarios, the visibility and singular source of truth offered by a mono-repository can translate to faster and smoother deployment of new features.
This article will show you how to combine the new kid on the block, Svelte with the tried-and-trusted Symfony to develop an application, all the while using Webpack Encore to bundle the Svelte app. At the end of this article, you will have built an application to interact with your Twilio message history.
To follow this …
With a monthly active user base of over 2 billion people, WhatsApp has risen to one of the most popular messaging platforms in the world today. This has established it as a viable means of sending notifications to clients.
What's more, by using the WhatsApp Business API by Twilio, you can establish a two-way communication channel with your customer and improve your service offering, such as order processing and management for instance.
To follow this tutorial, you need the following things:
Set up the WhatsApp Testing Sandbox
The first thing …
Building APIs and web-based applications are the mainstays of what we as web developers do. However, command line applications are also an essential skill to master. They help us do what we do more effectively and easily, such as by allowing us to build small tools and utilities to help us with routine, repetitive tasks.
In this tutorial, I'm going to show you how to use Symfony's Console Component to build a command line application that can retrieve usage records from a Twilio account.
To follow along with this tutorial, you will need the following:
- Composer installed globally.
- PHP, 7.4 or higher, with the Internationalization extension.
- A Twilio account (free or paid). If you are new to Twilio click here to create a free account.
Create the project directory structure
The first thing to do is to create the core project directory structure (to aid in …
For years, REST (Representational State Transfer) has been the de facto standard when designing APIs. That's quite understandable, as it's a very straight-forward structure: After sending a request to an endpoint, a JSON (or XML) response is returned to the client.
However, as applications became more complicated a recurrent theme started to emerge - multiple REST calls are required to populate a view. Enter GraphQL. With GraphQL, the sender of the request determines the structure of the response, thus providing more flexibility and efficiency to the frontend.
In this article, I will show you how to develop a GraphQL-powered API for an online book store with Symfony.
To get the most out of this tutorial, you need the following:
- A basic understanding of GraphQL
- Basic experience with PHP and Symfony
- PHP 8.0
- The Symfony CLI
Create a new Symfony application, and …
Welcome back! It’s been an amazing tour of planet TDD (Test Driven Development) so far. In this series, you’ve learned the benefits of TDD, and gotten your hands dirty building a P2P (Peer-to-peer) payment application.
In this, the third and final part in the series, you'll implement the last feature of the application using TDD, transaction history. In addition to that, you'll learn about the concept of test coverage and how it impacts application reliability.
To follow this tutorial, you need the following things:
If you already have the code from the first part in this series, you can skip this section. However, …
その結果、特定のエラーが発生すると、問題の原因を突き止めることが困難になります。エラーが1つのOSでのみ発生することが混乱に拍車をかける可能性もあります。開発者の間で有名なフレーズ、「It works on my machine」(私のマシンでは動作するのに)の状態につながります。
Date and time manipulation is one of a few frequently-experienced challenges of developing web apps in PHP. And one of it's most prevalent issues is identifying time disparities and making them readable, such as "one hour ago".
However, handling dates and times, and issues such as this, is greatly simplified by using Carbon; it's a library which reduces lengthy hours of coding and debugging to only a few lines of code. This is because Carbon, created by Brian Nesbit, extends PHP's own DateTime class and makes it much simpler to use.
If you've not heard of it before, it is self-described as:
A basic PHP API extension for DateTime
In this tutorial, you will learn Carbon's core features and capabilities, giving you the ability to far more easily manipulate date and time in PHP.
To follow this tutorial you need the following components:
- PHP 7.4 or …
As security threats continue to grow and their impacts become ever-more significant, Two-factor Authentication (2FA) is progressively becoming a de facto security standard. As an extra layer of security to the traditional username/email and password combination normally provided by the user(s) of an application, Two-factor authentication works and can be implemented by:
- Generating and sending a numeric code to the user's mobile device either via SMS, email, or phone call. This is popularly called One-Time Password (OTP) as it is a short-live password that can only be used once during authentication.
- Using an authenticator app to provide a constantly rotating set of codes that can be used for authentication when needed.
- Using push authentication where a user responds to a device push notification to either approve or reject an in-application event.
In this article, I will show you how to generate an OTP and send it to the user via …
Have you ever been afraid of your own code? Afraid to review it? Afraid to present it to clients or management? Afraid to explain it because, unwittingly, you have created a digital Jekyll and Hyde?
That used to be me once upon a time until I took testing more seriously.
Let's be honest, testing doesn't quite have the allure of writing production code, and it isn't as glamorous as writing complex data structures and algorithms. Are you excited to write a test case for code that you “know” works?
While this doesn't make testing any less important, it has resulted in testing often being seen as an afterthought by so many; including managers, other developers-even me!
In addition, testing didn't help me allay my fears because, somehow, all the nasty bugs were never exposed by my test cases. Okay, it didn't help that I never went back and updated …