Free and Open-Source Projects

THE RVS_Spinner POPUP SPINNER CONTROL

This is a special control class that implements a pop-up spinner control.

You can associate an array of values with a Spinner, and they will be presented to the user when they tap the center of the control.

The control will pop up either a fan of values that can be scrolled like a knob, or a UIPickerView.

It is completely self-contained. You only need to instantiate the control, give it a place in the view (just like any other control), and associate a set of values with it.

The values should be accompanied by images.

The operation and appearance of the Spinner are highly customizable, either at runtime, or through IB Inspectable properties.

What Problem Does This Solve?

Mobile devices present difficulties for things like shuttles and pickers. Apple’s UIPickerView is an excellent approach to the problem of dynamic selection, but there are issues.

For one thing, UIPickerViews are BIG. They hog up a lot of precious screen real estate. This is necessary.

Also, they use the DataSource pattern, in which you supply the data at runtime, in a JIT manner. This is an excellent method, but it is rather complex. You sacrifice simplicity for power.

RVS_Spinner is a small icon, until it is touched and expanded. It is also designed to be operated by a thumb.

It also uses a fairly simple Array data provider. Simply associate an Array of structs to the control, and it’s sorted.

Radial Spinner

The way it works, is that the quiescent control is small. By default, it is an oval or circle; possibly with an image or text in it, or just an image.

Tapping on the circle pops up a surrounding ring of images, which can be rotated about the center, like a prize wheel or a knob.

One of the best things about the spinner, is that it does the “deceleration” spinning, where you can get it going quickly, and it decelerates until finally coming to a stop.

This is all incredibly easy to use. Simply drag in the view, using the Storyboard Editor, or create the class programmatically, and associate an Array of values with the control.

The control automatically resizes, based on its container, and takes care of all the basic trig and whatnot that you need to manage the radial display.

This popup is a UIView that is opened in the superview of the center, so the superview must be able to support having a larger view added.

You can prescribe the radius of the popup or UIPickerView at runtime, or in the Interface Builder/Storyboard Editor. The sizes of the images will adjust to fit the circle.

You can control the open Spinner with gestures. It was designed to be thumb-controlled; including a prize wheel spinner, where you can send the control spinning in a decelerating rotation. The top (most visible) value is the one that will be selected. Tapping in a spinning control will stop it. You can also single-tap on either side of the open control to advance (decrement) the control by one.

Picker View Variant

You can also have a standard UIPickerView come up, which may be better for larger numbers of values, or for developers that prefer a more standard Apple User Experience.

Here are the docs for the project.(Opens a New Tab). It, too, is MIT-licensed open source.

Here is where you can get it as a CocoaPod.

Here is its repo on GitHub.

It’s ready to be integrated into a project, and the test harness should help to show how its used. It’s really, really easy to use.

Demo Projects

We have prepared two demonstration projects. One demonstrates the use of the spinner from its CocoaPod, and the other demonstrates directly including the source file in your build:

The main repo project will also run the test harness, but is a lot more complex.

Also, there are quite a few examples, given in the test harness apps supplied with the library.

Persistent Preferences Utility

This is a very useful utility class for keeping a persistent state in place for any Apple app.

What Problem Does This Solve?

Storing persistent data (data that survives an app being started and stopped, or even, in some cases, transfers between apps) has always been a somewhat fraught process in app development.

Luckily, Apple has provided an excellent mechanism for this, called UserDefaults, which is part of the Foundation framework; meaning that it is supported by ALL Apple operating systems.

Saving and retrieving from UserDefaults is quite simple. You save and retrieve values in the same manner as you would a String-keyed Dictionary.

This class allows you to have an implicit global state that is accessed by simply instantiating a subclass, and you can associate top-level keys to instances, to maintain multiple sets of persistent preferences.

Here are the docs for that project (Opens a New Tab). It, too, is MIT-licensed open source.

This is the GitHub repo for the project.

THE xsd:duration XML PARSER SWIFT UTILITY

This set of extensions allows us to easily parse duration values, as expressed in XML documents that expect their duration values to be in the standard xsd:duration format.

This page does a fairly good job of explaining the format.

What Problem Does This Solve?

The duration format has a number of ways that it can be expressed, and this set of extensions should allow us to deal with all of them. It will be most useful integrated into an XML parser. It will read a duration from a String instance, and return a DateComponents instance, representing the duration in that String. You can also do the reverse, and take a DateComponents instance, and express it as a properly-formatted xsd:duration String.

Here are the docs for that project (Opens a New Tab). It, too, is MIT-licensed open source.

This is the GitHub repo for the project.

The RVS_IPAddress HANDLER SWIFT UTILITY

This struct/protocol is a basic standalone struct and String extension that makes handling IPv4 and IPv6 IP addresses quite simple.

Its principal use is to take a string that was generated by something like a text entry, and establish a proper IP address from that string. It’s a smart parser.

What Problem Does This Solve?

This was designed to allow us to simply represent IP addresses properly. This was mainly due to the complex nature of IPv6 addressing; with its shortcut syntax, representing contiguous runs of zeroes.

This class reads those properly, and will also give you properly formatted (and shortened) strings.

This is a very simple Swift utility file that you can add to your project, and have well-formed IP addresses; especially “shortened” IPv6 addresses.

Here are the docs for that project (Opens a New Tab). It, too, is MIT-licensed open source.

This is the GitHub repo for the project.

BASIC GRAND CENTRAL DISPATCH TIMER

This is a fundamental tool: A simple Grand Central Dispatch timer that either fires repeatedly, or only once.

What Problem Does This Solve?

Timers are necessary for many different reasons. They could be the driving engine of a clock app, or a UI tool to refresh a display or close a screen. This will allow leeway, which Apple suggests as a way to help reduce energy usage, and is thread-independent. You can instantiate it on any queue that you want. It’s incredibly simple. Just a set and forget, if you are firing just once, or a simple repeating callback.

Here are the docs for that project (Opens a New Tab). It, too, is MIT-licensed open source.

This is the GitHub repo for the project.

THE BAOBAB APPLICATION SERVER

The BAOBAB Server is a high-quality, high-security generic application server that was originally developed to be a solution to serve nonprofit organizations (NPOs). It is a free, open-source project that is provided as a “strings-free” resource for anyone that wants to use it.

Very Low Cost to Operate & Install

As such, it is meant to be installed on low-cost hosting, with no requirements for any special packages or dependencies. It has been developed to offer top-dollar performance for organizations that run on a shoestring.

“Off-the-Shelf” Technology

BAOBAB was deliberately designed to use common, easily-understandable, and easily-accessible technology. You can install a BAOBAB server on the cheapest, most basic hosting plan, and there are ABSOLUTELY NO licensing issues, or requirements to use any resources beyond the basic hosting plan.

Location-Biased, But Generic

BAOBAB was designed to be quite generic, but is optimized for location-based data. Every record -regardless of the data type- can have a longitude and latitude assigned.

Location Obfuscation

It also has “location obfuscation” built in, at a very low level. This is a fairly fundamental technique used to obscure the exact location of personnel and resources, while still providing enough information to access them, at a general level.

The reason for this, is because of the initial design being biased towards NPOs that serve vulnerable or otherwise sensitive populations.

Security Is Crucial

BAOBAB was designed with a focus on security since Day One. Even though it utilizes common, “off-the-shelf” technologies, the software development techniques used in its creation have focused on implementing security “all the way to the bone.”

It would be foolhardy to say that it’s “hackproof,” but it’s a tough nut to crack.

Additionally, the entire development process, from the first line of code, is available in the repository history (linked below). Auditing should be no issue at all.

Some Assembly Required

BAOBAB is not designed to be a “ready for use” system. It needs to be integrated into an application before it can be used.

That said, it was designed to make that process as straightforward as possible. That’s sort of the whole point.

Setting up a BAOBAB Server requires someone with some fairly basic expertise in PHP programming to install and establish the initial databases, but after that, all of the administration can be done via the API; which can be accessed by many different programming languages and connectivity options.

Documentation

BAOBAB is a technical infrastructure asset, and is documented as such. It is a server platform, with a published API and a couple of included SDKs.

General Documentation

This is a set of PDFs that explain the BAOBAB server at a fairly “high level.” They are designed to be printed on US Letter paper.

This is a simple 1-page overview of BAOBAB.

This is a simple 2-page overview of BAOBAB that goes into a little bit more detail.

This is a 10-page overview that discusses some of the ways that BAOBAB works; in particular, the “token-based” security system.

The Big Picture

Here is a “view from 30,000 feet” diagram of the BAOBAB Server:

The BAOBAB Server

The server was designed to be completely accessed and administered via a powerful REST API. Additionally, SDK layers are available for a couple of technologies, and more can be written as necessary.

Technical Documentation

A key fact to remember about the BAOBAB Server, is that it was originally designed to be a commercial, closed-source system. Great care was taken in assuring the quality and security of the design, code structure and documentation of the project.

It was designed to be “handed off” to professional software engineers, hired to maintain and extend it.

This means that the documentation is highly focused, and very technical. This is not for beginners, but it is extremely complete. It was designed for the “time is money” crowd.

API-Only Documentation

For most implementors, this will be all the documentation that you’ll need, once the server has been installed and set up.

It’s a powerful API, and should provide all necessary capabilities and resources.

Follow this link to be taken to the API-Only documentation. It will open another tab.

BLUE DRAGON PHP SDK Documentation

This documents the Blue Dragon PHP SDK. It will open another tab.

WHITE DRAGON IOS SDK Documentation

This documents the White Dragon iOS SDK Swift Framework. It will open another tab.

Comprehensive Project Documentation

This documents the actual PHP code of the project. It is significantly more verbose than the API documentation.

Follow this link to be taken to the Comprehensive documentation. It will open another tab.

Project Repositories and Technologies

The diagram below shows the internal structure of the BAOBAB Server. It is a “layered” system, with each layer being assigned a fundamental realm and task.

This is all transparent to the user, who would access the system via the top BASALT API.

The Internal Design Structure of the BAOBAB Server

Highly Flexible Backend

BAOBAB also has an ultra-simple database schema (It’s not really a database. It’s more of an ORM-type persistent storage engine). The database layer was designed to allow itself to be “swapped out” for other technologies, if necessary.

In the diagram above, the “swap” would likely occur at the ANDISOL level. That is the layer that completely separates the API from the specifics of the database technology.

Flexible Database Technology

The initial BAOBAB release was designed to be implemented equally well on the two main free database systems: MySQL (or MariaDB, which is a “drop-in” replacement for MySQL), and Postgres.

The databases have been tested with fairly large datasets and data types (Millions of records).

Security, flexibility, and data integrity are the main coefficients of the BAOBAB backend.

BAOBAB splits its dataset into two separate databases:

  • Security, where the user logins and security tokens live, and
  • the General Data Database, where the bulk of the information is stored.

This allows you to sequester and/or monitor the security database without introducing performance artifacts to the bulk of the data.

BAOBAB was written entirely in PHP 7, and will run on most modern PHP hosting solutions -even the cheap ones.

BAOBAB is a “faceless” server. It has been designed to be entirely accessed and administered through a secure and powerful API. This API provides both XML and JSON. They are equally well-supported. If one can do it, so can the other. In addition, all XML is supported by schema documents that explicitly define the structure of the XML data. Failure to validate an XML response against its declared schema should be considered a bug.

BAOBAB is a technical infrastructure; not a “WordPress-like one-click-install.” It requires a certain level of technical acumen.

As such, it should be adopted by cloning the delivery repo. There are also a couple of SDKs that have their own repos.

Additionally, there are a series of development repos that track the project as it was developed over a period of about seven months. These repos have test harnesses and test datasets. They are not really meant for implementors, but allow unprecedented visibility into the development of BAOBAB. It’s a completely open book.

Extensibility

The top “layer” of the BAOBAB Server is called “BASALT.” It implements a “REST Plugin” system that exposes a (relatively) simple API that lets you write your own “plugins” to add an almost unlimited range of possibilities to a server.

REST Plugins have access to the entire infrastructure of BAOAB (like the security and data model), while also allowing you to add whatever “special sauce” you like (including things like adapters to other services and dependencies). In fact, you could write a plugin that does not access the BABOAB database services at all, and simply takes advantage of the REST API infrastructure for things like user authentication.

Repo Locations

The following links will all take you to GitHub repositories. GitHub is the public repository we use to store and distribute BAOBAB.

Deliverable Repos

These repositories contain the actual “deliverable” versions of the projects; stripped of their test harness and test dataset frameworks. They contain just the deliverable code; nothing more.

This is the main server codebase. It needs to be installed on a PHP Version 7 (or greater) server, running either MySQL/MariaDB or PostgreSQL as a database engine (or both).

It also requires that the server have PHP PDO set up and enabled for the database server. This is often done automatically by hosting providers.

Otherwise, there shouldn’t be a need for much “special sauce.” BAOBAB was designed to be cheap and generic.

BLUE DRAGON is a basic generic PHP 7 client SDK for the BAOBAB server. It abstracts the REST interface (handling things like the API key/authentication and converting the server data structures into an object model), maintains state, and handles login security for the client.

It is not a plugin or module for any content management system, but would be the “baseline” for one, if you were to write it.

BLUE DRAGON does all the “heavy lifting” for interacting with the BAOBAB Server.

BLUE DRAGON is still considered “beta,” but we have high confidence in its quality.

WHITE DRAGON is an Apple Swift Programming Language framework, designed to provide a simple and seamless interface to a BAOBAB server.

Although functionally complete, WHITE DRAGON is still considered “alpha,” as it has not yet been subjected to a rigorous testing process.

Development Repos

The following repos are the ones that were used during the development of BAOBAB. They contain test harnesses and sample datasets.

BAOBAB is a “layered” system, with each layer providing a set of resources and functionalities that build upon the layers below. For a comprehensive explanation of each layer, you should check the main (comprehensive) documentation. It will open a new tab.

The following repos are in the order in which they were developed.

This is the main database abstraction layer. It interacts directly with the database via PHP PDO.

This adds some basic data handling and formatting to the simple functionality provided by BADGER. Almost all database interaction (SQL) is done through BADGER, but CHAMELEON also does a bit.

Cobra is a user security module that interacts with CHAMELEON to provide basic user-level security (we use a “token” system).

This adds a more comprehensive layer of functionality to the system. It is now completely abstracted from any database interaction; operating completely through object instances provided by CHAMELEON and COBRA.

If you were to “swap out” the backend, this is the layer at which that would be done.

BASALT implements the “REST” API. It does this via a “plugin system,” that allows a BAOBAB server to be extended fairly safely.

The Main BASALT Test Harness

This repository is the “All of the Above” repo, with a high-level test harness.

The documentation is the Comprehensive Documentation (Opens a new tab).

Licensing

BAOBAB is licensed under the MIT License. Basically, you are free to use, modify and redistribute it, but don’t come crying to us if you screw it up.

Support

BAOBAB is distributed “as is,” but is a commercial-grade project. It was originally developed with the intent to keep it “closed-source,” and its structure, quality and documentation reflect that. It is very, very well-documented; both at the high level, and the source level.

Quality and security are the two main coefficients of BAOBAB. Both have been “baked in” since Day One. Every single line of code was evaluated with the thought: “I’m a blackhat hacker with runtime access to the server, how can I use this line of code to dig in deeper?”

Quality has been assured during development by creating powerful generic test harnesses, and hundreds of test scenarios. The system was tested many thousands of times; at each step of development.

That said, BAOBAB has been released without any guarantees or assurance of fitness to your implementation. It has been designed to be modified and extended, but we (The Great Rift Valley Software Company) have no plans to extend the system beyond this initial release.

You are free to contact us, but there’s absolutely NO guarantee that we will respond or provide any kind of support or cooperation. One reason that BAOBAB is being released as open source, is because we are an Apple Swift development shop, and not a PHP shop.

We are likely to use BAOBAB internally as an application server for our own projects, and may make modifications and/or fixes to support our own projects. We reserve this right completely. We have open-sourced the project, but it is still OUR project. Complete source code, documentation, tools and development history are available in the repos listed above. If you don’t like what we do, then you are more than welcome to go back and fork the project at a point you can live with.

If you want to submit pull requests, we are quite willing to consider adding them to the codebase, but be aware that the PR must be done with intent to COMPLETELY give away the code, and we reserve the right to make modifications to the submission if we believe that makes it more applicable to either our own needs, or the needs of other users of the system.

Security is crucial. If you encounter any security issues, please contact us, and we will see if a CVE needs to be issued.

We won’t pay bug bounties, as this is a free, open-source project. However, be aware that the target audience is nonprofits; especially those that help people in need. Your contribution could, quite literally, save lives.

Top
Translate »