3 ms·
At the moment my favorite thing to do is think about each web page as a cohesive collection of components that are the sum of what it takes to make that web pag
by jv22222 9y ago
At the moment my favorite thing to do is think about each web page as a cohesive collection of components that are the sum of what it takes to make that web page work.
ie css, html and javascript for that page contained within that page.
Then, as you notice common use cases accross pages start to abstract them to a central library (be it js, css).
This way it makes it easy to develop any size application because each page is coded as needed and code relevant to each page is always right there with it.
I've worked on plenty of codebases that start out with a central library and then build outward but they always seem harder to maintain due multiple layers of abstraction.
I guess, in summary, this method is a way to lazy load abstraction.