BloC..? understand by like Android

BloC..? understand by like Android

A82a37a81ebdd732cb60c33d868382fa?s=128

omjoonkim

July 27, 2019
Tweet

Transcript

  1. 2.
  2. 5.

    Business Logic Component BLoC? 서비스의 Business Logic을 담은(책임을 가진) 객체

    ୹୊ : https://www.slideshare.net/NaverEngineering/techcon-2019-mobile-android-model
  3. 6.

    BLoC? The BLoC Pattern has been designed by Paolo Soares

    and Cong Hui, from Google and first presented during the DartConf 2018 (January 23-24, 2018). ୹୊ : https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc/
  4. 8.

    End

  5. 19.

    BLoC is ViewModel == Presentation Logic ViewModel == Business Logic

    BLoC == Presentation Logic BLoC == Business Logic
  6. 20.

    BLoC is ViewModel == Presentation Logic ViewModel == Business Logic

    BLoC == Presentation Logic BLoC == Business Logic
  7. 30.

    Business Logic Component Rule - BLoC 로직(서비스)이 담긴 객체 The

    BLoC Pattern has been designed by Paolo Soares and Cong Hui, from Google and first presented during the DartConf 2018 (January 23-24, 2018). https://www.youtube.com/watch?v=PLHln7wHgPE ୹୊ : https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc/
  8. 31.

    Business Logic Component Rule - UI 로직(서비스)이 담긴 객체 The

    BLoC Pattern has been designed by Paolo Soares and Cong Hui, from Google and first presented during the DartConf 2018 (January 23-24, 2018). https://www.youtube.com/watch?v=PLHln7wHgPE ୹୊ : https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc/
  9. 38.

    On Flutter Repository BLoC UI Rx Rx Rx Rx Stream

    StreamBuilder Databinding Observable or Future with Acync Await
  10. 39.

    Stream Stream Observable Stream 단독 사용 가능(with StreamController). listen() 을

    통해 Subscription하는 형태로 동작. Subject docs : https://api.dart.dev/stable/2.4.0/dart-async/Stream-class.html
  11. 41.

    Stream -> Observable Observable Listen Subscription Subject Add (Sink) ଵҊ(ठۑ)

    : https://gdgkr.slack.com/archives/CAT0YEFEY/p1562064409012900
  12. 42.

    StreamBuilder @override Widget build(BuildContext context) => Scaffold( body: StreamBuilder( stream:

    bloc.state, builder: (context, AsyncSnapshot<HomeState> snapshot) => !snapshot.hasData || snapshot.data.loading ? Center(child: CircularProgressIndicator()) : _buildContentView(topPadding, snapshot.data.meetUps), ), bottomSheet: _buildBottomSheet(bottomPadding) )
  13. 43.

    StreamBuilder @override Widget build(BuildContext context) => Scaffold( body: StreamBuilder( stream:

    bloc.state, builder: (context, AsyncSnapshot<HomeState> snapshot) => !snapshot.hasData || snapshot.data.loading ? Center(child: CircularProgressIndicator()) : _buildContentView(topPadding, snapshot.data.meetUps), ), bottomSheet: _buildBottomSheet(bottomPadding) )
  14. 44.

    StreamBuilder @override Widget build(BuildContext context) => Scaffold( body: StreamBuilder( stream:

    bloc.state, builder: (context, AsyncSnapshot<HomeState> snapshot) => !snapshot.hasData || snapshot.data.loading ? Center(child: CircularProgressIndicator()) : _buildContentView(topPadding, snapshot.data.meetUps), ), bottomSheet: _buildBottomSheet(bottomPadding) )
  15. 45.

    StreamBuilder @override Widget build(BuildContext context) => Scaffold( body: StreamBuilder( stream:

    bloc.state, builder: (context, AsyncSnapshot<HomeState> snapshot) => !snapshot.hasData || snapshot.data.loading ? Center(child: CircularProgressIndicator()) : _buildContentView(topPadding, snapshot.data.meetUps), ), bottomSheet: _buildBottomSheet(bottomPadding) )
  16. 46.

    StreamBuilder @override Widget build(BuildContext context) => Scaffold( body: StreamBuilder( stream:

    bloc.state, builder: (context, AsyncSnapshot<HomeState> snapshot) => !snapshot.hasData || snapshot.data.loading ? Center(child: CircularProgressIndicator()) : _buildContentView(topPadding,snapshot.data.meetUps), ), bottomSheet: _buildBottomSheet(bottomPadding) )
  17. 50.

    Di Dependency Injection Inversion of Control Repository UI BLoC bloc

    repository something(api or xx) Maintainability and Testable
  18. 53.

    Di - Provider 가장 기본적인? DI 방식. ଵҊ : https://pub.dev/packages/provider

    Package로도 지원. ୹୊ : https://medium.com/flutterpub/architect-your-flutter-project-using-bloc-pattern-part-2-d8dd1eca9ba5 InheritedWidget✨
  19. 56.

    Stateless 더 효율적으로 렌더링 할 수는 없을까? Output이 State하나일 경우

    State가 변경되었을 때 모든 Widget이 다시 Build 된다. BLoC에 관점(플래폼 독립성)에서 가장 효율적인 렌더링 방법은..?
  20. 57.

    Cons BLoC Deep Dive Advanced ✨ Business Logic of Component

    Rx everywhere DI, Navigation, Stateless )
  21. 58.