<div class="statcounter"><a title="tumblr counter" href="http://statcounter.com/tumblr/" target="_blank"><img class="statcounter" src="http://c.statcounter.com/6284484/0/73b30f93/1/" alt="tumblr counter"></a></div>

THE BLOG

Compile djondb on Mac OSX

This is a step by step process about “Compiling djondb on Mac”, this will cover all the steps, if you already have installed one of the tools (for example home brew) then you can skip the step and move to the next one.

If you have any trouble, please let us know in the comment section, this will be updated with any new release or change to the process.

XCode

The first step is to install the xcode and the xcode command line tools, this will allow you to compile, debug, etc. It’s a prerequisite for home brew and djondb. XCode and XCode command line tools can be downloaded from apple’s developer page.

The next step will install home brew, if you already have brew installed in your system please do: “brew doctor” to check that everything is ok.

Home brew

Some of the tools required by compilation scrips will be installed using Home brew, this is a very good installation manager for OSX. The full installation instructions are in the home brew page, basically it will lead you to execute:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Once it’s installed please execute the command: brew doctor, which will check for anything that could be wrong on brew and fix the suggestions made by it.

CMake

Now with brew installed you could install some tools that will be used later:

brew install cmake
brew install git
brew install boost

Download the code

djondb source code is available at github, to download it just execute:

git clone git@github.com:djondb/djondb.git
cd djondb
git checkout devel

This compilation process is available at the current development branch, later this will be transferred to the master branch.

Make dependencies

This step will take around 15 minutes, it will compile the djondb dependencies. These dependencies will be sit at third_party/libs and third_party/includes folders.

cd <djondb dir>/db
make dependencies

Building djondb

The final step will build djondb.

cd <djondb dir>/db
mkdir build
cd build
cmake ..
make
sudo make install

Ready, one final step and everything will be set.

Make data dir

the data folder is where djondb files will be created, so you will need to create it.

cd <djondb dir>/db/third_party
sudo sh prepareDir.sh

Done, you are ready to test, run or change the code of djondb.

Management of djondb features/issues/requests

One of the key elements of open source software is to be able to keep in touch with users, also to be able to track issues and features requested by the community. Until now, We were using uservoice for this, but it wasn’t a typical solution and a djondb user suggested (thanks David for that) that the best place to get a full view of opened issues and features is the github platform, that’s why we moved all the current issues to there.

Here’s the link to the github project: http://github.com/djondb/djondb

Enjoy.

Cross
djondb

Creating a ToDo list with djondb, ASP.Net Web API and Knockout JS

Intro

In this post, we are going to create a sample ToDo list application using djondb, the enterprise class NoSQL database. The purpose of this article is to show how to use djondb in a Windows environment with .NET framework.

Setting up

First of all, install djondb, here is a video that shows how to do it: http://www.youtube.com/watch?v=Or-DzRTbZpc

Then, install install djondb’s C# driver for Windows. There is also a video for this: http://www.youtube.com/watch?v=ZaKxTLfkJeY.

Now we are running djondb in a Windows environment. Pretty simple.

Designing the application

We want to build a ToDo list. We want to:

  1. Add a task
  2. Retrieve all tasks
  3. Remove a task
  4. Complete a task from the ToDo list

We’ll create a web client using Twitter bootstrap and Knockout.js. We’ll create a REST services layer using ASP.Net Web API with .Net Framework 4.5. And, obvious, we’ll use djondb to store the tasks of the ToDo list.

The image below depicts the architecture of the application:


Read more…

Creating a product catalog with djondb, PHP Restler and Backbone JS Part V – Adding new features

Intro

In our previous post, we created the user interface components of the application. In this post, we’ll make some changes at database level and we’ll see how our application is impacted due to these changes.

In a relational database world

Now, let’s say that we want to include a new product type in the catalog. Now we want to sell phones too. What should we do in our application to support that?

In a traditional relational database, may be we should create a new table Phone to store its properties such as Manufacturer and Capacity.

But, we don’t want to repeat common properties as Name, Price and Picture, so we better create a Product table to store those properties and make a relation to Book and Phone Tables:

Read more…

Creating a product catalog with djondb, PHP Restler and Backbone JS Part IV – UI

Intro

In our previous post, we created the services layer of our application using PHP Restler. In this post, we’ll create the user interface components using backbone to consume the services we’ve created.

Creating Backbone models

First let’s create a file called models.js and define a model for a Product and for ProductCollection. Also, we’ll register here the REST URLs for each model.

This is the code for Backbone Product model:

  
window.Product = Backbone.Model.extend({

    urlRoot: "rest/products",
    idAttribute: "_id",

    defaults: {
        _id : null,
        prodtype: "",
        name: "",
        picture: null,
        author: "",
        price: "",
        releasedate: "",
        isbn: ""
   }
});
  

And this is the code for Backbone ProductCollection model:

  
window.ProductCollection = Backbone.Collection.extend({
    model: Product,
    url: "rest/products"
});
  

Read more…

Creating a product catalog with djondb, PHP Restler and Backbone JS Part III – Services layer

Intro

In our previous post, we installed djondb database and used the console for adding and retrieving products. In this post, we’ll create the services layer of our application using PHP Restler.

Installing PHP Driver for djondb

Download the djondb PHP driver from djondb downloads page: http://www.djondb.com/downloads.html. In this example we will use the 32-bit mac version of djondb’s PHP driver. Just open the mac zip file djondb_phpext_Darwin_i386.zip to extract its content (no matter where).

We’ll see the djonwrapper.php file and the modules folder with the djonwrapper.so file as shown in the following image:

Copy the djonwrapper.so file that is in the modules folder to this folder: /usr/lib/php/extensions/no-debug-non-zts-20090626/ as shown in the image below.

Read more…

Creating a product catalog with djondb, PHP Restler and Backbone JS Part II – Setting up

Intro

In our previous post, we explained the design of the application with djondb. In this post, we’ll install djondb, the enterprise class NoSQL database and we’ll play around a little bit with the console.

Installing djondb

First of all, download and install djondb. You can get the djondb installer from djondb downloads page: http://www.djondb.com/downloads.html. In this example we will use the 32-bit mac version of djondb. Just open the mac package djondb_mac.pkg and follow the instructions of the installer.

Once the installer finishes, we need to create the var/djondb directory, just run the following command in a terminal window:

    
sudo mkdir /var/djondb
sudo chown ‘id -u’ /var/djondb
    

Now, let’s start djondb server. Just, type:

    
djondbd -n
INFO: djondbd version 0.120121010 is starting up.
INFO: Starting network service. port: 1243
INFO: DBController initializing. Data dir
INFO: Accepting new connections
    

Congratulations, you have djondb, the enterprise class NoSQL database, up and running!

Read more…

Creating a product catalog with djondb, PHP Restler and Backbone JS Part I – NoSQL Concepts

Intro

In these series of posts, we’ll create a sample application using djondb database. You’ll see how easily is to create applications using a NoSQL database, especially with djondb, compared to a relational database.

In first part, we’ll start by designing our application and understanding the architecture.

In second part, we’ll install djondb and we’ll use the djondb console.

In third part, we’ll create the REST services that provide the business logic of our sample application.

In fourth part, we’ll create the client application the user will interact with.

And finally, in fifth part, we’ll add a new feature from database level and see how easy is to make this kind of changes using a NoSQL approach.

So, let’s get started…

Designing the application

The application we’ll create is a simple product catalog. The user will be able to:

  1. Browse available products
  2. See product details
  3. Add a new product to the catalog

We want to use a web browser to use the application, so the client will be an HTML, CSS and JavaScript application created with Twitter Bootstrap and Backbone.js.

Read more…

djondb is open source

djondb has been created as an open source project since beginning, but was not until now that I opened the code to the public, why? because I think the project is getting to an stable point both in features and bugs, so this is a good moment to share the code and start growing it up with the help of the community.

One of the keystones of djondb is to provide enterprises with a highly consistent database, but ensuring you can build up applications in no time, at this point this is possible and you can create applications in 10 minutes, later I will post examples of how to build applications that uses NoSQL to power up the data management and leverage the effort required to create an application from scratch.

Want to contribute?

There’re several ways to contribute to this project: The obvious one will be to get the code, create new features and help the project to grow up, but there’re other ways to help:

  • Download the database and install it on your own environment, didnt work? great send a request using the support group or post an idea/request using “feedback” (you could find it at the right in djondb.com)
  • Test the database and submit any bug you get.
  • Improve the documentation creating real life samples that I will copy’n paste in djondb documentation (I will put your name on it)
  • Post a blog about djondb encouraging your friends to use it and spread the word.
  • Need a driver?, post a request on the feedback tool or google support group and we will work on it.
  • Fork the code, hack it and do a pull request using github http://github.com/djondb/djondb

License:

djondb uses both a GPL and commercial license, if you have an special condition that requires a different license just contact us at info@djondb.com.