In addition to following standard best practices for B2C Commerce development, follow
these best practices that are specific to Page Designer.
- Do as much planning and gathering of requirements upfront as you can with the
merchant and ecommerce director before developing page types and component
types.
- Create components that are self-contained so that any region where they are placed
can handle them as “black boxes.” To support self-containment, give each component
its own default styling, although at times you might need to adjust the styling by
specifying custom render settings.
- If you need to change the meta definition for a page or component type after the
merchant has already created instances of pages and components, be careful not to
make incompatible changes. For example, if you change the
type
value for a component attibute, you create an inconsistency between the component
type meta definition and the component data in the database. In this case, it's
better to create a new component type and deprecate the old one.
- For sites that share libraries, assign the same data and the same set of cartridges
with the same set of page and component types to each site. Sharing data and code
ensures that there aren’t inconsistencies between meta definitions and data. For
example, you could have a page that was known in one site but not another, or two
sites that use the same ID for different component types with different sets of
attributes, which would result in validation errors. Keep in mind that data and code
are shared using different mechanisms that might have multiple relationships to
sites, as follows:
Table 1.
| Entity |
Can Be Assigned To |
| Cartridge |
1...n sites |
| Library |
1...n sites |
| Conent Asset |
1 library |
| Page |
1 library |
| Component |
1 library |
| Catalog |
1...n sites |