State maintenance is one of the key challenges we encounter while building a large scale application. If we are building our application as a platform which has some core functionalities to be utilised by ‘n’ clients which also have their own functionalities then state management becomes even nastier.
My talk would focus on key challenges we need to solve for:
1. What if the app is huge and acts as a platform, encapsulating child app(s) within it?
2. How does the child app(s) operate in isolation as well as interact with main app?
3. What if the child apps are on different tech stacks?
The platform that I am developing, is bundled with requirements of building sub-apps on top of it, which also need to scale individually. While the platform provides for core functionalities and widgets that can be utilised by sub-apps, these sub-apps also need to interact with the main app.
If there is a button click on main app which changes/publishes data/view, the sub-app needs to listen, and subsequently conform itself to the change.
This can be made possible by having a common pipeline between the two that records and notifies of each other’s state transition.
This in my case is made possible by Redux as a binding conduit. Redux takes care of state management effectively. When a sub app introduces itself in the container, the two states are combined, and subsequently manifest into a common state tree. The branches of this state tree can then be subscribed by both main and sub-apps.
I, while working at Flipkart’s Customer Experience team have built this platform and on boarded two organisations so far.
My talk would answer to the following premise:
1. How is dependency management, state transition and client side routing made possible in this scenario?
2. Do we take single store or multiple store approach given that there are multiple organisations?
3. How do we use (and reuse) ‘Container & Presentational Components’ to ensure seamless extension and minimal maintenance?
My talk is meant for all JS developers working on a large scale application. Having basic knowledge of Redux would help but it is not a prerequisite.
The audience would get a good idea on how to build a scalable application which could be utilised by many clients.
They would learn how to make a clean and readable state tree so that maintenance becomes easier and everything fits together seamlessly.
0 min - 5 mins:
My introduction and a brief over the topic.
5 mins - 10 mins:
Explain about Redux with a few examples
10 mins - 20 mins:
1. Demonstration and walk through of how such an application would work
2. Stress on different tech stacks being installed into the main app.
3. How the state tree would look like and how the sub apps would utilise it.
20 mins - 25 mins:
Live Coding and on boarding a small app into the system.
25 mins - 30 mins:
Conclude my talk.