Configuration-driven search experience best practices

Use these best practices to create consistent, maintainable, and scalable search experiences. Following these guidelines helps you reduce errors, improve readability, and align your configuration with common implementation patterns.

Naming conventions

Use clear and consistent naming to make components easy to find and understand.

  • Use kebab-case for component names, such as order-new-search.
  • Include a domain prefix, such as order-, customer-, or return-.
  • Add the -search suffix for search panels.

Module registration

Decide whether to register components in a module based on your architecture.

Use module registration in these situations.

  • You work with feature modules that contain multiple components.
  • You use lazy-loaded modules.
  • You maintain shared modules.

Skip module registration in these situations.

  • You use standalone components.
  • You plan to register components manually.

Pagination strategy selection

Choose a pagination strategy that matches your data size and API behavior.

Use server-side pagination in these situations.

  • You work with large datasets.
  • You need consistent results across pages.

Use client-side pagination in these situations.

  • You work with smaller datasets, such as hundreds of records.
  • You need all data available at once.
  • Your API does not support pagination.

API configuration

Provide complete and accurate API settings to help ensure reliable integration.

Always specify the following parameters.

  • apiName to define the exact method name.
  • responseMapping.data to define the data array path.
  • responseMapping.totalCount to define the total count path.

Optionally, you can also specify the following parameters.

  • requestMapping to support non-standard API parameters.
  • requestDefaults to include common request values.