Front End JS Frameworks

JS Frameworks

  • Provide a suite of functionality to do common tasks
  • Express.js is a "server framework"
  • Angular and React are "frontend frameworks" in JavaScript
  • Bootstrap is a CSS framework

Why Use One?

  • Using a framework helps us do common tasks more efficiently

 

  • Frameworks force us to write code in a common language (which is good)

 

  • Frontend frameworks tend to focus on dynamic browser interactions

Tradeoffs

  • Frontend Frameworks often provide features that overlap with server frameworks.
  • "Should I use EJS or Angular" for this suddenly becomes a legitimate question.

The Good

  • Robust features for dynamic browser applications (animations, 2-way databinding, user input)
  • More fluid DOM manipulation
  • Standard tools for common tasks (form validation, AJAX)
  • Standardized patterns and language

The Ambiguous and Context Dependent

  • Puts more responsibility / processing into the browser
  • Leans strongly towards API + AJAX to talk with the server / database

The Bad

  • Adds weight to initial payload due to significant extra JS assets
  • Harder to debug and test due to added complexity
  • Harder to refactor, especially as you build components that depend on each other

Relevant Industry Trends

  • We're in the "Age of JavaScript" and it's unlikely that FEFs will be abandoned
  • Adoption of a FEF is extremely common, but no consensus on which is "best"
  • New kid on the block syndrome: There is a new FW released every 3rd day, but once you pick one you are stuck

Questions?

Made with Slides.com