React in realtime

by Jon Erik Solheim
 - 
|API| Tutorials|

spash

Single page applications frameworks (SPA) are at the center stage of modern web development. Top notch web applications depends on fast and responsive behaviour in both user interface and data. Hence the popularity of frameworks like React, Angular, Vue and Ember.

This blog post shows how you can get started with React and restdb.io for development of applications with realtime data.

React is an amazing piece of technology. With it's realtime DOM manipulation and component thinking, it's just a perfect match for realtime enabled databases and frameworks like Firebase, RethinkDB, Pusher and RestDB.io.

In this blog post we'll be developing an application for displaying Nasdaq stock information.

Tutorial: Create a Google Maps Javascript plugin in restdb.io

by Jon Erik Solheim
 - 
|Tutorials|

RestDB recently announced support for developing client side Javascript plugins. Plugins lets you override and enhance existing functions in your database admin application.

Plugins are perfect tools to enrich and improve your data admin user interface with custom widgets and new functionality.

In this tutorial we'll show how you can create a Google Maps plugin widget. The plugin will display a map of a particular street address in a database.

The final result will look something like the screenshot below: final result of a google maps plugin

Tutorial: Create a multi campaign landing page with Bootstrap 4 and restdb.io

by Jon Erik Solheim
 - 
|Tutorials|

santa christmas card landing page In this blog post we'll show you how to create a multi campaign landing page using Bootstrap v4.0 and restdb.io. With the combination of a content database and campaign templates, you'll be able to quickly create nice-looking landing pages for use in campaigns or whatever.

From Excel-Hell to cloud database heaven

by Jon Erik Solheim
 - 
|Case study| Tutorials|

image

A spreadsheet is a genious invention with many uses. It is often considered the application that turned the microcomputer from a hobby for computer enthusiasts into a serious business tool. It's an awesome way to work with tabular data and to do calculations and visualize data.

Another very common use of spreadsheets is to store business data. "I created a spreadsheet with our customers and suppliers and uploaded it to Sharepoint". "I put the sales leads in a spreadsheet and shared it with you on Google Docs". These types of quick-fix spreadsheets slowly becomes permanent and starts to proliferate quickly, leading to a situation referred to as "Excel-Hell".

In many cases, the remedy for "Excel-Hell" is a database. In this article we provide an easy to follow walkthrough for transferring your spreadsheet "systems" into a modern cloud database.

Working with hierarchies in a NoSQL database

by Knut Martin Tornes
 - 
|User| Tutorials|

Hierarchies in a NoSQL database Organising information in hierarchies is something programmers have to deal with from time to time. Examples are:

  • Threaded discussions/comments
  • Addresses on a map
  • Folders and documents
  • Organisational structures
  • Storage/shelf locations in a warehouse
  • Pages on a web site
  • Link referrals

Using a NoSQL document database (or SQL for that matter), it is quite easy to create a structure to organise this type of information; for each record/document/node, you simply need a reference to the parent (except for the top node).

So what's the problem?

The main problem is that querying and retrieving the whole or parts of the hierarchy will require complex code with recursion and an unknown number of queries which can put a big load on our database. Ouch!

In this blog post we will walk through a simple solution which lets you retrieve any (or all) parts of a hierarchy (a threaded discussion) using only ONE efficient database query in restdb.io. To follow along, you can just create a new restdb database yourself. Everything is done online, you only need a modern browser.

How we created a developer friendly email campaign tool using serverless only

by Knut Martin Tornes
 - 
|Tutorials| Howto|

Serverless is more There are tons of email marketing tools on the market, the most well-known being perhaps MailChimp and Campaign Monitor. These tools have varying prices and flexibility and each one has its own fanbase and target group.

We wanted to create a simple, developer friendly email campaign tool that we could use internally for our monthly newsletter at restdb.io (it's available as a database template you can play around with).

The requirements were these:

  • Edit the emails in Markdown syntax (to save time)
  • Possibility to upload email addresses using CSV/Excel or using an API
  • Ignore duplicate emails when uploading
  • Have an unsubscribe feature
  • Track emails sent and opens in realtime

And last, but not least: Everything should be written using serverless Javascript, HTML and NoSQL.

Difficult? Yes. Doable? Certainly! Read on.

The classic Northwind database converted to the NoSQL world

by Jon Erik Solheim
 - 
|Case study| Tutorials|

northwind

This blog post uses the classical Northwind example from Microsoft to show how you can migrate from a traditional relational database to a NoSQL cloud database.

Northwind Traders Access database is a sample database that shipped with Microsoft Office suite. The Northwind database contains the sales data for a fictitious company called Northwind Traders, which imports and exports specialty foods from around the world. Developers (back in the 90's 🙌) used it to learn the MS Access product.

In the following example we will show how to:

  • Import the original SQL data files
  • Map relations between tables (collections)
  • Use the REST API to the new Northwind NoSQL database

Email from JavaScript with Gmail and database triggers

by Jon Erik Solheim
 - 
|Tutorials| API|

gmail

This blog post shows you how restdb.io simplifies sending emails via the Gmail mail service. We'll walk through a simple code example with a database trigger (serverless codehook) and a JavaScript that uses the mail API to send an email to a user.

How to automate transactional emails with restdb.io

by Jon Erik Solheim
 - 
|Tutorials| API|

mailimage

Engaging your audience is good for business. Whether your audience are users, subscribers, companies or hot leads, you should have an automated system for keeping them happy.

Sending personal emails based on user actions is an important tool in this aspect.

You can choose from a bunch of excellent email services (APIs) today, e.g. Sendgrid, Mailchimp, Mandrill, Mailgun, Amazon and Mailjet. But there are major challenges in first grasping, and then integrate and automate these services into your application.

This blog post shows how you can automate sending of transactional email directly from a restdb.io application. No need to setup or integrate anything. There is a link to an installable template at the end of the article to get you up to speed quickly.

Host your project docs in a dynamic web database

by Knut Martin Tornes
 - 
|Howto| Tutorials|

Dynamic documentation template database

In your career as developer you've probably at some time felt guilty when the project manager asked you where the documentation is. "It's a self-documenting system", you say, trying to be smart.

What if there was a fun and simple way to write and share those docs? For all your (development) projects?

In this blogpost we'll show you how the DocHUB database template was created. It provides an easy way to create dynamic project documentation with Markdown using a restdb.io database as the content engine and the amazing Flatdoc for displaying and navigating the docs with a little Javascript magic.

The template has been very popular and has been installed many times by our users. If you're not into coding, you can of course just install it and use it as is. Otherwise, read on (and learn).

Chop your logs with capped collections

by Jon Erik Solheim
 - 
|User| Howto| Tutorials|

log Your database size is out of control, and collections are growing crazy fast.

You desperately need some automagical way to limit collection sizes to contain only relevant data, and chop off garbage data.

Relax, this is exactly what you can accomplish with a background JavaScript that caps collection data to a specific limit.

This blog post will show you how.

Hook up with Mailgun

by Jon Erik Solheim
 - 
|Tutorials| API|

We'll soon be entering 2017. And Email is still around.

This blog post shows how you can use a "serverless" Javascript Codehook to send email to people from a web page.

In this example you’ll learn how to use:

  • Mailgun API to send the actual email message
  • Handlebars HTML email template
  • Pages and Codehooks

Are you ready to learn some fun and useful stuff?

Serverless "cron" jobs with JavaScript Codehooks

by Jon Erik Solheim
 - 
|Tutorials| API|

Crontab is a well known workhorse from the Unix and Linux world. 

The crontab is a system that lets you run commands on a regular schedule. Crontab stands for “cron table”, because it uses the job scheduler cron to execute tasks; cron itself is named after “chronos,” the Greek word for time.

Using the Crontab system, restdb.io can invoke a Codehook. A Codehook is a JavaScript function that can access your database or any other network resource.

Combining Crontab and Codehooks puts you in control. It lets you build a more versatile and advanced data backend for your application.

This blog post shows how to get started creating your own Crontab jobs in restdb.io.

Next on your TODO: Go React native with restdb.io and Auth0

by Jørgen Tvedt
 - 
|Howto| Integrations| Tutorials|


Native apps for IOS and Android provide developers with options, performance and styling beyond the capabilities of the browsers. Up until recently, however, this meant learning and dealing with bespoke programming languages and SDKs. Fortunately, react-native have come to the rescue, offering a familiar JavaScript programming and standardized components for the major platforms.

Building a fully functional react-native app with persistence and authentication is surprisingly easy. Using restdb.io for cloud hosted data and Auth0 for user authentication, you get lots of features right out of the box. Follow the steps in this post and you’ll be up and running in no time.

Stay in the loop with Codehooks and Slack

by Jon Erik Solheim
 - 
|Integrations| Features| Tutorials| API|

The new restdb.io feature, Codehooks,  lets you execute JavaScripts directly in your database.

This feature opens up an array of cool scenarios for your application.  One of them is to integrate your database with slack.com.

Slack seems to be every team’s favorite collaboration platform now. If you’re not using this great tool already, I would suggest you give it a try. It can practically eliminate the need for sending internal (non-important) emails, and introduces a more human touch to your team information flow.

That’s why it makes sense to let your database talk to Slack, instead of you logging on to your database admin, all the time, to see what’s going on.

This blog post shows you how you can create a JavaScript Codehook to feed your Slack with important stuff that happens inside your database.

DevOps nirvana: Roll your own low-cost realtime server monitoring with Bash, Javascript and NoSQL

by Jon Erik Solheim
 - 
|Howto| Tutorials| API|

There are plenty of excellent tools to monitor servers in real-time (New Relic, LogicMonitor). These products have tons of features and often costs more than you are (eagerly) willing to pay. Maybe you just need something simple or something custom that you want to keep an eye on in a dashboard. Perhaps the Dev in you is bigger than the Ops? In any of those cases, this article is for you.

We will show how you can use a pre-made restdb.io database template to create your own DevOps server monitoring dashboard with JavaScript, Google Charts and Bash shell scripts. The setup is simple and will only take you a few minutes to try out.

Create a technical blog with Markdown and restdb.io in 39 lines of code

by Knut Martin Tornes
 - 
|Howto| Features| Tutorials|


We've just added two-way support for using Markdown. Any text field in a restdb.io database record can now easily be edited using the integrated Markdown editor and the built-in webserver of every restdb.io database can render the text as perfect HTML using the #markdown helper tag.

In this blog post we describe how we set up a restdb.io database to power a simple blog site using just a tiny amount of code.