The principles of a vanilla web diet:
-
Build on what works
Our base layer should be HTML, plain and simple and doing the thing the product is meant to do. Something that looks like a button but doesn't do anything is not helping our users. When everything else fails, HTML is the thing users get - let's not deprive them of that
-
Lack of support is an opportunity
If an old browser can not do something it allows us to test for that and not give it that functionality. In 99% of the cases the functionality is a nice-to-have and not needed.
-
Browser-specific code can not be trusted
Every functionality you make dependent on browser prefixed code adds to the landfill of code that breaks very, very soon
-
Use a mix of technologies - each for what it does best
It is very tempting to do everything in JavaScript, but it is not needed
-
Ask questions
Whatever you do should be wrapped in a "if" making sure that only environments that can apply what you want get it
-
Write as much as needed, not the least possible
Let's think about what we write before we write it instead of adding lots of small, quick solutions
-
It is not about what you can add - it is about what we can't take away
Basic functionality should always be there.
-
Usefulness beats consistency across browsers
Instead of giving everyone the same experience we always consider what is the best way to ensure people can use what we build
-
Load only what is needed
Why should a browser get a library or a data file if it can not do anything with it?
-
Analysing effects beats adding FX
If you want to add shiny things, make sure they can perform in a shiny fashion, nobody likes their browser to slow down for a laggy effect.
-
Strong foundations beat a possible future addition
A lot of times we add a lot of code and interfaces to allow for a future that will need them. This future hardly ever comes about. Let's build for the now.