This is a guest blog post from Martin Reistadbakk, developer of Trumpet.
Say hello to Trumpet.
Trumpet is a simple CloudFlare App that lets you place a short message on top of every page on your site. You turn it on, and when you want to tell your users something, you enter a message that will show up the next time the user loads your site. If the user dismisses the message by clicking on it, Trumpet will not show it again for 24 hours. It is that simple.
Trumpet was conceived to scratch a personal itch. My clients often wanted to notify users of planned maintenance and downtime. This was usually done with a news article that only showed up on the front page. I needed something that would show up on all pages, which led me to making the first version of Trumpet.
My design goal for Trumpet was to make it very reliable, small, lightweight and without any dependencies on JavaScript libraries. A lot of the inspiration and code for the initial version of Trumpet came from humane-js, an excellent library without any dependencies. This was important for me. I didn't want sites to have to include large JavaScript libraries just to be able to show a small message, especially when the overall codebase of Trumpet was so small. I didn't want convenience for me to make the product worse.
Trumpet was originally made as a Google app engine project where the site that wanted to display the message included a JavaScript. This JavaScript then checked with the server if there was a message to be displayed. This had to overcome the usual cross site execution restrictions.
Then late last year I contacted CloudFlare about making Trumpet available on their platform. CloudFlare was very welcoming and helpful. Using their platform also meant that I could eliminate the Google app engine server, as CloudFlare can let users enter the message in the app configuration screen and embed this message with the JavaScript. This makes for a much faster and more reliable experience for the user.
If you use CloudFlare today, please check it out. If you don't use CloudFlare, what are you waiting for?
Turn on Trumpet whenever you need to make sure your visitors receive a notification.
About The Author
Martin Reistadbakk spends his days building and supporting websites built on Plone, a leading open source CMS, in a small town outside Oslo Norway. His company Blåstolen Web Solutions maintains and supports the websites and intranets of some of the leading brands in Scandinavia.
Develop Your Own App
If you'd like to develop your own CloudFlare App, check out the git repo of a sample app and then sign up and get started. If you're looking for ideas, we have several customer suggestions, so just ask.