ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
FLUX ON MOBILE
Huy Pham
ABOUT ME
• Name: Huy Duc Pham
• Work: CTO at Lozi
• Interesting: Infrastructure
and Analytics
• Email: smalllion@me.com
TABLE OF CONTENTS
1. Facebook Flux
2. Flux on iOS
3. Spread
FACEBOOK FLUX
• Flux is not a framework, Flux is an application
architecture.
• Facebook uses Flux for building client-side web
applications.
• Flux has three major parts: dispatcher, store, view.
Action Dispathcher View
Action
Store
Flux architecture
FACEBOOK FLUX
FLUX ON IOS
Action View
Action
Store
Flux architecture
FLUX ON IOS
Action View
Action
Store
Flux architecture
Create an action
and pass parameters
to store
Store register
event in Action
FLUX ON IOS
Action View
Action
Store
Flux architecture
Store have models.

Store receive parameters
from Action and then update
models data
After store update models data,

models will emit change event.

Views listen to the model so views
will be changed.
SPREAD
• Spread was inspired by Flux.
• Spread has Action (named Spread), Store (named pool), and Model.
• Other features:
1. Create and mapping JSON.
2. React
3. Fetch and push data.
4. Remote event manager
5. And more…
• Github: http://github.com/huyphams/spread
SPREAD
Model
Class
Auto mapping
React
SPREAD
Objective-C Swift
SPREAD
Store
Models
Handle and
update model
React
SPREAD
Register a store
SPREAD
Speard an event to all register store

More Related Content

Flux on i os