news.volyx.in

Write Libraries, Not Frameworks (brandons.me)

1044 points by brundolf · 2342 days ago · 327 comments on HN

Article summary

The article discusses the difference between writing libraries and frameworks, highlighting the added responsibility and limitations that come with creating a framework. It argues that frameworks should only be created when necessary and that libraries are often a better choice, especially for smaller projects or teams. The author notes that frameworks can be beneficial when backed by a major organization, but can be a significant risk for creators and users otherwise. The article concludes that libraries should be preferred over frameworks when possible.

Main themes

  • libraries vs frameworks
  • added responsibility
  • complexity and abstraction
  • tooling and integration
  • React and JavaScript frameworks
  • project planning and decision-making
  • trade-offs and pros and cons

What commenters say

  • Some commenters agree that frameworks can be overly complex and restrictive, while others argue that popular frameworks like React can be used as libraries.
  • The introduction of 'magic' in frameworks can be both beneficial and problematic, depending on the context and implementation.
  • The complexity of frameworks can lead to a high level of abstraction, which can be difficult to manage and maintain.
  • The use of XML and other markup languages can be seen as a way to provide structure and tooling, but can also be overly complicated and prone to errors.
  • React is seen by some as a library, while others consider it a framework due to its component lifecycle and state management.
  • The choice between using a framework or a library depends on the specific needs and goals of the project, and should be carefully considered.
  • Some argue that frameworks like React are not as flexible as they seem, and that their rules and conventions can be limiting.
  • The importance of considering the trade-offs and pros and cons of different approaches is highlighted, rather than simply following the latest trends or popular opinions.