Development Best Practices

We recommend some best practices to maximize development efficiency and results.

An instance is a server connection path. Give your instance a unique name such as firstInitial_lastName to avoid multiple developers changing the same instance, which can result in code overwrite or code loss. A unique name also identifies which developer is working on an instance.

If you use .zip files to transfer code, we recommend that you unzip the files into the code repository. Otherwise, change tracking only affects the entire .zip file and not the individual files within it.

In our standard processes, cartridges are not saved in .zip files. However, some implementation partners can have implemented a process where they zip versioned cartridges for storage.

It's possible to export a site into a .zip file (Site Export functionality). That .zip file contains site configuration data and other data objects. Track the contents in the versioning system.

We provide some recommendations and limitations for B2C Commerce development, including guidelines for video, email, templates, quotas, and scripts.

Video files are limited to 20MB.

Video files up to 20MB are cached. Video files greater than 20MB are not cached, but delivered in streaming mode, which degrades performance. B2C Commerce doesn't support streaming video of any kind, because we don't have a streaming server.

B2C Commerce supports download and play video; such as Flash, Windows Media and QuickTime. For high-traffic storefront pages, the recommended storefront implementation approach is to only download the container as part of initial page rendering, and subsequently download the video only upon user action (when they press play). For example, don't auto-download or auto-play as part of initial page rendering.

For heavy-use of real streaming media, or a high-volume of download and play videos (or files greater than 20MB), we recommend that you use a specialty provider (such as Akamai) to deliver this type of content. For example, the recommended storefront implementation approach is to use the absolute URL to the separately hosted rich media.

These recommendations are designed to help you better manage data-transfer allocations, and avoid overage fees

Video file support

B2C Commerce supports these formats:

  • video/ogg .ogv
  • video/webm .webm
  • video/mp4 .mp4

This lets you integrate with external applications, using the correct mime type, to show these types of videos.

Emails are limited to 3MB.

After sending an email via B2C Commerce, you might receive an error in the logs that looks like this, indicating that your email message is too large:

B2C Commerce supports outbound email sizes of 3MB or less. If you need to transfer data larger than 3MB, we recommend that you don't use email as the vehicle. B2C Commerce supports FTP, which has a much higher limit (100MB) for large files.

Templates are limited to 10MB.

If the generated output of an ISML template exceeds 10 MB, the page processing is canceled with the Exception Page size limit of 10 MB exceeded. This applies to Storefront as well as Business Manager ISML templates. The limit of 10MB should help prevent out of memory errors. It will also increase the speed of the Storefront and of Business Manager.

Exceeding the 10 MB limit in the following configurations, is know to return the error exception.

  • Large number of images configured on a product.
  • Excess content added in slot content configurations.

To decrease generated response data, set a limit for the search results, use keywords, and don't load all the data

B2C Commerce is designed to be used as an online ecommerce system. Certain constraints and limits were set during its design and implementation to accommodate this, as follows:

  • Memory usage
  • Resource consumption
  • API calls
  • Number of business objects

In the current B2C Commerce version, we monitor these limits, but do not control them. However, customized code might exceed these limits, causing errors and other forms of operational disruption. Exceeding the limits is typically caused by a direct misuse of an API, when a more resource-efficient implementation method exists for the same functionality. We will enforce these limits soon in a future version. See the B2C Commerce API Documentation for details.

The default B2C Commerce script timeout is 30 seconds.

A large number of unnecessary tax classes and jurisdictions can exceed the 10 MB limit of the ISML template. Exceeding the 10 MN limit causes the Business Manager | Ordering | Taxation Settings | TaxRate page to result in an error.