I created an app in Forge UI Kit and was surprised how easy it is. Now I tried to switch to UI Kit 2 to use its additional features.
But that was not so simple as I thought (and I thought I would just need to import different libraries).
I have read the documentation and also a lot of documentation about Custom UI (although I try to avoid to switcht to Custom UI for now). But still have trouble understanding:
Why do I have to split the code into the frontend part and backend part (with resolver functions, Custom UI bridge, etc.)? Neither React nor UI Kit work like that (as far as I know)
Since (in UI Kit) I have all my code in one place, how do I decide, which code to put into the frontend and which to backend? My current understanding is that most of it will stay in frontend, but not all.
My app is Jira app, it is fetching information from Jira and also from external APIs, and it is using Storage API for project settings.
In future I would also like to switch to Native Node.js runtime.
The difference between UI Kit 1 and UI Kit 2 is ultimately where the application logic runs. In UI Kit 1 all the application logic runs in a server side lambda, whereas in UI Kit 2 the rendering logic runs in an isolated runtime on the client (i.e the browser).
In this regards it is very similar to Custom UI (in fact it uses a lot of the same underlying infrastructure) and like Custom UI it is necessary to use a resolver to access certain capabilities (like application storage).
The resolver also runs in a lambda, which is why UI Kit 1 can run entirely in the lambda, but this is why it is necessary to split code. How you handle this split really depends on what the application does so there is no simple answer.
I’ve written a few Forge applications now and in my experience I would say that the only thing I’ve had to use the resolver for is accessing storage, but of course depending on your application your scenario may change.