1. React
  2. ReactFoo
  3. 2018 Hyderabad
  4. Presto – building cross platform transactional apps using functional programming

Presto – building cross platform transactional apps using functional programming

Naman Kalkhuria at ReactFoo 2018 Hyderabad

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. As a JavaScript house, we explored a number of options and chose PureScript as our core language. Purescript has 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 building apps using Presto, a FP based DSL. We will also see how Presto can be used with React.