Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free
  • By AJ Saulsberry
    Using Twilio Lookup in .NET Core WPF Applications using-lookup-dot-net-wpf (1).png

    There are a lot — really a lot — of applications collecting phone numbers. Those numbers all need to be validated and verified. It makes sense to do some of the validation on the front end where an end user or customer service agent can correct errors without waiting on a round trip to a server.

    Application front-ends can determine if the contents of a specific field are “phone number-ish” by using data types, regular expressions, input masks, and odd bits of JavaScript. But they can’t tell if the input is a real phone number without checking the input against a list of real phone numbers.

    Twilio Lookup makes it easy to validate phone numbers for both web applications and applications developed with .NET Core Windows Presentation Foundation (WPF), an open-source UI framework for creating desktop client applications for Windows.

    Twilio provides helper libraries for a variety of programming languages …

    Read More
  • By AJ Saulsberry
    Using C# Interfaces as View Models With ASP.NET Core 3.1 Razor Pages in MVVM Design csharp-interfaces-mvvm.png

    When you build web applications with Razor Pages using the Model-View-ViewModel (MVVM) design pattern you can use C# Interfaces and the .NET Dependency Injection middleware to abstract your application’s data repositories. This approach reduces class coupling and makes it easier to create unit tests. It also makes it easier to maintain the application and expand its scope as business requirements become more complex.

    It’s natural to look for other places where you can use interfaces to create abstractions. In MVVM design, a logical place to look is the View Model layer; these classes are typically used to provide both the data model for the PageModel class and the return types for the data repositories.

    This post will show what using interfaces for view models would look like using a case study application and it will demonstrate an important limitation of model binding. It will also offer some reasons why view …

    Read More
  • By AJ Saulsberry
    Using Interfaces and Dependency Injection for Inversion of Control in ASP.NET Core 3.1 Razor Pages Projects Built with the MVVM Design Pattern interfaces-di-mvvm (1).png

    The Model-View-ViewModel design paradigm is useful for building web applications with ASP.NET Core Razor Pages and ASP.NET Core MVC. Entity classes, data repositories, and view models work with data contexts, data binding, validation, and features of the ASP.NET Core middleware to create a comprehensive and extensible architecture.

    But it is important to use additional features of C# and the .NET Extensions APIs to prevent the structure of an MVVM web app from becoming rigid, making it difficult to modify as the requirements for the application change and grow. At the same time, you’ll also make it easier to build unit tests for your application, helping you ensure it continues to work correctly as you modify existing features and add new ones.

    C# Interfaces and Dependency Injection from the .NET Extensions namespace can be used to reduce the class coupling that occurs when you use concrete types to create new instances …

    Read More
  • By AJ Saulsberry
    Using the Latest Twilio NuGet Package with Legacy Versions of the .NET Framework twilio-nuget-legacy-dot-net.png

    Developers have a natural inclination to work with the latest and greatest technologies; new libraries, language features, and tools are some of the things that keep the profession interesting. Production environments, on the other hand, often lag behind because of stability, compatibility, and cost considerations.

    Twilio understands both perspectives, so .NET developers who build software for Windows machines get the best of both worlds when they work with Twilio components. You can develop with the latest tools and use the most recent Twilio libraries and API capabilities while maintaining compatibility with legacy operating systems and .NET frameworks.

    This post will walk you through a quick case study project demonstrating how to code an application that can run on older Windows systems and legacy versions of the .NET Framework while using the latest version of Visual Studio 2019 and the newest Twilio NuGet package. You can use the code to test …

    Read More
  • By AJ Saulsberry
    Building Hierarchical Dropdown Lists in ASP.NET Core 3.1 Razor Pages with View Models and Ajax asp-net-core-razor-pages-dropdowns.png

    Dropdown lists are one of the most widely used user interface controls. It’s also common for the options presented in a dropdown to depend on the value of another control. Finding a good way to build this functionality is a challenge developers often face when beginning to build websites with ASP.NET Core.

    You can build hierarchical dropdown lists using ASP.NET Core Razor Pages using an Ajax call on the page view and an action method on the page model. It doesn’t require writing a lot of code, and the technique can be applied in numerous situations where user interface data needs to be set dynamically. No JavaScript frameworks required!

    Using Razor Pages with the Model-View-ViewModel (MVVM) design pattern provides a way of separating the presentation of data in the Razor Page, the view, from the structure of the data that is presented and manipulated by business logic, the view model. …

    Read More
  • By AJ Saulsberry
    Verifying Phone Number Messaging Capabilities with ASP.NET Core and Twilio Lookup verifying-phone-number-capabilities.png

    The ability to send and receive SMS and MMS messages programmatically is great, but how do you ensure you’re sending messages to a phone that’s capable of receiving them? If a customer provides you with a phone number when they sign up for an account, is it possible to verify the phone number’s capabilities while you’re verifying they own the phone number?

    With Twilio Lookup it is, and it’s easy to integrate this capability into your ASP.NET Core projects. One of the best ways you can use this resource is to use it to determine whether your application should be sending SMS messages or voice messages using the text-to-speech capabilities of the TwiML <Say> verb and Answering Machine Detection. With these tools you can communicate with customers asynchronously using their phone’s capabilities regardless of whether it’s a mobile or landline phone.

    In this post you’ll learn how to use …

    Read More
  • By AJ Saulsberry
    Obtaining Caller ID Information with ASP .NET Core and Twilio Lookup twilio-lookup-asp-dotnet-core-razor-pages.png

    Who’s calling? In the era of ubiquitous mobile phone use it’s almost impossible to identify the name associated with a phone number unless you’ve already made that connection in your smartphone’s contact list, an annoyance facilitating “New phone who dis?” memes.

    But it’s still possible to get the caller name associated with a telephone number, and you can do it without waiting for a call. Twilio Lookup and the Twilio Helper Library for .NET make it easy to integrate real-time caller information retrieval into web applications built with ASP.NET Core.

    Understanding “Caller ID” information

    The history of “Caller ID,” as it’s commonly known, is surprisingly complex and has involved a number of standards, protocols, and technologies. While the various systems referred to as Caller ID make it possible to identify a calling number, a caller’s name is provided through a system known as Calling Name Presentation (CNAP) …

    Read More
  • By AJ Saulsberry
    Validating Phone Numbers Effectively with ASP.NET Core 3.1 Razor Pages Validating Phone Numbers Effectively In Razor Pages

    Data validation is an essential part of application design and development, and telephone numbers are as tricky to validate as they are ubiquitous. In many cases a phone number will be the primary way your organization communicates with its customers. Whether the communication will be by voice, SMS, or messaging app, having a correct phone number is a requirement.

    Developers using .NET Core and the .NET Framework can do validation for a number of different data types, including phone numbers, with the System.ComponentModel.DataAnnotations namespace, but the PhoneAttribute class has its limitations. To learn more, see the .NET Data Validation section of the previous Twilio Blog post on this subject: Validating phone numbers effectively with C# and the .NET frameworks.

    Fortunately, the libphonenumber-csharp open source library provides extensive resources for validating and manipulating phone numbers of all types and it’s conveniently available as a NuGet package. This post shows …

    Read More
  • By AJ Saulsberry
    Setting Twilio Environment Variables in Windows 10 with PowerShell and .NET Core 3.0 setting-environment-variables-windows-10.png

    “Keep it secret. Keep it safe.” If you’ve worked in IT for any length of time you know those words apply to many things besides magic rings. Personally identifiable information (PII) and user secrets are at the top of the list of such items. When you’re developing .NET applications there are inevitably some magic strings, like API keys, you need to watch over in all the realms you pass through: development, testing, and production.

    This post will show you how to use PowerShell and .NET Core 3.0 to store and use Twilio credentials securely as Windows 10 environment variables. It’s important to get this right, as these credentials control access to Twilio products like the Twilio API for WhatsApp and the Programmable Video service that cost money and connect to your customers.

    It can be embarrassing and costly for developers to inadvertently disclose sensitive information like API keys. Developers sometimes …

    Read More
  • By AJ Saulsberry
    Starting from Zero with Node.js on Windows 10 Starting from Zero with Node.js on Windows 10

    JavaScript may be ubiquitous in the world of web development, but not every developer has been working on web front-end projects, and not every web developer has had the opportunity to get into server-side JavaScript. You might also be new to JavaScript—lots of folks are—and getting a handle on what you can do with the language.

    If your development experience fits into these broad categories your awareness of Node.js may be limited to having heard the name. You might also have heard something about running JavaScript without a browser. You might be wondering whether there’s a place for Node.js in your programming toolbox.

    If you’re ready to launch your Node.js learning mission, this post is for you: it’s a roundup of the essential information you need to get off the launchpad. The explanations below are valid for Windows, macOS, Linux, and AIX, but the instructions apply only to Windows 10. …

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.