💻
Core Web Dev Concepts
  • Building a website of reasonable complexity
  • Setup
    • HTML, CSS and Browsers
    • Chrome DevTools
    • Local Dev Setup
  • App
    • Design
    • JavaScript
    • Code design paradigms
    • State and Props
    • JSON
    • HTML templating
    • Testing
  • Infrastructure
  • Azure web hosting
  • Web servers
  • Azure Cosmos DB
  • Concepts and Systems
  • API
  • Progressive Web Apps
  • Service Workers
  • Messaging
  • Hyperapp and pug-vdom
  • StateCharts and StateMachines
Powered by GitBook
On this page

Was this helpful?

  1. App

Code design paradigms

PreviousJavaScriptNextState and Props

Last updated 5 years ago

Was this helpful?

You can tell from my that I've chosen a functional (declarative) approach to coding, in contrast to a procedural, object oriented etc. philosophy. I can't claim to be a purist or more than scratching the surface (yes, not yet...).

A functional approach also enables a powerful paradigm, which focusses on data rather than app constructs. This means that user data, app data and app state (e.g. button status) are all defined as data structures to be transformed by functions. This approach may or may not be in contrast to common architectures enabled by , etc. using .

In either case, my approach, React and Vue have a common feature - the virtual DOM (see ).

There are many articles and books explaining functional programming and why it's useful (and interesting!). I would say that my approach to FP as practiced in can be considered 'level 1' FP, whilst 'level 2' FP uses more advanced concepts. Here are some materials:

  • FP 'level 1' includes immutability, pure functions, map, reduce and related concepts:

    • A game, perhaps a more interesting way to see example code

    • How FP functions might work

    • A great book to start with

    • A slightly more advanced book

    • And this one too is excellent

    • James Sinclair's blog posts before the series "Things I wish someone had explained to me about functional programming", in particular the "A gentle introduction to functional JavaScript"

  • FP 'level 2' includes algebraic structures, fantasy land and related concepts:

    • A great blog series on web development from a functional JavaScript perspective (try his series "Things I wish someone had explained to me about functional programming" and also his articles on monads)

    • Fantasy land specification

DEV posts
Ramda
FantasyLand
React
Vue
state and props
later content
this repository
https://cheesecakelabs.com/blog/functional-programming-game-js/
https://medium.com/dailyjs/functional-js-with-es6-recursive-patterns-b7d0813ef9e3
https://github.com/getify/Functional-Light-JS
https://github.com/MostlyAdequate/mostly-adequate-guide
https://leanpub.com/javascriptallongesix/read
https://jrsinclair.com/web-development/
https://jrsinclair.com/web-development/
https://github.com/fantasyland/fantasy-land