October 2023 Summaries
17 posts from Vonage
Filter
Month:
Year:
Post Summaries
Back to Blog
The author of this text has gained experience in developing larger-scale PHP applications and has encountered common issues that new backend developers often face. They attribute these problems to the way PHP arrays are used, which can be misleading due to their flexibility. The author explains how different programming languages handle collections of data differently, with some using indexed and associative arrays as separate classes, while others use them interchangeably. This difference in design leads to issues when working with PHP arrays, as they can be unclear about the expected type or structure of the data. To address this issue, the author proposes three solutions: generics, array shape hacking, and value objects. Generics are not available in PHP due to engine limitations, but array shape hacking allows extending the built-in `ArrayObject` class to enforce specific types. Value objects provide a simpler solution by requiring classes to be defined with properties and getter/setter methods, which leads to self-documenting code that is strict and explicit. The author shares examples of how these solutions can be implemented in PHP, providing insights into how to write maintainable and robust code.
Oct 31, 2023
1,576 words in the original blog post.
This tutorial outlines how to build an SMS messaging system using Firebase Cloud Functions and the Realtime Database alongside the Vonage SMS API. To start, developers need a Firebase account and a Vonage API account, as well as a virtual phone number from Vonage. They then set up a new Firebase project, install Firebase Tools, and create a function to receive incoming SMS messages via a webhook. The function logs the message into the Real-Time Database, and the vital piece is the Function URL, which is required to set up the webhook in Vonage. Next, developers use a virtual phone number to send a message, log the message into the database, and then create another function to send SMS messages back to the original sender. The new function watches for updates to the Real-Time Database, sends an echo of the original text, and deploys the Firebase Functions again to test the response. Overall, this tutorial provides a comprehensive guide on how to build an SMS messaging system using Firebase Cloud Functions and the Vonage SMS API.
Oct 31, 2023
1,758 words in the original blog post.
The Global Interpreter Lock (GIL) in Python restricts the execution of Python code to a single thread, despite having multiple CPU cores available. The GIL was introduced to simplify thread management and protect against race conditions and memory corruption. However, it can limit performance gains from using multiple threads for CPU-bound tasks. Recent efforts aim to remove or modify the GIL, with PEP 703 proposing a new version of CPython without the GIL. This change would allow Python to utilize multiple processor cores more efficiently, especially for CPU-intensive tasks. The proposed solution, biased reference counting, defers reference counting for top-level module objects and designates some objects as "immortal" to improve performance while maintaining single-threaded code execution speed. The Python Steering Council plans to introduce the no-GIL build as an experimental mode in Python version 3.13 or 3.14, followed by a supported option and eventually becoming the default setting within the next five years.
Oct 30, 2023
1,740 words in the original blog post.
This tutorial guides users through building a Facebook Messenger bot on their Facebook page using Google Dialogflow and the Vonage Messages API. The chatbot app takes inbound messages via the 'Send Message' button on a Facebook page or via the Facebook Messenger app, routes them to Google Dialogflow for natural language processing, and sends responses back to Facebook Messenger via the Vonage Messages API. The tutorial covers setting up a skeleton application, creating a Messages application in the Vonage API, connecting the Vonage Messages API to Facebook, sending messages from Facebook to Dialogflow, sending replies from Dialogflow to Facebook, and testing the bot. The prebuilt Small Talk agent is used for testing purposes, but users can build their own agents with more knowledge or worth to share with the user.
Oct 26, 2023
2,290 words in the original blog post.
UIlicious is a low-code testing platform that allows users to write automated tests without requiring extensive experience or coding skills. It integrates with AI Studio, enabling users to create voice alerts for failing tests. To achieve this integration, users need a Vonage API account and follow a series of steps, including creating an agent in the Vonage Developer Dashboard and triggering the agent from UIlicious using HTTP requests. The process involves writing tests in UIlicious, setting up voice alerts, and handling responses from AI Studio to ensure successful execution of the test.
Oct 26, 2023
1,002 words in the original blog post.
You should consider attending developer conferences because they offer a chance to acquire new software and learn about methodologies, as well as interact with humans who are building innovative tools. For instance, at the CityJS Singapore conference, I discovered UIlicious, a low-code platform that allows users to create automated testing with Vonage's AI Studio in under 30 minutes. To build tests in UIlicious, one doesn't need prior experience writing tests or software, and the platform is hosted in the browser, making it easy to write, run, and monitor tests without downloading anything. Additionally, UIlicious enables users to set up SMS alerts for their tests using AI Studio, which can be triggered by HTTP requests made through the platform. By attending conferences like this one, you can learn about new software development tools and network with developers who share similar interests.
Oct 25, 2023
1,071 words in the original blog post.
The new feature integrated into the .NET SDK allows for easier client initialization by providing an extension method that registers the client in the ASP.NET default Dependency Injection container, eliminating the need to manually create and register instances of the main client. This simplifies code and reduces unnecessary coupling, making it more efficient and testable. The solution is compatible with various .NET applications, including ConsoleApps and Services, and offers two service lifetime options: Transient and Scoped.
Oct 24, 2023
557 words in the original blog post.
In this post, five popular methods for making HTTP requests in Node.js are explored: using the standard library's HTTP and HTTPS modules, Axios, Node Fetch, and SuperAgent. Each method has its own strengths and weaknesses, such as security, ease of use, and compatibility with other libraries. The standard library's HTTP module is low-level and requires manual data parsing, while the HTTPS module adds security but follows a similar pattern. Axios provides a more user-friendly interface with features like automatic JSON parsing and request/response interceptors. Node Fetch offers a straightforward Promise-based approach for server-side applications, while SuperAgent is lightweight and flexible with support for promises and callback-style syntax. Each method has its own installation process and code examples are provided to demonstrate how to use them.
Oct 23, 2023
1,086 words in the original blog post.
Max from the Vonage Developer Experience team explains mutation testing as a way to evaluate the quality of tests by changing code in subtle ways and applying unit tests to these "mutated" versions of the code. He uses an analogy with penguins, where mutated code is like a bird that can't fly, and the goal is to catch it before it gets into production. Max applies mutation testing to his own Python SDK using the `mutmut` framework and shows how to integrate it into a CI/CD pipeline. He emphasizes the importance of starting small, running tests locally, and avoiding abstracting metrics like code coverage score again. Mutations are valuable as they provide insight into the codebase, but it's essential to love them rather than fear them.
Oct 19, 2023
5,012 words in the original blog post.
To create a SwiftUI application that can make phone calls using the Vonage Client SDK and CallKit, you need to deploy a server to handle creating a Vonage Application, Users, JWT Generation, and webhooks. Then, you adapt an iOS application that uses the Vonage Client SDK to make calls using CallKit. The process involves deploying a server, creating a user and generating a JWT, downloading a starter project, updating the provider manager, implementing the CXProviderDelegate, and updating the call model. With these steps, your app can integrate with the system's phone app, display recent calls, and calculate accurate call duration.
Oct 18, 2023
1,520 words in the original blog post.
The key takeaway from this article is that dependency issues at runtime are often caused by a misconfigured classpath, resulting in missing or incorrect versions of dependencies being used. Understanding the scoping of dependencies and potential conflicts between transitive dependencies is crucial to resolving these issues. The article highlights the importance of carefully managing dependencies, including specifying explicit version numbers for compatible dependencies, minimizing declared dependencies, and understanding the dependency graph. By taking a proactive approach to dependency management, developers can avoid common pitfalls and ensure that their applications run smoothly.
Oct 17, 2023
1,896 words in the original blog post.
The Vonage API is used to receive SMS messages in Python, with the Messages API being used instead of the traditional SMS API. To set up a webhook for inbound text messages, one needs to create a Flask endpoint dedicated to handling incoming requests, and make it publicly accessible through a tool like ngrok. The webhook URL should be configured in the Vonage account settings, which also requires creating an application with the correct API capabilities. Once set up, the Python application can receive inbound SMS messages, and the user can test this functionality by sending a test SMS message to their Vonage number.
Oct 11, 2023
1,306 words in the original blog post.
Bad tests can lead to hours of wasted development time and poor code quality due to unclear expectations, incorrect assumptions, and lack of communication among team members. The article shares an example from a real-life project where a poorly written test led to a 24-hour delay in resolving the issue, highlighting the importance of writing clear, descriptive, and accurate tests that convey the expected behavior of the code. The author emphasizes that good communication skills are crucial in remote teams, where asynchronous communication can lead to misunderstandings and delays. By writing tests that clearly describe how the code works and guard the interface correctly, developers can mitigate such issues and ensure high-quality code that meets the team's expectations.
Oct 10, 2023
1,234 words in the original blog post.
Vonage has released several new developments for its APIs and products, including a serverless Cloud Runtime platform that accelerates building communication apps, a Code Hub beta that simplifies app development, and updates to its Video API with powerful AI capabilities. The company has also introduced features such as customizable video streams with QR codes and watermarks, transcribing video conversations into Google Docs, and advancing security measures to prevent fraud and protect users. Additionally, new releases include improved server SDKs, support for live captions, and exciting new capabilities to elevate video experiences across platforms.
Oct 05, 2023
853 words in the original blog post.
To send an SMS message with Node.js and the Vonage Messages API, developers need to install the Vonage Node.js SDK, run ngrok to expose a local development server to the Internet, create an SMS-enabled application using the Vonage API Dashboard, enable the Messages capability, provide an Inbound URL and Status URL, link one or more virtual numbers to this application, and use the vonage.messages.send method to send an SMS message. To receive SMS messages with Node.js, developers need to create a web server using Express, create a POST request handler for the inbound URL, log the request body to the console, and send back a 200 status. With these steps, developers can extend their project to reply to incoming SMS messages or include more complex elements for future SMS needs.
Oct 04, 2023
2,012 words in the original blog post.
The Requests module is a popular and easy-to-use option for making HTTP requests in Python, allowing users to perform basic GET and POST requests, as well as more advanced techniques such as using sessions for persistence and leveraging HTTP adapters for fine-grained control over request settings. By mastering these levels, developers can tackle a wide range of web-related tasks in their Python projects, and by utilizing the Vonage Python SDK, they can simplify the process of interacting with APIs while still gaining access to low-level customization options.
Oct 04, 2023
1,534 words in the original blog post.
To integrate ChatGPT with WhatsApp, users need to set up a Vonage Messages API Sandbox for WhatsApp, obtain an OpenAI API Key, and use Flask Server to receive incoming requests. The process involves creating a QR code, sending a WhatsApp message, and setting up webhooks to forward messages to the Flask server. Once the setup is complete, users can send questions to ChatGPT, which will respond with answers that are then sent back to WhatsApp. The integration allows for the creation of a functioning WhatsApp chatbot using generative AI, making it easy to automate customer service and sales interactions. By following these steps, users can harness the power of generative AI in WhatsApp Business and create custom chatbots for their needs.
Oct 03, 2023
2,714 words in the original blog post.