Web application technologies are evolving and becoming even more important. HTML/CSS/JS continues to be the primary language for web app development, but it is increasingly becoming common to build desktop applications, mobile applications, and even embedded applications with it. Simultaneously, we are seeing some really exciting things happening in the FP ecosystem and community. Functional programming is becoming more mainstream, and increasingly being applied to web development technologies.
More and more mainstream languages which are used for web development are adopting FP techniques, and providing FP oriented APIs. On the JVM you have Scala, Clojure, Kotlin, etc. Even Java has adopted things like lambdas and streams, pattern matching, as well as immutable data structures. On the dot net platform there’s F#.
Using functional programming techniques can help you improve the reliability, scalability, and maintainability of your applications. It has also been shown to provide a delightful development experience and improves developer velocity.
- Developers who work on web development projects and are interested in FP. Discover how functional programming techniques can help you be more productive.
- People who work on codebases that are becoming harder to maintain.
- Managers who want to increase productivity and velocity of their teams. Functional code is clearer and easier to refactor and maintain. You can reason about code in the absence of side effects.
- Stakeholders who want to scale their processes and teams, and keep up with industry trends. FP techniques are becoming more and more popular, and technology companies that want to compete at a global level must adopt these practices.
In short, if you are:
- a web developer,
- developer working on legacy apps,
- manager of a team,
- a stakeholder of any kind who is invested in the success of the project,
you should look at Functional Programming because it might just be what you need to make your project a success!
FP Web Conf on 29 September will be held in-person. Attendance is open to JSFoo members only. Support the community’s activities with a membership to attend the conference in-person. If you have questions about participation, post a comment here.
Participants will get an in-depth understanding of the use of functional programming techniques and principles in web development.
- You will learn how functional programming can help improve the scalability, maintainability, and reliability of their applications.
- You will understand how to approach and adopt functional programming in their own teams and how to educate and train people.
- You will gain an understanding of best practices from in-depth case studies.
- You will get to interact with a large pool of web development and functional programming professionals. It’s a great way to extend your hiring pool to include very smart, dedicated group of people and core members of the community.
The conference is curated by Anupam Jain. Anupam has been developing web apps for over a decade and a half, and works with strongly typed FP, user interfaces, analytics, and fintech. Anupam has founded the FP India user group, and is an active contributor to free and open source software, creating libraries such as the Concur UI framework. He curated PureConf also organised by Hasgeek and Juspay in 2022.
Sponsorship slots are open for:
- Companies seeking employer branding.
- Evangelism of developer tools.
- Supporting diversity in the FP Web community
If you are interested in sponsoring FP Web Conf’s activities, email email@example.com
Hasgeek’s Code of Conduct will apply to participants, speakers and sponsors.
Clojure war stories
Caveats: May not appeal if you like to think in types
Powerful but small set of abstractions - they apply in the same manner across use-cases
- Core language is designed to make the developer productive across two major host platforms - the JVM and JS
- Code/Data duality allows for an interesting ecosystem - configuration, build logic, or business logic, all can be in Clojure
- Shared logic across be/fe systems is a superpower
Focus on modeling the domain well through a few, well-defined and mature data-types and data-structures.
Few core language types that form a strong basis for modeling all kinds of business domain, but are agnostic of them. The core language contains all functions that you need to deal with these types, leaving the application developers with mostly the task of writing core business logic.
“It is better to have 100 functions operate on one data structure than to have 10 functions operate on 10 data structures.” – Alan Perlis
Front-end, back-end, build scripts, configuration, all expressed in a single language
- Business critical data fetching system that required to fetch a billion+ data-points every single day
- Existing system took days to run (generally 3, but sometimes more).
- Complex, hard to monitor
- It would sometimes fail to finish, but we’d only know after 3 days (or, when someone would keep checking logs regularly)
- Since it ran over multiple days, there would be multiple instances making it harder to keep track of status.
- Operationally a very cumbersome system. Sometimes the system would stall after multiple days and data had to be salvaged because we couldn’t afford to lose any data.
- Data was hardly fresh by the time it was loaded into the system for further processing
- Fragile, and not well architected.
- Requests to fix bugs were met with fear, let alone adding new features.
- 105K+ lines of Java code (Of course, not Java’s fault)
- First stage - the alternative implementation with better features - about 5K LoC.
- Though it’s not about LoC but more about expressibility of a solution in Clojure
- New features
- Had support for policies to handle different APIs (FB, YT, Twitter and so on)
- A new feature - appropriate retry mechanisms - that became possible
- Prioritization mechanism for different data-points - those that needed more frequent refreshes to those that could do with longer cycles
- Allowed for some data to refresh within minutes too. Unlike the old system where everything took 5 days+ (long postprocessing cycle after the fetch)
- Ability to add new crawlers that could focus on the API while the platform took care of scheduling, retrying, token policies.
- About 2K additional lines, including for a few new crawlers.
- Had support for policies to handle different APIs (FB, YT, Twitter and so on)
- The seam-less transformation between Clojure-types (the map) with JSON made the entire flow quite a breeze
- Key libraries used: core.async, durable-queue
- An assembly-line manufacturing system created with Springboot
- Unlike a regular web application, this was a stateful application that tracked material movement, stage of production and quality across multiple assembly lines in a factory
- Being stateful, no easy way to scale horizontally. System had to be up at all times. Downtimes would be planned.
- The plants are located at multiple geographical locations
- The application was to be deployed for the first time, and there was no precedent.
- Obviously, incremental deliveries was not an option.
- Made it a challenge to be sure everything was in place.
- But unknown unknowns not possible to handle.
- We had to prepare for handling the unknown unknowns at runtime
- Embedded nREPL server in Springboot applications
- Utilities to plug into the Springboot system created
- It was a huge help - we handled multiple unanticipated situations through dynamically executed Clojure code in a running system!
- The plain-vanilla approach may have required multiple redeployments with planned, coordinated downtimes
- We covered all unanticipated needs via dynamically executing Clojure, while we noted the changes that needed to be done in the primary Kotlin codebase
- The system held up for 3 weeks, after which we redeployed with updated code for the newly discovered scenarios.