A10 GUI Framework

Why do need to use A10's GUI framework

To provide consistency, reusability and cost savings for the construction of web UI across A10’s product portfolio, we need a common set of technologies, design guidelines, and software libraries.

Setup Issues

How do I install?

npm i -S https://github.com/a10networks/a10-gui-framework.git

Coding issues

1.Coding Style

This project code follows the Prettier coding style. Developers do not need to care of coding style consistency as long as they are using VSCode editor and have installed Prettier plugin. VScode will format your code automatically through Prettier when saving file due to .vscode/settings.json.

{
  "editor.formatOnSave": true
}

How do I use Redux with the framework?

1. Create action function

2. Create the reducer function

3. Store / call the reducer

4. Using the component

How do I use redux-observable in the framework?

1.install rxjs and redux-observable.

2.Create epic functions

3. Collect all epic functions and then export it in epics/index.ts.

4.Provide the epics to A10Provider.

Can I use redux-thunk?

Yes, redux-thunk is an asynchronous action middleware.

What are the benefits of using httpRequest?

All React-Redux applications need to communicate with an HTTP server. A set of common problems frequently arise while making HTTP requests: error handling, request cancellation, and state data management. Here are some proposals for dealing with this problems.

Generic Error Handling

GUI Framework will catch every HTTP error and program error at runtime. It analyzes the error, and dispatches out a Redux action with complete error information and appropriate error message (JSON syntax or pure text) that could be customized by app developer if needed.

Request Cancellation

Every HTTP request is able to be aborted as long as developer dispatches out a cancel action. However, if the request may affect server state change, then the server state is undefined. This cancellation facility is often used when switching pages or to stop UI operations (mainly HTTP GET requests).

State Data Management

Most developers may face issues arising from state data management in Redux store. Redux will not purge unused state data in the store by default, which may introduce unnecessary memory consumption.

Last updated

Was this helpful?