Start thinking in modules

Start thinking in modules

Once your website grows bigger than a couple of pages, you need to start thinking in terms of modularity. Modular websites reuse components such as menus, headers, footers, logos, etc. Instead of creating every page anew, you assemble them from the components you already have.

The main benefit of using modules is twofold:

  • You don't need to repeat yourself. You can write code once (or use someone else's code) and link it everywhere you need the same module.
  • Modular code is easier to maintain. When you need to update one of the components, the changes can be easily made in just one place.

Making your website modular can require more coding and effort initially but it leads to a much cleaner code base that is easy to maintain and scale.[[1]]

<?xml version="1.0" encoding="utf-8"?>