Friday, June 17, 2022
HomeWordPress DevelopmentWhat is the distinction between a library and a framework?

What is the distinction between a library and a framework?


From the identical article:

Offramp: For me, this is without doubt one of the advantages of libraries vs frameworks. Particularly at a bigger scale, you begin through the use of a framework, however at some later time limit, you end up having outgrown the framework (or the framework has stagnated for too lengthy), and also you need to swap. This may be actually laborious, as a result of frameworks form your code, and every framework is totally different, so there isn’t any simple migration path. The contact floor with libraries, then again, is commonly very small, making a swap from one library to a different a a lot smaller process, with a low blast radius.

As a result of “frameworks form your code” they’re imposing their very own constraints that form (, constrain, and affect) your answer structure—that in my thoughts is expressing an “opinion”, a imaginative and prescient of how issues ought to be executed.

So frameworks are inherently opinionated.

Concretely one can transfer from React, to Preact as a result of Preact intentionally mirrors React (to a degree). It is going to be extra work to maneuver to one thing like Inferno and even SolidJS. By the point we get to Svelte we’re principally speaking a few rewrite.

To me the entire “React is unopinionated” narrative is generally advertising as a result of it is much less opinionated than different frameworks which by design are extra prescriptive—as a result of their group values:

“There needs to be one– and ideally just one –obvious option to do it.”

PEP 20 – The Zen of Python

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments