Code for multiple platforms

You can definitely do it BUT it is very different between the platforms. Cloud is an integration platform - P2 is a plug-in framework - that’s just on the backend of things. (Ie for Cloud you have to build the auth, the db etc - you’re integrating your app with atlasian. For Server you don’t but have to deal with the atlassian database etc - you’re plugging into the atlassian app).

Then you have the front end. While the ui is pretty easy nowadays - use atlaskit and in 95% of the cases you’ll be fine. But when you’re not - it’s painful.

If you’re still in the product planning stage - start with the cloud version and keep the front end separate from the backend. Use something like lagomFetch - a library to abstract out http requests (blatant plug :slight_smile: ) to abstract out the http calls. You’ll have to do something similar for any other AP calls you might do.

Then once you’ve got the cloud version - you’ll need to backport any logic you’ve implemented on your backend to p2 logic.

In the end you’ll get a good start but the apps will start to deviate quickly and keeping them in sync is a constant effort.

/Daniel

1 Like