Category: Development

  • Custom Knockout js binding to confirm before variable change

    Having a user confirm a selection is a very common occurrence when an action is performed. In this Knockout js tutorial I’m going to demonstrate how to ask the user to confirm their choice. Only when the user has clicked OK will the observable value be changed. This example will leverage the ko.extender to create a custom Knockout extender.

    Custom Knockout JS Extender

    (more…)

  • Integrating with Twilio using C#

    I like when integrations like Twilio are simple and straightforward. I recently had the privilege of implementing it for my company. For my implementation I have a couple of special requirements that I think makes my solution better than just referencing a NuGet package and calling MessageResource.Create.

    My requirements require creating user controlled text messaging templates and customer controlled enabling/disabling of one or more text messages. Let’s get started.

    Integrating with Twilio using C#

    (more…)

  • Create MVC DropDownList from an Enum

    Like many requested features, MVC 5 now has a built-in function to provide an Enum object and automatically build a dropdown list using the standard HtmlHelper. If you’re unfortunate and on an older version of MVC, here is an HtmlExtension that performs the same thing.

    (more…)

  • Using ActionFilterAttribute to validate all form input

    I’m a big fan of using ActionFilterAttribute to apply a global filter on every single ASP.NET MVC request. I am going to create a custom filter that will implement ActionFilterAttribute to validate that the ModelState is valid for all POST or PUT requests.

    (more…)

  • PHP: self vs $this – what’s the difference?

    This is a very unique topic that I found very interesting. Inside a class with PHP you can access a property or method by using either: self::myVariable or $this->myVariable. Let’s explore the unique difference, specifically with how it relates to polymorphism.

    (more…)