Skip to end of metadata
Go to start of metadata

Purpose of the "Simple Blog" Application

In this sample, we will build a very simple blog application with the following features:

  • Create a new post into our Apstrata store (a store is equivalent to a database. When you registered to Apstrata, you automatically obtained a store to persist the data of your applications.)
  • Obtain the list of all available posts
  • View the details of a post
  • Edit an existing post
  • Register to the blog
  • Authenticate (login)

Configuring your Application

There are a few configuration steps to achieve before we dive into coding the application: 

  • The Structure of the Project
  • Installing the Apstrata HTML/JS SDK
  • Installing dojo

The Structure of the Project

Using your favorite IDE, create a project for the application with the following structure:

Installing the Apstrata HTML/JS SDK

Apstrata provides you with an extensive set of components to rapidly build your HTML 5 applications. These tools are packaged in the Apstrata HTML/JS SDK that you can download here. After downloading the file, unzip it into the ApstrataSDK folder of your project.

For the sake of simplicity, we will only leverage the minimum set of the SDK capabilities.

Your project should now have the following structure:

Installing dojo

The Apstrata SDK leverages dojo, a very interesting JavaScript framework, functionally similar to "JQuery". Therefore, in order to use the Apstrata SDK, you need to download version 1.6 of the dojo framework. Once downloaded, unzip the file into the dojo folder of your project. Your project should now look as follows:

Using the Apstrata SDK within your HTML Pages

As any other JavaScript library, you need to import the Apstrata SDK, as well as dojo, into your HTML pages before being able to use it. Therefore, you need to insert the following into the "<head>" element of your HMTL pages:

<head> element
<script type="text/javascript" src="lib/dojo/dojo/dojo.js" djConfig="parseOnLoad: true, isDesbug: true"></script>
<script type="text/javascript" src="lib/ApstrataSDK/apstrata/sdk/apstrata.js"></script>

Configuring your Apstrata Application Account

Before you start discovering Apstrata, you still need to perform one more step.

Make sure to configure your Apstrata application account to accept schema-less documents as shown in the steps below. For information about the workbench, see page entitled The Developer Workbench.

  1. Log in to the Apstrata workbench using your authentication key and secret.
  2. Click the Manage Account | Configuration tab then set the Disable Schemaless Documents field to false.


  • No labels