So you’we been hearing about this Baasic stuff for a while now, and it all looks nice, but you don’t know how to use it from your favorite framework? Well, we’d like to take this opportunity to announce the release of Baasic AngularJS SDK and the accompanying documentation. As they say, AngularJS is an ideal partner with any server technology, and a logical choice for our premier SDK. Before we proceed, we should define a few terms for absolute beginners. Feel free to skip the introduction if you are already familiar with AngularJS, SDKs and related concepts and terms.

What is AngularJS?

AngularJS is an open source model-view-controller framework for client-side applications. At the moment AngularJS is one of the most popular client side JavaScript frameworks. Angular documentation itself saves us from reinventing the definition:

AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly. Angular’s data binding and dependency injection eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology.

What is SDK?

SDK stands for software development kit. This is a set of software development tools which enables developers to develop applications for a specific platform - in this case the Baasic platform.

Using an SDK when developing an application is not mandatory but it most certainly makes your life a lot easier. An SDK can be thought of as a wrapper around a “low-level” API which makes the job easy for developers. It saves you from reinventing the wheel each time you start developing a new app. If you want to take a look on how the low-level API I mention above looks and feels, please visit our introduction to Baasic REST API.

What is REST?

REST stands for REpresentational State Transfer. This is an architectural style that is often used in the development of web services. REST is often considered as a lighter and simpler alternative to SOAP and WSDL web services. REST has a decoupled architecture that makes it very popular when building cloud based APIs - an ideal match for the Baasic API.

SDK Components

Baasic SDK is divided into several different components: in this section we’ll try to describe each of them. The SDK and the documentation are hosted on GitHub. SDK is released under the MIT license.

App Settings

Baasic AngularJS app settings library provides access to the application settings Baasic service REST API. Application settings allow you to change the behavior of your Baasic app. This service can be used to manipulate settings such as: - Mailing settings - Application origin settings - Application name settings - Captcha settings - Activating or deactivating an application - Deleting an application

To find out more, please visit the SDK GitHub page and the wiki documentation page.

Articles

Articles provide a standard way to gather written work for the purpose of publishing various documents, news, posts and other similar items in your apps. Articles SDK allows you to manipulate articles in the following ways: - Adding\Removing\Updating article resources - Querying article resources - Adding\Removing\Updating article tag resources - Querying article tag resources - Adding\Removing\Updating article rating resources - Querying article rating resources - Modifying article settings which change the behavior how the article module behaves - Create\Update\Delete article permissions

To find out more, please visit the SDK GitHub page and the wiki documentation page.

Core

This is the heart and soul of the Baasic Angular SDK, as every other module depends on it. This SDK contains a set of services that allows you to: - Manage Baasic application instances - Perform low-level communication with the Baasic back-end - Perform low-level model or option transformations before they are sent to the Baasic back-end

To find out more, please visit the SDK GitHub page and the wiki documentation page.

Dynamic Resources

This module allows you to register custom data objects in your application and to create or infer their schemas.

Dynamic JSON Schema is a standard (currently draft) generated according to the JSON Schema Draft v4 specifications. As its name would suggest, it is a changeable JSON-based data structure which can be arbitrarily arranged to meet your data type needs. In other words, this schema allows you to predefine a basic structure for JSON object definitions achieving greater data reusability, flexibility and less maintenance.

Dynamic Resources SDK allows you to: - Create\Update\Delete dynamic schemas - Query dynamic schemas - Create\Update\Delete dynamic schema permissions - Create\Update\Delete dynamic resources - Query dynamic resources - Create\Update\Delete dynamic resource permissions

To find out more please visit the SDK GitHub page and the wiki documentation page.

Key-Value

Key-value storage is the simplest, highly flexible storage mechanism that allows creating and managing almost any kind of key-value pairs. Baasic Key-Value SDK allows you to: - Create\Update\Delete key-value resources - Query key-value resources

To find out more please visit the SDK GitHub page and the wiki documentation page.

Membership

Baasic membership section supports typical user and group-related actions and the SDK allows you to perform the following actions: - Create new user accounts - Recover or reset lost user passwords - Store membership information - Login or logout users - Lock\Unlock user accounts - Add\Remove\Update roles - Add\Remove users to roles

To find out more please visit the SDK GitHub page and the wiki documentation page.

Security

Baasic system provides support for CRUD policies (create, delete, read and update) that can be assigned to the previously defined users and roles. This SDK allows you to: - Create\Update\Delete CRUD policies for various modules - Consume Captcha services - Query module CRUD policies

To find out more please visit the SDK GitHub page and the wiki documentation page.

Value-Set

Value-set storage is a highly flexible storage mechanism that allows creating and managing almost any kind of value sets that are identified by their names. Value-set storage stores each unique value set only once. Therefore, the data is always normalized at the level of unique values, which eliminates the need to normalize data sets in the logical schema. Value-Set SDK allows you to: - Create\Update\Delete value set resources - Query value set resources - Create\Update\Delete value set item resources - Query value set item resources

To find out more please visit the SDK GitHub page and the wiki documentation page.

Setting up modules

You can add any library files directly into your project either by installing them using Bower. To be able to use a library, you will need to add it as a dependency to your AngularJS module. An example can be found below where all Baasic modules are added as dependencies:

(function (Main) {
  "use strict";
  var dependencies = [
    "baasic.api",
    "baasic.membership",
    "baasic.security",
    "baasic.appSettings",
    "baasic.article",
    "baasic.dynamicResource",
    "baasic.keyValue",
    "baasic.valueSet"
  ];
  Main.module = angular.module("myApp.Main", dependencies);
}
(MyApp.Modules.Main = {}));

Can I help?

We appreciate pull requests you make, and we’ll do our best to process them as quickly as we can. Even if it’s just a typo you found or any small or large issue you fixed - please do it! It will help us a lot.

If your pull request is not accepted on your first try, don’t be discouraged! If there’s a problem with your implementation, we will do our best to send the feedback on what needs to be improved.

Feel free to leave a comment

comments powered by Disqus