Tuesday, February 9, 2021

Best Practices

 


1. Use API controllers for api calls.

. Make sure parameters in api call are handled both lowercase and uppsercase

2. Cache things on client side where possible

3. have a try/catch in everything method

4. Use Postman for post requests since they don't return data if directly called in browser

5. Use constants file

6. Configure keep alive to avoid cold starts (performance)

. Use EnalgeCors in controllers instead of adding config sections



With Item resolver:

    Out of the box first

    Any custom resolver next

    Redirects module resolver next

    404 processor last


Requests not meant for sitecore's Begin Request pipeline should be added to a config patch ignoreUrl


Redirects don't work with JSS (need to set target item in custom resolver to whatever item is meant to be rendered)


To figure out:



1. SMTP (email communication can be done through a service/endpoint)

2. Multi-site (append lang or not, domain the same for all or diff)

3. environments and their number

4. Use language version of items or not

5. API calls, both to Sitecore and other system -route through sitecore or hit directly? Security and caching. 

6. Integrations

7. Query string parameters

8. For anything that comes in lists: should you get all results on first load or load only one at a time

9. Caching strategies (on components, on api calls, etc)

10. SEO requirements (urls, trailing slashes, meta data, image sizes, server response time)



CI/CD


1. Zero downtime deployments


Search considerations


1. Which fields to search

2. If include datasource items

3. If to combine all fields involved with search into a computed index field

4. Facets

5. Boosting

6. Highlighting

7. Filtering

8. Paging

No comments:

Post a Comment