Frameworks and libraries provide battle-tested solutions to common problems
Frameworks guide best practices for security
Many frameworks provide a layer of protection against cross-site scripting (XSS). For instance, React uses automatic escaping to prevent developers from rendering untrusted HTML in the DOM. It’s not bulletproof but it means that a developer with no knowledge of XSS is less likely to shoot themselves in the foot.
innerHTML with some contaminated markup and 💥 you just got pwned.
Frameworks guide best practices for accessibility
In addition to written guidelines, most frameworks provide plugins or tooling to improve accessibility. For example, Create React App comes with an eslint config that checks your code for common accessibility issues. While this doesn’t guarantee AAA accessibility conformance, it at least points developers in the right direction.
Some argue that accessibility is an afterthought in most frameworks. Even if that’s true, an afterthought is still better than no thought at all. 😎
Frameworks provide a common lexicon
After using a framework for a while, you start to speak its language. Components, props, state — these mean the same thing in any React project. Having a common lexicon improves communication and helps new team members ramp-up quickly.
Frameworks are inevitable
There is a tipping point in most software projects where if you didn’t start with a framework, you inevitably start building one by accident. As you add more features, complexity creeps in and you start generalizing areas of your code. Keep doing that for a while and what you end up with is something that looks like a framework but with more bugs and less documentation than something off the shelf.
Think about the features you could have been building while you were busy debugging that DOM manipulation code. Again, using a framework allows you to focus on valuable features instead of reinventing the wheel.
Frameworks have opinions
13 Jul 2019
- Event Sourcing: Read Models are Overrated
29 Jun 2019
- Component API Flexibility in React
06 Feb 2019
- Hacking Image Interpolation for Fun and Profit
13 Jan 2019
- The Perils of Jest Snapshot Testing
07 Jan 2019
- A Better Way to Test Your React-Redux App
01 Jan 2019
- Firebase + Create React App
01 Aug 2018
- Partial Application in Action
29 Sep 2017
- Invalidate Pattern
24 Aug 2017
- Using SVG to Shrink Your PNGs
07 Sep 2014
- Adaptive Content
06 Feb 2013