Mateusz Kwaśniewski
Mindventures

Frontend JavaScript Architecture - simpler (on hold) 🇵🇱 🇬🇧 2 days

Why this course?

Modern frontend JS development is way more complicated than it needs to be.

Frameworks

Current mainstream: bloated frameworks rewriting most of the browser features, with code complexity impenetrable for non-core contributors, enormous bundle sizes and never ending spiral of load time performance tricks

What could we do instead: composable zero dependency micro-libraries that we can fully understand at a code level without being a core contributor

Testability

Current mainstream: questionable testing practices (monkey patching and overwriting imports)

What could we do instead: 100% pure and testable code in the user space

Language features

Current mainstream: overuse of JS language features and tools

My JS "the best parts": pure functions and object literals

Things I'd like to avoid when writing business application code: this, new, classes, prototypes, promises, async/await, callbacks, generators, observables, mutations, reassignments, loops, hooks, nonstandard language extensions requiring transpilers/bundlers

Architectural patterns

Current mainstream: architectural patterns from the OO world that require lots of discipline, effort, boilerplate and elaborate explanation (repositories, gateways, SOLID, dependency injection, ports and adapters by convention etc.)

What could we do instead: functional architecture, dependency rejection with effects as data, ports and adapters by default

Training method

The main theme of this training is "fits in my head" - how to create JS applications that we can reason about.

Instead of using code generators and casting magic spells from the CLI we learn things from first principles.

Understanding every single line of code that we add. Solving one little problem a time.

Agenda

Frontend architecture evolution

Development without build tools

Functional architecture

Pure IO without promises/async/await/observables

Clean Code

Runtime performance optimisation

Unit Tand Integration esting

Browser Testing

Deployment to production

Tooling