Reason for the silence

Wowzers! It’s been 10 months since I created a post on my blog! There is a good reason for that, I promise. I’m obviously not a prolific blogger like Ray Camden or some of the other folks that seem to be able to churn out blog posts as often as some of us sneeze, but I like to post about things that interest me from time to time.

Lately however, there just hasn’t been enough hours in the day–and here’s why. My father-in-law is an optometrist with a small practice in the town where my wife and I are from. Several years ago, he looked at me and said something along the lines of “all the practice management software packages that exist today are terrible–why don’t you build something better?”. We experimented with the idea of an internet-based application, but the technology just wasn’t ready for that kind of application at that time. More importantly, people’s attitudes on having their core business data hosted anywhere but on a computer in their office weren’t ready for what we were thinking. So, we shelved the idea.

Then, about 2 years ago some the changes in healthcare regulations happened that made us pull the idea out of mothballs and give it another look. During the intervening years, things like Flickr, GMail, Hotmail, Dropbox and others had totally changed people’s idea of where they would store their data. Mobile internet access (and people’s demand for it) was starting to take off thanks to the continued adoption of smart phones. Additionally, the tools for building compelling web applications had matured greatly and new ones had been born. With all that in mind, we decided to give this idea a go and a new company and product was born.

Today, RediPractice is the result of that idea. RediPractice is a web-based practice management system for tracking patients, appointments, insurance and billing for small optometric practices. Our core goal is to give the doctors and staff a system that is intuitive and easy to use. Our belief is that your practice management software should not cause more headaches than it solves so we have worked hard to remove processes that we’ve seen in other packages that make getting work done more difficult.

We launched live with our first customer on 1 Jan 2012 and have been in a sort of “private beta” phase since then with a small number of customers. Over the last six plus months, we’ve worked very closely with our customers’ staff members to iron out any wrinkles, revamp things that don’t make sense and add new features that our customers have told us they need to run their day-to-day practice activities.

However, as anyone that has started a new business can attest, you don’t normally get your incorporation papers in the mail and suddenly find a plethora of money in your mailbox. Starting a new business is hard work–and there are dozens of areas involved that I know nothing about. So, while we’re building this new company and product, I’m still doing consulting work for clients during the day to keep the lights on, so I can work on RediPractice nights and weekends. I have to say it’s already been an incredible journey–from doing a deep dive into medical practice processes, regulations and such to meeting with doctors and staff who are potential clients and pitching my product to them.

So, whether you really cared or not, you now know why my blog posts have been so few and far between.

Automatically encrypting and decrypting data with ColdFusion ORM and annotations

I’m writing an application that uses ColdFusion’s ORM features heavily. Various fields in my database deal with Personally Identifiable Information (PII) and need to be encrypted to meet regulatory requirements. I’ve been mulling over the best way to deal with keeping the data encrypted while in the database but have it be readily usable when loaded into an entity. None of the scenarios that came to mind felt right or could be implemented without an extensive amount of “work-around” code and I just wasn’t willing to go down those paths.

I put the question out to the folks that follow me on Twitter and got a couple of responses, one of which was from Mark Mandel who suggested using annotations. Now, I’ve heard the word annotation mentioned, but had never had the time/opportunity to research what they were or how they were used. That was a few weeks ago and in the meantime, I’d gotten busy focusing on other things and just got around to thinking about the encryption thing again a few days ago. What I found out astonished me.

Read More

Adding ModelGlue’s event API to ColdFusion Builder’s code insight

For the last year or so, all of my ColdFusion development projects have been built using the Model-Glue MVC framework. Over time, you get to where you know the most commonly used methods that are used to interact with the framework by heart. Sometimes there are lesser-used methods that you have to go look up. All the time (for me at least) I’m trying to find a way to write code faster and with less errors.

ColdFusion Builder has done a very nice job of providing code insight for ColdFusion tags, functions and CFC methods. This is especially true if you have a server configured in the “Servers” panel and mapped to your CF Builder project as it then will provide code insight for your own CFCs that you create on the page. However, when using Model-Glue, the “event” object is created for you and is always there. Because it’s not explicitly created on the page, CF Builder can’t provide code insight when you need to interact with it. However, it only takes a couple of settings in your project to make CF Builder aware of the event object and start providing help for it.

Here’s the process:

  1. Right click on your project and choosing “Properties”.
  2. In the left pane of the window that comes up, click on “ColdFusion Variable Mappings”.
  3. On the right side, click the “New” button and enter the following values into the boxes
    • Variable Name: event
    • Mapped To: html.ModelGlue.gesture.eventrequest.EventContext
  4. Press the “New” button and enter the following values into the boxes
    • Variable Name: arguments.event
    • Mapped To: html.ModelGlue.gesture.eventrequest.EventContext
  5. Press the Apply button then the OK button

    * Note that the value in the “Mapped To” box is the actual dot-notated path to the EventContext.cfc file from your CF Builder project root. I happen to have my webroot files in a folder named “html” under the project root (see screenshot #1 below).

    Once you have those settings saved, any time you type “event.” or “arguments.event.” you’ll get the list of methods contained in the Event object. Of course, this doesn’t only work with Model-Glue. Any CFC that you regularly use the same name with can be configured this same way.

    I’ve attached some screenshots for reference. If you have any questions or something isn’t working, feel free to ping me.

Dynamically set ColdFusion ORM datasource

I’m a relative novice using ColdFusion’s ORM features having done just one “real” project so far that took advantage of it. I’m working on an application that needs to be able to set the datasource for each request based on the URL that the customer is using to access the site. For example, if a customer visits http://customera.demoapp.com I need the application to use the DSN named “dsn-customera”, http://customerb.demoapp.com gets “dsn-customerb” and so on.

Normally this wouldn’t be an issue–you’d do some sort of logic in the onRequestStart() method in Application.cfc and set a request or session scoped variable to the name of the DSN and go from there. However, when using ColdFusion’s ORM functions, this approach doesn’t work since “this.datasource” is configure in the pseudo-constructor at the top of Application.cfc like so:

Read More