Introduction

did you find this helpful?

Tutorial

Cloud Database Academy Introduction

Cloud Database Academy Introduction

This Academy will teach you about using LiveCode with databases and the cloud. This introduction covers:

  • What is a Database?
  • What is the Cloud?
  • What Applications Will We Create?
  • How Should You Prepare?
  • The App Design Kit.

During this course you will learn how to create many cross platform applications that fall into both the cloud and database categories. Before we begin, it would be beneficial to understand what we mean by "cloud" and "database".

What is a Database?

What is a Database?

In terms of computing, a database is a collection of information organised in such a way that a computer program can quickly select the desired pieces of data. You can think of a database as an electronic filing system. There are many types of database available, the ones we will be using are mySQL and SQlite. We also show you how you can use a simple text document as a database.

What is the Cloud?

What is the Cloud?

While "Cloud" is a relatively new term, the services it describes have been around for some time. In simple terms, it is the ability to have your data stored on a server, and have this data retrieved from multiple locations and devices. A great example of a cloud service that you may have used is checking your email online eg with hotmail, outlook or gmail.

What Applications Will We Create?

What Applications Will We Create?

During this course we are going to create several applications. Firstly we'll create a cloud based Text Editor. We'll create an app that can create, edit and save text documents to a server using ftp. The lesson will also cover text styles and sizes, and it will use a custom text file based database.

Next we'll create an Inventory Management app. This will be a simple shop inventory management system. We'll be using LiveCode Server web service to access a mySQL database, with the data from this web service being sent back to our application. You'll be able to add, delete and amend any entries by url calls to LiveCode Server.

Our next app will be a Login System, we will look at creating a simple user registration and login system, a direct mySQL database connection will be used for this app. We'll cover user registration, credential checking, and custom password field implementation.

Next we'll create a cloud based Picture Viewer. The Picture View application will allow a user to upload a picture from any device to a server. The pictures that have been uploaded are then available to any users of the application via the picture list field. The list of pictures is returned by a custom function, we'll extract a list of pictures from the on-rev server image directory source and we'll also learn how to scale these images to a specific size restraint.

Next is onto Birthday Reminders. This lesson will cover how to implement a birthday reminder application that uses multiple SQLite databases. There will be one database for contact details and a separate database to set reminders.Notifications for these reminders are triggered by checks that are done when the application is launched on the desktop, and by local notifications on mobile devices.

Our final app is a cloud Media Player. Here we will cover how to create a media player to stream both video and audio to the application. The audio and video will be stored on a server with a list of these items being extracted by the method used in the cloud Picture Viewer. The lesson will cover using LiveCode behaviors, using native players on mobile and custom controls for media playback.

How Should You Prepare?

How Should You Prepare?

There are some lessons that I would recommend you read through before starting the Cloud/Database Academy. These are:

Set Up a Database

http://lessons.runrev.com/s/lessons/m/4071/l/11725-how-do-i-create-and-set-up-a-database

MySQL Database Access

http://lessons.runrev.com/s/lessons/m/4071/l/7003-connecting-to-a-mysql-database

Pass Data to LiveCode Server

http://lessons.runrev.com/s/lessons/m/4070/l/36649-how-do-i-pass-information-to-livecode-server-scripts

FTP Upload

http://lessons.runrev.com/s/lessons/m/4071/l/6998-uploading-a-file-using-ftp

SQLite Database Access

http://lessons.runrev.com/s/lessons/m/4071/l/30516-how-to-create-and-use-an-sqlite-database

Native Scroller

http://lessons.runrev.com/s/lessons/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field

Familiarising yourself with these lessons will help you greatly with some of the concepts we are going to present.

You may also find this set of lessons helpful to understand the Datagrid, although this is not required reading:

http://lessons.runrev.com/s/lessons/m/datagrid

The App Design Kit

The App Design Kit

The applications we will be creating are all part of a single stack to allow us to flip easily between them. To streamline this process I have used our LiveCode App Design Kit. This will be available for you to use from the Resources section for this Academy. I have also included a full blank template which is used throughout these lessons to allow you to more easily follow along. The App Design Kit template allows you to quickly create a scalable interface for your application. I'm not going to cover the ins and outs of how to use this app template, if this is something you are interested in there is a great video available here:

http://www.youtube.com/watch?v=W3scZVVgGY8

Let's get started!