Tuesday, October 15, 2013

Building a data store API with PHP (2)

Next plan,

1. To reduce the speed of the query, we will add Family concept.

Each query just works on all objects of same Family.


2. We will add the User, Session, Role and Security concept.



Wednesday, October 9, 2013

Building a data store API with PHP (1)

What I want to do is try to use PHP to build a web application so that you can create JSON objects and stored in a PHP server.

The design is try to make it simple and generic.

These are some of the API functions.

1. New(json) --> You can create a completely new Object and store it into the server. A new Id supposed to be returned.

2. Wash(id, json) --> Empty fields, attributes and relations in an object.

3. Add(id, json) --> Just add new attributes and relations without delete the existing old data.

4. Mine(id, json) --> Just replace all attributes and relations with my data.

5. Your(id, json) --> Just add new attributes and relations if it does not exists.

6. Kill(id) --> Completed remove an object.

7. Query(json) --> Get a list of ids with given condition. 

8. Obtain(id[]) --> get a array of records based on the list of ids.