All Projects → Zhuinden → service-tree

Zhuinden / service-tree

Licence: Apache-2.0 license
[ABANDONED] A tree that stores services in its node for a given key, and allows traversing them.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to service-tree

Behavior Tree
🌲 Manage React state with Behavior Trees
Stars: ✭ 85 (+157.58%)
Mutual labels:  tree, state-management
onli-reducer
⚛️ One line reducer. State management without boilerplate.
Stars: ✭ 31 (-6.06%)
Mutual labels:  state-management
ServiceCommander-IBMi
Service Commander for IBM i
Stars: ✭ 29 (-12.12%)
Mutual labels:  service
LoveTree
🌴爱情树,将相爱的时刻永远珍藏 (微信,QQ可完美查看)https://ajlovechina.github.io/LoveTree/
Stars: ✭ 295 (+793.94%)
Mutual labels:  tree
rematch
The Redux Framework
Stars: ✭ 8,340 (+25172.73%)
Mutual labels:  state-management
backup-repository
Backup storage for E2E GPG-encrypted files, with multi-user, quotas, versioning, using a object storage (S3/Min.io/GCS etc.) and deployed on Kubernetes or standalone.
Stars: ✭ 21 (-36.36%)
Mutual labels:  service
react-state
React-State - Superpowers for managing local and reusable state in React
Stars: ✭ 14 (-57.58%)
Mutual labels:  state-management
FactoryOrchestrator
A cross-platform system service which provides a simple way to run and manage factory line validation, developer inner-loop, diagnostics, and fault analysis workflows.
Stars: ✭ 36 (+9.09%)
Mutual labels:  service
angular-odata-es5
OData Service for Angular.io (es5 version)
Stars: ✭ 45 (+36.36%)
Mutual labels:  service
ex aws rekognition
Package to use AWS Rekognition service
Stars: ✭ 21 (-36.36%)
Mutual labels:  service
android-thinkmap-treeview
Tree View; Mind map; Think map; tree map; custom view; 自定义;关系图;树状图;思维导图;组织机构图;层次图
Stars: ✭ 314 (+851.52%)
Mutual labels:  tree
BBob
⚡️Blazing-fast js-bbcode-parser, bbcode js, that transforms and parses to AST with plugin support in pure javascript, no dependencies
Stars: ✭ 133 (+303.03%)
Mutual labels:  tree
docs
PrestaShop technical documentation
Stars: ✭ 102 (+209.09%)
Mutual labels:  service
mobius.kt
Kotlin Multiplatform framework for managing state evolution and side-effects
Stars: ✭ 39 (+18.18%)
Mutual labels:  state-management
vana
Observe your immutable state trees 🌲👀 (great with React)
Stars: ✭ 24 (-27.27%)
Mutual labels:  state-management
gtree
Output tree🌳 or Make directories📁 from #Markdown or Programmatically. Provide CLI, Golang library and Web (using #Wasm ).
Stars: ✭ 88 (+166.67%)
Mutual labels:  tree
hedera-hts-demo
This is a demonstration UI for the Hedera Token Service. Written in JavaScript and Vue.JS
Stars: ✭ 66 (+100%)
Mutual labels:  service
ztree-for-react
jQuery zTreeV3.x 插件react封装
Stars: ✭ 22 (-33.33%)
Mutual labels:  tree
ex aws sns
No description or website provided.
Stars: ✭ 19 (-42.42%)
Mutual labels:  service
airad
Beego based Restful API service
Stars: ✭ 63 (+90.91%)
Mutual labels:  service

Service Tree

It's a tree that holds a Map<String, Object> in each of its nodes. Therefore, it allows you to store your services in it, each node identified by a particular key.

The service-tree is therefore a hierarchical service locator, independent from the Android platform.

This is a key difference to square/Mortar, which utilizes context.getSystemService() to create the hierarchy and inheritance.

You can also traverse the tree, either from top to bottom, or in reverse order from bottom to up.

Each Node is constructed with serviceTree.createNode(), and services can be bound to it using node.bindService(String, Object).

The first level is created with createRootNode(), the following levels are created by createChildNode().

Root nodes inherit root services, and child nodes inherit services from their parent node.

Creating a hierarchy

Singleton / Application

You can instantiate the ServiceTree as a singleton in a custom application class, and register root services with serviceTree.registerRootService(String, Object). These services are accessible by all root nodes, and children.

Activity

Activities are direct children of the root, so you can use serviceTree.createRootNode(String nodeTag);.

Fragment

Fragments are tricky, but they are children of the Activity. Their node can be created with serviceTree.createChildNode(Node parentNode, String childNodeTag);

Accessing services

The services you bind to a node can be accessed with node.getService(String serviceName).

While you're binding to a new node, you can also access the inherited services with node.getService(String serviceName).

Using Service Tree

In order to use Service Tree, you need to add jitpack to your project root gradle:

buildscript {
    repositories {
        // ...
        maven { url "https://jitpack.io" }
    }
    // ...
}
allprojects {
    repositories {
        // ...
        maven { url "https://jitpack.io" }
    }
    // ...
}

and add the compile dependency to your module level gradle.

compile 'com.github.Zhuinden:service-tree:1.6.1'

License

Copyright 2017 Gabor Varadi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].