Integrating HTML Templating with OpenWhisk Web Actions

As always, when I blog about stuff like this, I want to remind folks I’m both new to serverless and new to OpenWhisk, so while what follows works, I’m not necessarily saying it is the best way to do things, or even a good idea. But let’s be honest, that’s never stopped me before, right? So the question I had this morning was - given an OpenWhisk action built for Web Action support, how would you make use of a templating engine to help return an HTML-based response?

Read more

Artificially Delaying Providers with Observable.Delay

I’m still - grudgingly - making use of Observables in Ionic 2. As I’ve said before, I don’t see anything wrong with Observables, I just find them overly complex and a pain to use. Half the time I get them working right it’s because I’ve copied and pasted another example. I would say - easily - that out of all the changes with Ionic and Angular 2 (sorry, 4, um, whatever) it’s Observables that I’ve had the hardest time adopting.

Read more

Enabling CORS for an OpenWhisk Web Action

Here’s a quick tip for you. If you are building an OpenWhisk action you plan on exposing as a web action, most likely you’ll want to look into enabling CORS so you can call your code from JavaScript on the front-end. Since Web Actions can return both a result and headers, this is trivial to do. Here is a simple example. function main(args) { if(!args.name) args.name = ‘Nameless’; let result = { string:‘Hello ‘+args.

Read more

OpenWhisk, Serverless, and Security - a POC

Before I begin, I want to be clear that what follows is a proof of concept. It should absolutely not be considered a recommendation, but rather a starting point for conversation. I’ve been thinking a lot lately about how one could use OpenWhisk along with a security model of some sort. Specifically, “Expose action so and so but only for authorized users.” Obviously “security” can imply a lot more, but in this initial post I’m going to keep my requirements a bit simpler.

Read more

PSA for New Web Developers - Don't Use file://

If you are new to web development, one of the things you may try is simply opening a local file with your web browser. In other words, you make a file, like cat.html, save it to your desktop, then do a File/Open in your browser to view it: This is a common way to learn web development and it’s even what Mozilla Developer Network suggests in its Learning Web Development tutorial.

Read more

A Tip for Zipped Actions and Packages in OpenWhisk

Just a quick tip to share today. I talked about zipped actions a few months ago. It’s how you handle adding non-supported npm modules with OpenWhisk. While OpenWhisk supports a good set of common/popular npm modules out of the box, if you want to use one that isn’t on that list, you: Make a zip of the action code, the package.json file, and the node_modules. Update your action and point to the zip instead of just the .

Read more

FusionReactor - Still the Best for ColdFusion

I don’t really do a lot of ColdFusion work anymore, mainly just support for clients as my side gig, but when I do think of the platform as a whole, there’s two companies that always come to mind - Ortus and Integral. I blogged about Ortus, and specifically CommandBox, a few months ago, but today I want to share my impressions about the latest FusionReactor. FusionReactor (who, by the way, help sponsor this blog!

Read more

From Actions to Sequences to Services

I’ve been thinking a lot this week about OpenWhisk and sequences, and more precisely, how serverless in general can help development by letting you put various actions together to form new ones. Much like how Legos can be broken apart and put together in new configurations, I’m getting really excited the possibilities of serverless actions when they are chained together. To be clear, I know I’m mainly talking about code reuse here and that is absolutely nothing new.

Read more

Extracting One (or more) Pages from a PDF

Ok, this falls squarely into “I Bet Everyone Knows This” category, but have you ever wondered how you could extract one (or more) pages from a PDF? For example, imagine one of the pages is an image and you want just that, how would you do it? Last night I was about to do a screen capture of the page when I tried a simple hack. I selected Print, and then “Print to PDF”, and then clicked “Current Page”:

Read more

OpenWhisk Sequences and Errors

As always, try to read the entire post before leaving. I edited the end to add a cool update! I first blogged about OpenWhisk sequences a few months ago, but if you didn’t read that post, you can think of them as a general way of connecting multiple different actions together to form a new, grouped action. As an example, and this is something I’m actually working on, I may have an action that gets the latest tweets from an account as well as an action that performs tone analysis.

Read more