Open brylie opened 4 years ago
Most of the UI is currently rendered with jQuery-based code. We have recently started creating new functionalities and refactoring old ones using React. The way Oskari is implemented is that there's core functionality that isn't or shouldn't be tied to UI libraries and any actual functionalities/UI is provided by something we call bundles. A bundle can provide an API for other bundles or it can go further and provide a UI. Most of the bundles provide some UI and like I said we have used jQuery in the past to implement the UI. An Oskari-based application is a collection of bundles that as a group create a browser-app.
For building new functionality you can use pretty much any UI-library you can think of. So if you are more familiar with or want to use a specific library you can use it on your additions/modifications to the UI on your application. We have also documented APIs the existing bundles provide so if you want to re-implement an existing bundle with different UI-library you can and it should fit in as a drop-in replacement for an existing implementation if you implement that documented UI.
However using a new library means that the client/browser needs to download more code to run which makes the app slower and heavier to start depending on the size of the library. Also we don't have the resources to maintain variants of many functionalities. Which basically means that if you want to have your functionality in oskari-frontend so it's easily accessible by others we are only accepting React-based ones for now. Vanilla JS is also an option since that should be easy to maintain without things breaking on library updates. If you make a good case for jQuery-based functionality I can see it being merged as well for now.
That being said you can do pretty much what ever you like for the application specific implementations that are built on top of Oskari-frontend. And if you would like to submit your functionality for others to use you can consider doing it on oskari-frontend-contrib repository which has more relaxed reviews and is mostly used to provide access to functionalities that are not maintained as part of the oskari-frontend but should work with it.
Thanks for your quick follow up @ZakarFin.
No problem :)
Reopening so we remember to update the libraries page.
Made a small adjustment to the libraries page. Current thought is that we should have an updated overview page of the frontend that would include a list of the most common libraries we use and remove the libraries page from oskari.org. Maybe refer to package.json for further info.
The developer libraries list mentions several possible libraries but does not specify a requirement for any frontend framework. However, the oskari-frontend project lists React as a dependency.
Is React a strict requirement for building Oskari front-end apps or can other view layers be used to render the UI?