It is the foundation of the foundation layer agnostic to the rest of the site and what your are buildingOMG look how many ppl have commented
The basic design of the Helix architecture is that it is built upon layers - the project layer sits on the feature layer which sits on the foundation layer. With the project and feature layers unable to reference one another (one project layer item cannot reference another project layer and a feature cannot reference another feature), the foundation is the only layer where modules can reference one another.
Because of this design concept, layers within the foundation begin to develop creating a "meta-layer." And within this meta-layer, sits the core of it all - the Common Foundation project. It is the foundation of the foundation layer agnostic to the rest of the site and what your are building (and it is intended that way). It contains the basic building blocks and helper classes for the other Foundation and Feature layers to reference.
When you are creating your one CXA Storefront site, it would be wise to create your own Common project to put your basic building blocks for the rest of your site to reference from. However, one takeaway I must give you is to not make this project a dumping ground for random items.
This module contains (but not limited to)...
- String Constants to use throughout your site such as (but not limited to):
- Item Cache Keys
- Configuration Field Names
- Api Routes
- Base Sitecore Data Template IDs
- Common Attributes you may use in your development process such as RequireLogin, StorefrontSessionState, or ValidateHttpPostHandler
- You will defiantly use this one. This class enables you to get the current catalog item (as in, if you are developing a module for the product page, you would call SiteContext.CurrentCatalogItem to get the product). This works with Product Items and Categories
- This is another big one you will likely use. Here, you can get the CurrentStorefrontSite to get basic configuration information you setup in your site such as pricing, allowed languages, currency and such
- Used to inherit from in your own custom commerce controller
- Basic Exceptions
- Extension Methods
- Use this to inherit from in your own custom model repository. The model repository is used to create an instance of your CXA model
- Search Helpers