Project development guidelines

Edit on GitHub

Spryker OS exposes codebase projects, which enables a high level of customization and can satisfy complex business requirements.

There are different strategies developers can use to develop projects. Before starting developing, choose a development strategies that meets your requirements. To get maximum from the Spryker OS codebase, atomic releases, leverage minimum efforts for the integration of the new features and keeping system up to date, we recommend the following approaches:

  • Configuration
  • Plug and play
  • Project modules

Apply coding guidelines

Starting from the first day of development, apply the coding guidelines.

Use custom namespaces

Instead of using the Pyz namespace, create your own namespace for project development. For example, use the project name as a namespace.

Use custom names

Use custom names for everything that is added on the project level, like the following:

  • Transfers
  • Transfer properties
  • DB tables
  • DB table fields,
  • Modules
  • Classes
  • Interfaces
  • Traits
  • Properties
  • Contants

For example, customize the names by adding the project name.

Avoid using, extending, and overriding Private API

Instead of using, extending, and overriding Private API, send a request about the missing endpoints to your Spryker account manager. In future, we will add the extension points, and you will be able to extend it via Public API.

Keep modules up to date

During development and after going live, we recommend checking for security updates of external and Spryker dependencies on a regular basis.

Additionally, we recommend keeping modules up to date in general.

Development and tests

Starting from the first day of development, write tests for all the customizations you implement. We provide infrastructure for unit, functional, and acceptance tests.

Implement CI/CD

Starting from the first day of development, we recommend establishing an incremental development process based on CI/CD and the tests mentioned in the previous section.

Establish coding standards

Before you start developing, establish coding standards. Implement code checks based on the standards into your CI/CD. The default code checks shipped with Spryker are located in /config/install/sniffs.yml. You might want to add more checks that are based on your project’s requirements.

Make sure that code can’t be merged until it corresponds to your coding standards.