0 comments on “Store Locator Plus® Coding Best Practices”

Store Locator Plus® Coding Best Practices

Avoid Duplicate Code

When possible avoid duplicate code.

Duplicate code creates a larger code footprint to search through when trying to add new features are resolve bugs.

Duplicate code creates more workload for the PHP pre-compiler. This means it will consume more memory and processing time on every single PHP interaction.

Duplicate code consumes more space on disk, more space in the repositories, and in memory for processing.

Overall duplicate code makes the application less performant and more brittle.

SOP: Code Management

All development is done on personal forked copies (origin) of the primary Store Locator Plus® repositories (upstream). Upstream is considered the “single source of truth” for the current code state.

Additional Reading

Forks and Pull Requests

To begin work, fork the main Store Locator Plus® repository (upstream) to a personal repo (origin).

When code is ready to be integrated with current ongoing development effort, issue a pull request for your origin:update/<something> (see branch conventions below) branch into the upstream:develop branch. When the pull request is approved and merged, the upstream:develop branch be ready for the rest of the team.

Monitor upstream:develop regularly and be sure to fetch-and-merge (aka “pull”) the upstream:develop branch into origin:develop. Any in-progress origin:update/<something> branches that have not had a pull request issues against upstream should be rebased onto the new origin:develop branch. Make sure all conflicts are resolved.