Git Product home page Git Product logo

backend-0.2's Introduction

backend-0.2

Backend server for Restful APIs

Interface

Is more likey a router.

Permission

When read/write/delete data, it needs security level to limit/allow who can do 'CRUD' of data.

It is stated in interface.

guest = anonymous, not logged in user, visitor. anyone = anyone where logged in or not logged in. owner = who owns the data. admin = admin level user.

REST API

Only 'route' method can use 'success()' or 'error()'.

Any methods that are not 'route' should return a value.

Installation

How to install

http://localhost/www/backend-0.2/?route=install

How to code on installation

You can put any php script ending "_install.php" under a module folder.

Those files will be run in installation process.

Unit Test

Test script under module folder will be run on "all test run", "class test" and "method test".

Test script must end with with "_test.php".

Run all tests

To run all the tests, just access

?route=test

Run a test class

To test class

?route=model.class

Run a test method

To test class

?route=model.class.method

Class Hierarchy

Base => Taxonomy => Entity => User
Base => Taxonomy => Entity => Meta
Base => Taxonomy => Entity => Meta => Config
Base => Taxonomy => Entity => Forum => Config
Base => Taxonomy => Entity => Forum => Post
Base => Taxonomy => Entity => File

Database and Data Relation

meta table

Meta table holds meta datas.

It has model, model_idx, code and value fields plus idx, created and updated.

model

meta.model field is for a big category like "user", "forum", "file".

model_idx

meta.model_idx is to associate the meta data with the object(entity/record) of the model.

code

meta.code is a sub-category for the meta. It would be a property of a entity like "facebook address", "google plus address" of a user.

backend-0.2's People

Contributors

thruthesky avatar

Watchers

James Cloos avatar soooooooooo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.