SuiteCommerce Solution Design Principles for Extension Development

in , November 29th, 2024
Apple magic keyboard

There are often multiple ways to build a given SuiteCommerce customization. It’s important to know what options are available and what principles to stick by when thinking about how best to build a customization.

Always Utilize Existing (Native) SuiteCommerce Code When Possible

Extending, wrapping, or otherwise manipulating existing Backbone views/models/etc is preferable to building new Backbone objects.

This will likely reduce the size of your extension while also (in many cases) causing your extension to be more robust against future SuiteCommerce updates.

Using existing code provides the opportunity to learn about the objects, see examples of other code, and increase your general knowledge of how to write SuiteCommerce code.

Want to learn more about extending or wrapping SuiteCommerce code? Check out this tutorial article on the Basics of Extending and Wrapping Native SuiteCommerce code!

Just In Time, Just Enough

Only get the exact data you need right before you need it. This is a general best practice principle for all front-end development.

Make sure you aren’t making an https request before you actually need the data, and make sure you are only returning the data you need (when possible).

Page Type Component > Router

This is a personal preference, but I recommend using the Page Type over a Backbone Router to define landing pages.

This is because the Page Type component generates a Backbone View extended from PageType.View. This view has access to extremely useful functions like “beforeShowContent”.

Load Data in a Timely Manner

It's always best practice to load data in a timely manner, but we won't go into the details of that here. There is another article I wrote that you can take a look at to learn more information on this:  “How to Make SuiteCommerce Site Wait for Data Before Page Loads.”

Use Backbone Models and Collection to Represent Your Data as Much as Possible

Especially when you are able to use existing SuiteCommerce models, using these models gives you access to tons of built-in features.

Add Configurable Settings

Within reason, more configurations never hurt anyone.

For configurations, always add handling to your code in case the configuration does not exist.

Alternative to a New Customization: Explore Pre-built Solutions

Want to explore existing (also called pre-built) extensions instead? Check out the SuiteCommerce Apps, and NetSuite Apps that we have listed! While building a brand new custom extension is often the answer, if there is already an existing solution that resolves your pain point, there's no need to reinvent the wheel!

Author: Sam Gagliardi


Got stuck on a step in this article?

We like to update our blogs and articles to make sure they help resolve any troubleshooting difficulties you are having. Sometimes, there is a related feature to enable or a field to fill out that we miss during the instructions. If this article didn't resolve the issue, please use the chat and let us know so that we can update this article!

Oracle NetSuite Alliance Partner & Commerce Partner

If you have questions about how our team can support your business as you implement NetSuite or SuiteCommerce, feel free to contact us anytime. Anchor Group is a certified Oracle NetSuite Alliance Partner and Commerce Partner equipped to handle all kinds of NetSuite and SuiteCommerce projects, large or small!

 
 

Want to keep learning?

Our team of NetSuite professionals has written articles on a wide variety of NetSuite topics, from SuiteCommerce tips, to recommended NetSuite solutions, to available support services, and more! 

Your cart