← Back to context

Comment by sublinear

6 hours ago

My experience with marketing pages is that they usually have a ton of inconsistent design requirements and change frequently.

Most "frameworks" are the wrong tool because they assume that the markup and design (HTML/CSS) won't change as much as the functionality (JS) when it's exactly the opposite situation.

All the consistency needs to be concentrated in the JS without the baggage of any particular HTML/CSS in mind.

The only aspects of a framework you should want are a flexible way to register event listeners onto the elements, and organizing the styles and callbacks.

In practice, this ends up looking like a static HTML file that is not up to the developers how to organize apart from the usage of CSS classes because it will be audited by many non-devs, a Sass build derived from design guidelines with some alt classes to contain the mess when people change their minds, and some very robust JS that you're gonna have to write almost entirely from scratch.

I still don't get why this scares some people off though. You won't ever need to (re)write that much JS. Every new page design is just remapping existing functionality to the new HTML IDs, and maybe every now and then adding new functionality. Most of your time will be spent in CSS which just plain makes sense!