Best practices for web development
Before we dive into the best practices, let's define some terminology and find out what is a "Best Practice".
Coding Style—A coding style is a set of guidelines that specify how your code should look. The guidelines are helpful to ensure your code is easy to read and maintain. Coding styles can include such things as indentation, using tabs vs spaces, line length, naming of variables, and more.
Coding standard—A coding standard is a set of conventions regulating how your code should be written. These conventions usually include code style and formatting but can also further define how a variable should be treated and used.
Best practice—A best practice is a method or technique for coding that has consistently shown results superior to those achieved with other means. Best practices can include a combination of styles and standards.
Why should I use best practices?
There are a number of advantages for using best practices in your app development:
- Increases performance by using less CPU and bandwidth
- Improves cross-browser compatibility
- Provides maintainable code, which is important for large projects and teams
- Improves quality by making readable code, allowing for peer review and refactoring
- Helps automate tasks for continuous integration, such as build scripts and automated tests
- Makes debugging easier
- Allows new people to contribute to a project
- Saves time
- Reduces costs
Last modified: 2013-10-02