All Projects → MRezaNasirloo → Slick

MRezaNasirloo / Slick

Licence: other
A Reactive MVP Framework which is Slick to use

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Slick

Viabus Architecture
让 Android 开发可以像流水线一样高效的,职责分离架构 ⚡ 不同于 MVP 的配置解耦,也不能和 似是而非 的 MVVM - Clean 同日而语。VIABUS 是世界范围内首个明确提出,通过职责分离,来真正实现 UI 和 业务并行开发的 Android 项目级开发架构和设计模式理念。
Stars: ✭ 485 (+141.29%)
Mutual labels:  rxjava, reactive-programming, mvp
rxify
Now: RxJava Playground, Previous: Demo for the talk at DroidconIN 2016, Droidcon Boston 2017 and Codelab for GDG January Meetup
Stars: ✭ 59 (-70.65%)
Mutual labels:  rxjava, mvp, reactive-programming
Androidstarter
A sample Android app using the MVP architecture.
Stars: ✭ 140 (-30.35%)
Mutual labels:  rxjava, mvp
Android Base Mvp
Android Base MVP Concept with RXJava, Dagger, Event Bus, Retrofit, Glide, OkHTTP
Stars: ✭ 141 (-29.85%)
Mutual labels:  rxjava, mvp
Wanandroid
玩安卓java客户端http://www.wanandroid.com/ 模块化客户端,运用MVP+Retrofit+Rxjava+Rxlifecycle+Glide+Eventbus+ARouter等架构,构建一个最简洁的玩安卓app。
Stars: ✭ 199 (-1%)
Mutual labels:  rxjava, mvp
Cookman
一款菜谱查询工具Android APP
Stars: ✭ 186 (-7.46%)
Mutual labels:  rxjava, mvp
Retrofit rxjava mvp
Network uses Retrofit and RxJava With MVP architecture
Stars: ✭ 132 (-34.33%)
Mutual labels:  rxjava, mvp
Androidbasemvp
🚀一个快速搭建MVP+RxJava2+Retrofit 基础框架,主要是封装有Http网络请求、日志、缓存、加载等待、toast、页面状态布局管理、权限、RxBus、Glide图片加载等组件,方便快速开发新项目、减少开发成本。
Stars: ✭ 184 (-8.46%)
Mutual labels:  rxjava, mvp
Scallop
干货集中营Android app(MVP + RxJava2 + Dagger2 + Retrofit)
Stars: ✭ 120 (-40.3%)
Mutual labels:  rxjava, mvp
Iquephoto
Android Image Editor Application.
Stars: ✭ 156 (-22.39%)
Mutual labels:  rxjava, mvp
Jd Mall Master
一款高仿京东商城的UI,基于MVP的Retrofit2(okhttp3)+rxjava+dagger2+greendao+glide。该项目系仿京东商城,属于独立开发者作品,仅供参考学习,拒绝做一切商业用途,如有侵权,请告知删除
Stars: ✭ 151 (-24.88%)
Mutual labels:  rxjava, mvp
Rxfiddle
Visualize your Observables
Stars: ✭ 157 (-21.89%)
Mutual labels:  rxjava, reactive-programming
Mvpdemo
Stars: ✭ 193 (-3.98%)
Mutual labels:  rxjava, mvp
Kingtv
📺 高仿全民直播(全民TV),项目采用 MVP + RXJava + Retrofit + OKHttp + Material Design + Dagger2 + Base + Glide + GreenDao构建。因为全民TV已经凉了,导致App已经连不上。所以本项目已暂停维护。仅供学习。 推荐MVPFrame: https://github.com/jenly1314/MVPFrame 和你值得拥有的MVVMFrame快速开发框架: https://github.com/jenly1314/MVVMFrame
Stars: ✭ 1,594 (+693.03%)
Mutual labels:  rxjava, mvp
Cartoon
漫画软件——使用MVP + Retrofit + RxJava开发
Stars: ✭ 186 (-7.46%)
Mutual labels:  rxjava, mvp
Android Tech Frontier
【停止维护】一个定期翻译国外Android优质的技术、开源库、软件架构设计、测试等文章的开源项目
Stars: ✭ 10,334 (+5041.29%)
Mutual labels:  rxjava, mvp
Android Clean Architecture Boilerplate
Apply clean architecture on Android
Stars: ✭ 141 (-29.85%)
Mutual labels:  rxjava, mvp
Androidgeek
"Android Geek(Android极客)"一个专门为Android程序猿打造的极客应用。主要包括: 干货笔记、GitHub Trending、密码管理 .......
Stars: ✭ 187 (-6.97%)
Mutual labels:  rxjava, mvp
Android Architecture
🌇该项目结合 MVP 与 Clean 架构思想,探索在 Android 项目上的最佳实践。
Stars: ✭ 112 (-44.28%)
Mutual labels:  rxjava, mvp
Mvparms
⚔️ A common architecture for Android applications developing based on MVP, integrates many open source projects, to make your developing quicker and easier (一个整合了大量主流开源项目高度可配置化的 Android MVP 快速集成框架).
Stars: ✭ 10,146 (+4947.76%)
Mutual labels:  rxjava, mvp

Slick

Build Status Download

A Reactive Android MVP Framework which is Slick to use.

Slick how? see it yourself :)

No need to extend anything

public class YourActivity extends AppCompatActivity implements ViewActivity {

    @Presenter //<-- Just annotate your presenter
    YourPresenter presenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        //And call bind on the generated class with your presenter args
        YourPresenter_Slick.bind(this, 123, "foo");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_your);
    }
    
    @Override
    public showMessage(String message) {
        
    }
}

The Presenter:

public class YourPresenter extends SlickPresenter<ActivityView> {

    public YourPresenter(@NonNull int code, String s) {
    }

    @Override
    public void onViewUp(@NonNull ActivityView view) {
        //view onStart
    }

    @Override
    public void onViewDown() {
        //view onStop
    }

    @Override
    public void onDestroy() {
        //only is called once when view is finishing
    }
}

And a simple View interface, no need to extend anything

public interface ActivityView {
    void showMessage(String message);
}

Other View types have the same logic, for more detailed instruction head to Wiki

Features:

  1. Supports Activity, Fragment, CustomView, and Conductor Controller
  2. No dark magic involved, Just simple debuggable generated code
  3. Retains Presenters in disposable, lifecycle-aware singletons
  4. Reactive support inspired by MVI and Elm architecture
  5. Do not need to extend any base class for your views
  6. Easily test presenters on JVM with junit
  7. Use multiple Presenter for one view
  8. Fully Type-safe
  9. Dagger ready!

Reactive MVP Features:

  1. Unidirectional Data Flow & Immutable ViewState
  2. Automatic subscription and disposing of RxJava2 streams
public class YourPresenterUni extends SlickPresenterUni<ViewActivity, ViewStateActivity> {

    /** ... **/

    @Override
    protected void start(@NonNull ViewActivity view) {
        Observable<PartialViewState<ViewStateActivity>> like = command(ViewActivity::likeMovie)
                .flatMap(id -> repositoryMovies.like(id).subscribeOn(io))//call to backend
                .map(PartialViewStateLiked::new);

        Observable<PartialViewState<ViewStateActivity>> loadComments = command(ViewActivity::loadComments)
                .flatMap(id -> repositoryComments.load(id).subscribeOn(io))
                .map(PartialViewStateComments::new);

        subscribe(new ViewStateActivity(Collections.emptyList(), false), merge(like, loadComments));
    }

    @Override
    protected void render(@NonNull ViewStateActivity state, @NonNull ViewActivity view) {
        if (!state.comments().isEmpty()) view.showComments(state.comments());
        else view.showNoComments();
        view.setLike(state.isLiked());
    }
}

For more detailed guide on Reactive Features read the Wiki

Downloads

Packages are available in jcenter

// Base features
implementation 'com.mrezanasirloo:slick:1.1.5'

// Reactive features
implementation 'com.mrezanasirloo:slick-reactive:1.1.5'

implementation 'com.mrezanasirloo:slick-conductor:1.1.5'
implementation 'com.mrezanasirloo:slick-support-fragment:1.1.5'

annotationProcessor 'com.mrezanasirloo:slick-compiler:1.1.5'

Since Slick packages are not tied to a specific dependency you need to provide them.

// Conductor
implementation 'com.bluelinelabs:conductor:2.x.y'

// RxJava for Reactive Features
implementation 'io.reactivex.rxjava2:rxjava:2.x.y'

If you liked the project don't forget to start it ⭐️ == ❤️

Licence

Copyright 2018. M. Reza Nasirloo

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].