Skip to content

Instantly share code, notes, and snippets.

@oleksiilevzhynskyi
Last active September 18, 2024 17:04
Show Gist options
  • Save oleksiilevzhynskyi/4f74b9a570ace77814ad39055c7ae899 to your computer and use it in GitHub Desktop.
Save oleksiilevzhynskyi/4f74b9a570ace77814ad39055c7ae899 to your computer and use it in GitHub Desktop.
Grammarly web front-end resources

Grammarly web front-end resources

Note: here is a list (not complete) of valuable resources used on Grammarly web projects. Here, you may find our public talks and blog posts.

  1. Software Design
  2. Functional Programming
  3. FRP
  4. Embrace

Software Design

Read "Code Complete 2" by Steve McConnell to know/refresh common architecture practices. It's widely considered book of the best practical guides to programming for more than a decade. Then read "Domain-driven design" by Eric J. Evans to get familiar with one more approach to thinking about applications. Btw, we believe there is always a reason to follow SOLID or its modern interpretation if it.

Functional Programming

To get a brief overview of how to start thinking in FP-way, read Mostly adequate guide to FP. It's light and full of examples on JS. To get deep knowledge and level-up read Functional Programming in Scala (or gitbook). It's a serious tutorial for programmers looking to learn FP and apply it to the everyday business of coding. The book guides readers from basic techniques to advanced topics in a logical, concise, and clear progression.

We're using fp-ts on production. To get familiar with it, walk through the Practical Guide to Fp-ts. To get a more in-depth understanding, read the Functional programming with fp-ts by its author Giulio Canti.

"Patterns" to use:

Here are the most common patterns that are used in FDD. Learn them to get the most of your monads!

FRP

Start with A General Theory of Reactivity to get the concept of reactivity and how it could be mapped to your existing experiences. To bootstrap and start writhing FRP code right-away read The introduction to Reactive Programming you've been missing (by @andrestaltz). For more fundamental knowledge in building software in FRP way read Functional Reactive Programming. Stephen Blackheath and Anthony Jones or Front-End Reactive Architectures by Luca Mezzalira. Both books are pretty short, but provides a required base to start getting benefits from using reactive manifesto in your applications.

RxJS

In practive, we're using RxJS. Before writing own operator, search in this reference, there is always something suitable. To get the difference between all kinds of map, read "Comprehensive Guide to Higher-Order RxJs Mapping Operators: switchMap, mergeMap, concatMap (and exhaustMap)"

Focal

@grammarly/focal is type-safe, expressive, and composable state management for React applications. It based on calmm-js ideas. Read the introduction here: https://github.com/grammarly/focal/blob/master/README.md

Lenses and Optics

Focal uses conceprt of Lenses. There are two useful articles about lenses: one with js examples and one about "More Intuition on Optics"

Embrace

The complex projects require us to find new ways to build the front-end. That's why at some point, we decided to go even further and built a typesafe, declarative, and composable UI engine on top of React and Focal. Embrace makes UI representation truly declarative: It treats UI components as data, which can be traversed, modified, logged, and more. Check out a great article about reasons why we made it and try out Embrace for yourself.


TODO:

  • covariance and contravariance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment