Single Page Application Creation And Development
Before you start building single page applications (SPAs), ensure that you've enabled the required features in your account. For more information, see Prerequisites for Single Page Applications.
In NetSuite, SPAs are built in SuiteApp projects using the SuiteCloud Development Framework (SDF). The NetSuite UI Framework (UIF) provides the UI components that you can use to build your SPAs.
The following steps provide an overview of the process for developing SPAs with NetSuite UIF:
-
Create the SDF SuiteApp project where you'll build your SPA. Alternatively, you can use a sample SPA SuiteApps as a starting point or add SPAs to an existing SuiteApp project.
-
Within the SuiteApp project, create the following for each SPA implementation:
-
A unique SPA folder
-
Two required scripts: SPA client script and SPA server script
-
An SPA object definition file
-
(Optional) An assets folder
If you're using a sample project, ensure that you update the folder names, file names, and the contents for your project.
-
-
Build your application using the UI components and APIs from NetSuite UIF. You also can use SuiteScript modules in your SPA client and server scripts.
-
Convert your SPA source files and build the SuiteApp. Sample SPA projects include a
gulpfile
for the build and bundle steps. You can use this file or choose your own tool to transpile and convert the files. -
Validate and deploy your SuiteApp project.
-
Open your single page application in NetSuite.
For more information, see the following topics:
-
Creating a Single Page Application – Describes how to create an SDF SuiteApp project that includes SPAs.
-
Single Page Applications as XML Definitions – Provides information about the XML definition for an SPA (singlepageapp) SDF custom object.
-
Developing Single Page Applications – Describes how to develop the SPA client script and SPA server script.
-
Troubleshooting Single Page Applications – Provides information about errors related to SPAs.
For information about the sample SPA SuiteApps, see Single Page Application Samples.