DRY: Do Repeat Yourself

  • Again, we must repeat ourselves by creating a server-generated template in addition to the Ajax script. The button will link to the template, although Ajax will override that if the JavaScript is fully loaded and supported. This is a requirement, by the way, and not a nice extra. It’s the fundament of web development. Not repeating yourself is unprofessional in this situation.

    This is terrible advice to anyone in web development. DRY is a principal for a reason that applies to web development just as much as every other form of software development: management of complexity. The more code existing in a system relates correspondingly to he complexness of the system. More complex systems, in-turn, are harder to change and harder to test. DRY limits complexity and makes it more responsive to change by (1) reducing the total amount of moving parts in the system and (2) reducing the scope of the change itself.

    The writers arguments are strawmen that don't actually say anything about DRY. Needing to ensure your application works without Javascript can be solved in various DRY ways, one of which being shared client / server JS.