The main benefit of the registerView() method is that it lets you separate the JavaScript for your Commerce website from your site’s templates.
For example, if a developer creates a widget using addChildView() and writes the widget so that it renders on the home page, a designer can add the new widget to a home page template so that it is displayed on that page.
At a later date, if the business decides the widget needs to move to a different location, the developer must change the JavaScript so that it renders elsewhere and the designer must update the theme. And, both the JavaScript and the theme must be uploaded and activated again. However, if the developer uses registerView() instead, the designer is the only person who must make a change to use the widget in a different location.
For developers who make their SuiteCommerce extensions available to external customers, the registerView() method allows you to ship extensions that are flexible. Your customers are not limited to using the functionality provided by your extension in specific places that you define. Plus, your customers do not need to make updates to their JavaScript files to use the functionality. Instead, all your customers need to do is update their theme’s templates.
The registerView() method is not a replacement for addChildView(), but it does complement addChildView() by providing more flexibility. You should use the two methods as follows:
addChildView() — You know exactly where this child view should go and it is unlikely to move because it is, for example, context-specific.
registerView()— This view could be used in several places and it is generic enough to work almost anywhere.