Our upcoming sample project focuses on application frameworks and compilers.

Ruby on Rails (ROR) is an application framework written in Ruby.

ClojureScript is a compiler which emits (generates) JavaScript. The ClojureScript compiler is written in Clojure.

Our project will focus on a couple of customizations.

  1. We'll define database integrity rules in the database server (versus the application code).
  2. We'll verify our JavaScript client code, marks nodes, removed from the document, as available for deletion. In other words, we will verify that after we remove an html element from the document, it's underlying object is empty. We will verify the web browser's garbage collector removes the nodes from memory.

As with projects other projects in this series, this project is primarily a learning device. We will build a useful application. However, the main benefit is, to learn technology.

Business Requirements

One of my hobbies is visiting libraries, used book stores, and reading. I want to carry a list of books, authors and categories (E.G. science fiction) with me on my mobile phone. I'd also like to refer to book reviews. Many folks who work in libraries or book stores are great sources for book and author recommendations. Communicating your prior reviews helps folks recommend new books and authors.

Application Architecture

Server will run on a Local Area Network (LAN). That means, access is provided by my LAN. We won't implement application layer authentication and authorization for the initial release.

Our application provides two user interfaces (UI and user experience (UX)).

  1. Full size web browser. Supports create, report, update, and delete (CRUD).
  2. Mobile web browser. Supports reports.

Data Model

The applications entities are:

Entities have the following constraints:





Our application also contains an entity relationship:


Data Integrity

Ruby on Rails default database.

ROR's default database is SQLite. Our project uses foreign key constraints. Thus, your SQLite installation must be built to support foreign key constraints.

In subsequent articles (see below), I'll detail how to enforce the date integrity rules using ROR and SQLite.

The article "Leveraging Ruby on Rails" details my server implementation using Ruby on Rails Version 4.

The article Leveraging ClojureScript details my mobile client implementation using ClojureScript.

About the Author:
Lorin M Klugman is an experienced developer focused on new technology.
Open for work (contract or hire).
Drop Lorin a note. Click here for address.
Please no recruiters :)
- Home