You’ve built the web application of the century, and the users have rightly flooded to it. Cat pictures for everyone!
But alas, while your users indulge in cat-induced bliss, the cold hard reality of server costs cannot help but harsh your mellow. What is to be done?
Maybe, you could get the users to… pay for access to your incredible web application in all its multivarious splendour?
Braintree is a payment processor (now a subsidiary of PayPal), which boasts of a “simple, robust way to accept payments”, and with features like a drop-in payment ui and libraries for various programming languages enabling fairly easy integration, is a solid choice for accepting payments via credit card or PayPal.
While Braintree’s developer documentation is blessedly detailed, it’s possessed of a potentially confusing bevy of options, and its various implementation examples are spread out amongst a number of pages and platforms. So today, rather than reiterate any particular section of the docs, we’re going to take a look at an end-to-end example of a specific, straightforward scenario – accepting and processing a one-time, immediately settled payment in a web application.
After long, grueling months (years? or does it only feel like years?), your web application nears completion. It is tightly coded, well documented, works across all modern browsers, and is well received by your beta testers. It’s nearly time to go live, and a smile of pure relief plays upon your lips… and freezes into a rictus grin when your client turns to you, and asks, “so, hey, can we speed up the dynamic cat pic loading? Especially when I close the browser and come back to it later. I think that’s really key to the whole application.”
Long, long ago we discussed our jQuery plugin that will allow you to cache responses of ajax queries in Local Storage, so long as they’re strings, or something that can be coerced to a string (objects as JSON, numbers). We also previously discussed adding an ajax transport to allow us to handle sending and receiving binary blobs and array buffers via jQuery ajax.
But what if we need to cache binary blobs or arraybuffers? Say, we need those cat pics on the double – we could convert them to and from base64, but not only is that slow, but we’re certain to run up against the 5MB limit of local storage in short order. No, what we need is some way to cache binary data in some sort of client-side database…
Are you thinking about the Internet of Things (IoT)? Maybe you should be — a whole new class of devices with previously unthought of capabilities is beginning to appear on the market. Corporate juggernauts and lean startups can both play the game, with home and personal devices from names like Google, Amazon, and Apple shelved alongside smartwatches from Pebble, connected LED bulbs from LIFX, and doorbell cameras from August.
The age of the Personal Area Network and the fully-connected, automated home is on the horizon, with some estimates expecting 26 billion IoT devices connected globally by 2020. Other estimates say 40 billion. Consumers and businesses have proven that they’re interested, and there are some exciting possibilities emerging for a company with a good idea.
So, now that you’re thinking about the Internet of Things, are you thinking about security for your IoT devices?
You most definitely should be. (more…)
Advantages, Disadvantages & Common Misconceptions Addressed
A decade ago, blogging was still on the rise, Facebook was barely a year old, and the vast majority of new software development projects focused on their traditional target, the desktop computer. Half a decade ago, smartphones had come into their own, the iPhone 3 had just been released, and native applications (or “apps”) for iOS or the nascent Android were a key part of the strategies of every consumer-facing company.
For those embarking on a new or renewed software development project today, however, the platform of choice will almost certainly be, in some fashion, the web. Whether the application in question is a consumer-facing product, a line-of-business tools, or anything in-between, taking advantage of the opportunities offered by our increasingly connected technology makes perfect sense.
Half a decade ago, this would have been the obvious purview of a native app; but with the ever-improving performance and capabilities of 100% web-based applications (or “web apps”), the question of the benefits and costs of each approach now needs to be considered to determine the best value proposition for your application’s use case. The following represents a breakdown in brief of the advantages, disadvantages and common misconceptions regarding web vs. native applications.
In a hurry? You can now use our HUp jquery plugin to read files in a chunked fashion as data URLs. Hooray!
Got a minute or two? Let’s talk about file read chunking, data URLs and base 64.
If you’ve been looking forward to the previously promised discussion about file reading/downloading to/uploading from IndexedDb – well, keep looking forward, it’s on the way. In the meantime, however, let’s take a quick look at a problem and it’s quick and easy solution, that emerged out of making file reading chunkable for the HUp plugin.