Lessons Learned using PureScript to build Mobile App Development Framework

schedule 03:00 PM - 03:45 PM place Grand Ball Room 1

Transactional apps are nothing but simple conversational flows between the User and System. They can be written using a simple UX DSL leveraging continuation passing style (CSP) semantics. Despite this being the most important problem to simplify, we find that the current frameworks complicate the building and maintenance of transactional apps, requiring heavy investment in engineering effort and the development process is not a pleasant creative experience.

At Juspay, we saw no reason for this to be the case, and set out to create a framework to dramatically lower the barriers of entry for quickly building out solutions to typical real world applications. Being strong believers in the functional programming paradigm, we abstracted out all the parts of an app as extremely composable lego blocks / pure functions.

We chose PureScript as our core language, for the conciseness of Haskell paired with the ubiquity of the JavaScript interpreter. The UI components and business flows are simple pure functions that are reusable across apps. The frontend and backend are unified, represented as a continuation of flow between the client and server.

In the last several months, we have made major strides towards allowing everyone in our company to be able to examine and write the code of the apps we are building -- from fresher to product manager to designer. We have trained around 100 interns on Haskell and PureScript to work on our platform in production. We have been able to deploy this framework into production in serious payment and banking systems.

In this talk, we will share our experience with PureScript. We will also dig deeper into how PureScript and a free monadic DSL helped us achieve our goal.

 
2 favorite thumb_down thumb_up 0 comments visibility_off  Remove from Watchlist visibility  Add to Watchlist
 

Outline/structure of the Session

  • Problem Context: Motivation to build this framework, Objectives and Challenges faced (3-5 mins)
    • Need for a strong type system, a language with strong theoretical foundation
    • Inspiration from category theory
    • Aptness of CPS style for transactional flows and example from Haskell Transient / MFlow
    • Challenges of building and managing multiple large scale apps in production with a team of freshers
    • Objective to improve fresher productivity by 10x and grow the team to hundreds of engineers without loss of productivity.
    • Options: What all language and Tech options we explored (3-5 mins)
    • Architecture choice: CPS style vs. ELM Architecture vs. FRP style like reactive banana
    • Language: ClojureScript vs. GHCJS vs. PureScript
  • Solution Context: Choice of PureScript, why? (3-5 mins)
    • A thoughtful and helpful community who brings in the best of Haskell's features and libraries
    • Advantages of the Haskell way compared to Lisp's way.
    • Compiled Javascript code is concise, readable and predictable.
  • Key advantages of PureScript with examples (5-10 mins)
  • Challenges or Limitations we encountered, workarounds (10-15 mins)
  • Next Steps (5 mins)
    • Visual programming, Enabling Product managers to code.
    • Building a community around the platform

Learning Outcome

  • Advantages of PureScript compared to ClojureScript or GHCJS
  • Advantages of the Haskell way compared to Lisp's way.
  • CPS style vs. ELM Architecture vs. FRP style like reactive banana

Target Audience

Programers, Architects

schedule Submitted 1 month ago

Comments Subscribe to Comments

comment Comment on this Proposal