{"id":15634736,"url":"https://github.com/sockeqwe/mosby-conductor","last_synced_at":"2025-04-13T21:36:06.846Z","repository":{"id":57724809,"uuid":"56765949","full_name":"sockeqwe/mosby-conductor","owner":"sockeqwe","description":"Plugin for conductor to integrate Mosby","archived":false,"fork":false,"pushed_at":"2020-06-04T11:31:52.000Z","size":349,"stargazers_count":131,"open_issues_count":16,"forks_count":22,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-27T11:51:19.953Z","etag":null,"topics":["architecture","conductor","mosby","mvi","mvp"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sockeqwe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-21T10:49:33.000Z","updated_at":"2024-04-18T14:50:33.000Z","dependencies_parsed_at":"2022-09-11T01:32:49.381Z","dependency_job_id":null,"html_url":"https://github.com/sockeqwe/mosby-conductor","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sockeqwe%2Fmosby-conductor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sockeqwe%2Fmosby-conductor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sockeqwe%2Fmosby-conductor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sockeqwe%2Fmosby-conductor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sockeqwe","download_url":"https://codeload.github.com/sockeqwe/mosby-conductor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788404,"owners_count":21161723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","conductor","mosby","mvi","mvp"],"created_at":"2024-10-03T10:56:08.322Z","updated_at":"2025-04-13T21:36:06.820Z","avatar_url":"https://github.com/sockeqwe.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mosby - Conductor\nPlugin for using [Mosby](https://github.com/sockeqwe/mosby) with [Conductor](https://github.com/bluelinelabs/Conductor), a small, yet full-featured framework that allows building View-based Android applications.\n\n\n## Dependencies\n[![Build Status](https://travis-ci.org/sockeqwe/mosby-conductor.svg?branch=master)](https://travis-ci.org/sockeqwe/mosby-conductor)\n\n\nFor Conductor 2.x with Mosby 3.x use:\n```groovy\ndependencies {\n    compile 'com.hannesdorfmann.mosby3:mvp-conductor:3.1.0'\n    // or\n    compile 'com.hannesdorfmann.mosby3:viewstate-conductor:3.1.0' // optional viewstate feature\n    // or\n    compile 'com.hannesdorfmann.mosby3:mvi-conductor:3.1.0' // Model-View-Intent\n}\n```\n\n### Snapshot\nLatest snapshot (from master branch):\n\n```groovy\ndependencies {\n    compile 'com.hannesdorfmann.mosby3:mvi-conductor:3.1.1-SNAPSHOT' // Model-View-Intent\n    // or\n    compile 'com.hannesdorfmann.mosby3:mvp-conductor:3.1.1-SNAPSHOT'\n    // or\n    compile 'com.hannesdorfmann.mosby3:viewstate-conductor:3.1.1-SNAPSHOT' // optional viewstate feature\n\n}\n```\n\nYou also have to add the url to the snapshot repository:\n```gradle\nallprojects {\n  repositories {\n    maven { url \"https://oss.sonatype.org/content/repositories/snapshots/\" }\n  }\n}\n```\n\n## Usage\nExtend your own Conductor `Controller` from `MvpController` or from `MvpViewStateController` if you want to use ViewState feature or from  or `MviController` if you want to use the Model-View-Intent feature.\n\nThere are also two base LCE (Loading-Content-Error) Controllers you can extend from: `MvpLceController` and `MvpLceViewStateController`.\n\nIf you don't want to extend from one of the base controller classes shown above, you can always bring in Mosby easily in any Conductor controller:\n\n```java\nclass MyController extends Controller\n                  implements MvpView, MvpConductorDelegateCallback\u003cV, P\u003e {\n\n  // Initializer block (will be copied into constructor)\n  {\n    addLifecycleListener(new MvpConductorLifecycleListener\u003cV, P\u003e(this);\n  }\n\n  // implement all methods from  MvpConductorDelegateCallback like createPresenter() etc.\n  ...\n\n}\n```\nIf you need ViewState support simply use `MvpViewStateConductorLifecycleListener` and `MvpViewStateConductorDelegateCallback`.\nDo the same for  Model-View-Intent but  use `MviConductorLifecycleListener` and `MviConductorDelegateCallback`.\n\n## Lifecycle\nPresenter will be created right after `Controller.onCreateView()` but before `Controller.onAttach()`. So in `onAttach()` presenter is ready to be used.\nView will be detached from Presenter in `Controller.onDestroyView()` by calling `presenter.detachView(true)` (`true` if view is just detached temporarily i.e. screen orientation change, `false` if view is detached permanently because `Controller` will be destroyed)\n\n## Example\n\nThere is a [nice external repository](https://github.com/jshvarts/MosbyMVP) that shows how to use Mosby-Conductor. All credit goes to [James Shvarts](https://github.com/jshvarts). \n\nThis repository contains a simple [TO DO List app](https://github.com/sockeqwe/mosby-conductor/tree/master/app) which is still work in progress.\n\n## License\n\n```\nCopyright 2016 Hannes Dorfmann\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsockeqwe%2Fmosby-conductor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsockeqwe%2Fmosby-conductor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsockeqwe%2Fmosby-conductor/lists"}