Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoNetwork 5 user interface #8451

Open
6 tasks
jahow opened this issue Oct 17, 2024 · 11 comments
Open
6 tasks

GeoNetwork 5 user interface #8451

jahow opened this issue Oct 17, 2024 · 11 comments

Comments

@jahow
Copy link
Contributor

jahow commented Oct 17, 2024

Introduction

This proposal is meant as a complement to the GeoNetwork 5 proposal.

The goal of this proposal is to establish a strategy for the user-facing interface (frontend) of GeoNetwork 5.

More specifically:

  • Offer a continuity of functionality with the current built-in user interface of GeoNetwork 4
  • Abandon once and for all AngularJS and any other deprecated or obsolete library (e.g. Jquery)
  • Make a default user interface available out-of-the-box when deploying a GeoNetwork 5 instance without any additional steps

Proposal

The proposed solution is as follows:

  1. Build on the existing GeoNetwork-UI project to implement missing functionalities and offer a continuity with GeoNetwork 4
  2. Bundle a GeoNetwork-UI application in the GeoNetwork 5 backend that will work out-of-the-box
  3. Keep the UI code in a repository that is separate from the backend

Build on the GeoNetwork-UI project

The GeoNetwork-UI project has been around for several years now. Because so far it has lived side-by-side with the GeoNetwork 4 built-in UI, its scope does not currently cover the complete feature set that a long-time GeoNetwork user might expect.

Things that are currently not available are:

  • tools for importing metadata as batch in the catalog
  • administration options, including: harvesting, server configuration, indexation controls, healthcheck statuses & reports, classifications, users & groups management, etc.
  • a way to edit all intricate parts and fields of an XML metadata schema (e.g. ISO 19139)
  • a map viewer with map editing capabilities, querying and filtering data, printing, etc.

Although this list may seem intimidating, two things need to be taken into account here: first, these features will have to be rewritten one way or another, as they haven't existed yet in anything else than AngularJS.

Second, the GeoNetwork-UI project already has very solid foundations such as:

  • An extensible and versatile search system based on GN4 search engine
  • A wide variety of customizable presentation components bound to a simple-to-use theming system
  • An established project and repository with up-to-date dependencies, contributing guidelines, automated workflows, tooling and documentation
  • An extensive test coverage and as a result, low maintenance costs
  • Three applications already fulfilling part of the expected functionalities listed above (Datahub, Metadata Editor and Map Viewer)
  • Mechanisms to allow for customizing existing apps (e.g. NPM package export)

Lastly, one of the most remarkable aspects of the project is that it is "battle tested": the Datahub app has been in production for almost two years without any major issue and its adoption has grown organically to many geonetwork platforms. The Metadata Editor app is on the other hand going through an alpha phase right now and will be soon ready to use in production.

This proposal thus articulates itself essentially around the GeoNetwork-UI project:

  1. Introduce an "Administration" application aimed at covering most of the features offered by the Administration module of GeoNetwork 4 (minus features that will be considered obsolete)
  2. Expand the Map Viewer application to allow map creation, modification and sharing
  3. As the Metadata Editor application does not yet allow for the complete edition of XML document, a legacy editor app will be put in place to delegate this use case to the historical AngularJS-based GN4 editor
    • This application will most likely operate with an iframe pointing to the GN4 editor

Bundle default UI application in GeoNetwork 5

As was demonstrated in this previous proposal it is straightforward to include a GN-UI application in a Java backend. The frontend application will use the authentication mechanism offered by the backend.

GN-UI offers several applications targeted to different use cases, so this is what this proposal includes:

  • The Administration app will always be available and served by the GN5 backend
  • The Administration app offers an interface for enabling and configuring which frontend apps will also be provided by the backend
    • For each app, the following things can be configured: configuration (inc. theme), url path used to access the app
    • A default list of apps is included: datahub, new metadata editor, legacy editor, administration, map viewer
    • Administrators can also add links to new frontend apps to be deployed, coming from GN-UI or any other source; the only requirement is that the frontend app is made available as an archive containing the built artifacts (HTML, JS…)

Keep the UI code in a separate repository

This has been the choice made for GeoNetwork-UI from day one and it has brought significant advantages:

  • Quality assurance workflows are typically very different between a backend application and a frontend one; having a separate repository allows for QA tasks to be much more efficient and focused
  • This structure encourages decoupling of both the backend and frontend parts of the software, thus leading to a better separation of concern and easier maintenance; this is also in line with the intention for GeoNetwork 5 to have more open and easy-to-use APIs to encourage diversification of clients
  • Contributors and community have typically different sets of skills and aspirations; even though communication between backend and frontend communities is absolutely essential, it does not constitute most of the exchanges happening in the project and might end up being less readable if all communities participate in a common repository

As a result, this proposal simply advises to keep the GeoNetwork-UI code as it is currently: a separate repository organized in a "monorepo" fashion.

"Monorepo" is a term used to describe the fact that the project contains several libraries and multiple applications using them. This means that several applications can be built using the same set of components and services, thus allowing to build applications tailored to specific use-cases.

This is important as GeoNetwork-UI was designed with the intention to avoid having a unique "one-size-fits-all" application as was the case with the built-in GeoNetwork 4 UI. This approach proved very difficult to maintain in the long run, and also turned into a nearly impossible challenge in terms of UX as the intended audience was simply too broad.

The monorepo architecture of GeoNetwork-UI has stood the test of time and it is now clear that it can scale up to include new applications in the future.

Final words

This proposal is not intended to lead to implementation right away. If approved, separate proposals for each of the points above will be submitted with mockups and more detailed information.

One of the challenges of this proposal is related to the fact that many GeoNetwork contributors have not yet started working on GeoNetwork-UI. To address this, Camptocamp (main GN-UI contributor) will further expand the technical documentation of the project to make it easier for newcomers to understand the code base.

Voting

PSC Support:

  • Jose Garcia
  • Paul van Genuchten
  • Florent Gravin
  • Simon Pigot
  • François Prunayre
  • Jeroen Ticheler

Community Support:

  • Olivia Guyot (author)
@fxprunayre
Copy link
Member

"Offer a continuity of functionality with the current" and "Abandon once and for all AngularJS" sounds like a good plan but in a number of presentations or blog posts, "geonetwork-ui" is presented as a "revolution". It has also been discussed a couple of times that "geonetwork-ui" would probably not replace the current UI as a whole because the "audience is too broad" and "one-size-fits-all" approach as you pointed out. Revolution and continuity is probably something counter-intuitive to put together and that we should rephrase to what is the overall goal of GeoNetwork if both should occur?

From existing applications built with https://github.com/geonetwork/geonetwork-ui, it seems that they've been focusing on a particular type of metadata with a custom metadata model (dataset only - with discussion about services), which seems restrictive compared to what GeoNetwork was designed initially (ie. schema plugins). What is the impact of this proposal toward managing a large variety of types of resources with fine grained models?

If we fix the model and switch from an almost "schema-less" model (Dublin core, ISO, ISO plugins, ...) to a fixed one, would it make sense to fix it server side first (and simplifying database storage and everything) and then expose this model in the API and then use it on client apps? What is the benefit of having schema plugins if the client app provides a fixed model?

Beyond UI/UX and technologies, concepts used in "geonetwork-ui" apps are significantly different from GeoNetwork (eg. a metadata may be named "dataset", a draft is something else). Before adopting "geonetwork-ui" for the future GeoNetwork core user interface, it would be relevant to agree on the concepts and how to use them.

When looking at the current GeoNetwork core user interface as a whole, a variety of components are required. "geonetwork-ui" is based on https://material.angular.io/ but a number of "classic" UI components have been created from scratch (eg. https://geonetwork.github.io/geonetwork-ui/main/storybook/demo/?path=/story/layout-carouselcomponent--primary). The scope of the actual UI is quite well known for search/map/editor/admin apps, using a more complete component library (eg. https://primeng.org/carousel, https://ng-bootstrap.github.io/#/components/carousel/examples) would probably facilitate the overall work (eg. for some advanced components https://primeng.org/picklist), providing more flexibility, lowering the cost of maintenance when updating Angular and lowering the knowledge required to have a team concentrating on the catalogue user stories and related "high-level" components.

Adding "implement missing functionalities" in "geonetwork-ui" seems something that should be proposed to the "geonetwork-ui" project. This sounds quite important because as seen previously concepts are not all inlines, most of the initial work on the datahub was supported by the geOrchestra community and it is the geOrchestra home page app, "geonetwork-ui" also contains components related to other project server side packages (eg. datafeeder). So there is maybe also a question of representativity here. As a GeoNetwork PSC member, I don't feel legitimate for the "geonetwork-ui" project to choose who can become a committer or vote for a proposal... So this is maybe something to clarify.

About repository, indeed having a dedicated frontend repository has a number of advantages but we also discussed recently the need of trying to be able to plug into the application modules (eg. harvester) composed of both server side and client side code. Take the datafeeder for example, client side code in "geonetwork-ui" repo, server side code in geOrchestra. Is a mono frontend repo for lib and apps a proper approach for building such a modular system?

Although what has been done in the "geonetwork-ui" repository is of high level, I feel that it may not be the best match for a GeoNetwork evolution in continuity, if continuity represents users, peoples, companies and organisations actually contributing to core, but it is already and definitely a good source of inspiration. So it may be important to agree first on core concepts (among others: schema plugins, all-in-one or modules, type of resources, ...) and if any revolution has to occur or not and then we may be able to "establish a strategy".

@jahow
Copy link
Contributor Author

jahow commented Oct 21, 2024

Hey @fxprunayre

"Offer a continuity of functionality with the current" and "Abandon once and for all AngularJS" sounds like a good plan but in a number of presentations or blog posts, "geonetwork-ui" is presented as a "revolution". It has also been discussed a couple of times that "geonetwork-ui" would probably not replace the current UI as a whole because the "audience is too broad" and "one-size-fits-all" approach as you pointed out. Revolution and continuity is probably something counter-intuitive to put together and that we should rephrase to what is the overall goal of GeoNetwork if both should occur?

I'm not sure about the use of the word "revolution" to be honest, I can't really remember. There were many discussions already about using GN-UI to replace all of the current GN4 interface. GN-UI was always intended to be a replacement to the AngularJS UI eventually, the reasons why it hasn't happened yet are multiple and maybe not that relevant here.

From existing applications built with https://github.com/geonetwork/geonetwork-ui, it seems that they've been focusing on a particular type of metadata with a custom metadata model (dataset only - with discussion about services), which seems restrictive compared to what GeoNetwork was designed initially (ie. schema plugins). What is the impact of this proposal toward managing a large variety of types of resources with fine grained models?

GN-UI can show whatever records are present in the ElasticSearch index. There is no technical limitation here, only the lack of intent so far.

If we fix the model and switch from an almost "schema-less" model (Dublin core, ISO, ISO plugins, ...) to a fixed one, would it make sense to fix it server side first (and simplifying database storage and everything) and then expose this model in the API and then use it on client apps? What is the benefit of having schema plugins if the client app provides a fixed model?

This is a wider consideration than goes beyond this proposal. GN-UI simply renders whatever it is given either as XML records or documents from ElasticSearch (similar to the GN4 interface). That said, one obvious benefit of schema plugins is the ability to index metadata records of many different forms and shapes under a common index document model.

Beyond UI/UX and technologies, concepts used in "geonetwork-ui" apps are significantly different from GeoNetwork (eg. a metadata may be named "dataset", a draft is something else). Before adopting "geonetwork-ui" for the future GeoNetwork core user interface, it would be relevant to agree on the concepts and how to use them.

The way things are shown and named in GN-UI is usage-driven. If usage dictates that metadata should be called metadata, then so be it!

When looking at the current GeoNetwork core user interface as a whole, a variety of components are required. "geonetwork-ui" is based on https://material.angular.io/ but a number of "classic" UI components have been created from scratch (eg. https://geonetwork.github.io/geonetwork-ui/main/storybook/demo/?path=/story/layout-carouselcomponent--primary). The scope of the actual UI is quite well known for search/map/editor/admin apps, using a more complete component library (eg. https://primeng.org/carousel, https://ng-bootstrap.github.io/#/components/carousel/examples) would probably facilitate the overall work (eg. for some advanced components https://primeng.org/picklist), providing more flexibility, lowering the cost of maintenance when updating Angular and lowering the knowledge required to have a team concentrating on the catalogue user stories and related "high-level" components.

Using PrimeNG is absolutely something that can be considered, although I would call this an implementation detail. A lot of effort happened on the presentation layer (UI components) in GN-UI because the added value of this project has always been a very good user experience. That includes sticking precisely to a design, which is not always practical with component libraries.

Adding "implement missing functionalities" in "geonetwork-ui" seems something that should be proposed to the "geonetwork-ui" project. This sounds quite important because as seen previously concepts are not all inlines, most of the initial work on the datahub was supported by the geOrchestra community and it is the geOrchestra home page app, "geonetwork-ui" also contains components related to other project server side packages (eg. datafeeder). So there is maybe also a question of representativity here.

Datafeeder is indeed mostly a geOrchestra app and its fate is still unclear for now. Please keep in mind that the work on this app also helped push the GN-UI project forward. This being said, most of the recent funding comes from non-geOrchestra customers, e.g. Swisstopo in CH and IGN in FR.

As a GeoNetwork PSC member, I don't feel legitimate for the "geonetwork-ui" project to choose who can become a committer or vote for a proposal... So this is maybe something to clarify.

I'm sorry but I'm not sure I understood this part. Are you saying that the GN-UI project shouldn't have its own group of committers?

About repository, indeed having a dedicated frontend repository has a number of advantages but we also discussed recently the need of trying to be able to plug into the application modules (eg. harvester) composed of both server side and client side code. Take the datafeeder for example, client side code in "geonetwork-ui" repo, server side code in geOrchestra. Is a mono frontend repo for lib and apps a proper approach for building such a modular system?

Grouping code by domain (e.g. harvesting, editing, etc.) instead of by architecture (e.g. frontend, backend) would be a completely different paradigm. But so far I haven't seen something like that clearly expressed for GN5. The planned architecture of GN5 seems to be a monolithic server application similar to GN4.

There will always be the possibility to add modules/plugins in the backend and write a custom frontend app to interact with their own API. If a plugin lives in a separate repository, then this repository could contain both the backend and frontend code.

Although what has been done in the "geonetwork-ui" repository is of high level, I feel that it may not be the best match for a GeoNetwork evolution in continuity, if continuity represents users, peoples, companies and organisations actually contributing to core, but it is already and definitely a good source of inspiration. So it may be important to agree first on core concepts (among others: schema plugins, all-in-one or modules, type of resources, ...) and if any revolution has to occur or not and then we may be able to "establish a strategy".

Let me know if my answer helped clarify things, and hopefully we can agree on those topics sooner than later.

@ticheler
Copy link
Member

Thanks for the proposal @jahow! I subscribe to the high level concept of building separate Apps for clearly defined audiences. This should provide developers the ability to develop new Apps for things we currently don't even know we need them.
At the same time, I am not convinced about the monorepo approach with an implicit requirement to use the the library of components you have been developing so far. We should probably have such library as an external component that a developer can use in his/her App.

So what I would like to see is a repository of Apps and a separate repository with a component library that can be used to build an App. But not intertwined in one geonetwork-ui repository.

The Apps provided can be a full-fledged editor that is controlled by the metadata schemas as we currently know in GN4, or one that is build as you currently do in gn-ui. Same for the search front end. Datahub is an option, as well as a front end that has a different perspective on a search interface and can be oriented to a different audience. The same is true for every other type of App developed.

@ticheler
Copy link
Member

Thanks also for the contributions @fxprunayre! I think my response above also aligns with that. @jahow, my idea is that we actually work towards a model where the back end may be "monolitic" but extensible, while the front end could consist of multiple isolated applications that target specific use cases. Those then use the same back end services, authentication and authorisation mechanisms.

@jahow
Copy link
Contributor Author

jahow commented Oct 22, 2024

So what I would like to see is a repository of Apps and a separate repository with a component library that can be used to build an App. But not intertwined in one geonetwork-ui repository.

In my opinion this is really hard to do in practice. Any feature implemented in an application will require in 99% of cases to modify both the app code and the components it uses. There is simply no way to come up with a components library that won't evolve over time to meet the apps needs. This means that having both app and component code in separate repositories will be a huge hurdle as time goes on, because development will be done on both in parallel.

The monorepo paradigm is essentially a response to this, as it allows to gather all development efforts in one repository while offering tools to run tasks only on affected parts of the apps-libs graph.

Please also keep in mind that presentation components are only a fraction of what has been done in GN-UI. A big part of the efforts went into creating a search system, map-related functionalities, data visualization, querying the API for keywords, thesauri, translations, etc. And these can be used with any presentation component.

@jahow
Copy link
Contributor Author

jahow commented Oct 23, 2024

Just to be clear, I would definitely understand if this proposal doesn't go through because of all the work done in https://github.com/GeoCat/geonetwork/tree/features/frontend-exp. GN-UI can stay as it currently is, but I just feel like having a clear and sound strategy for the UI of GeoNetwork would be beneficial for the community as a whole.

@fgravin
Copy link
Member

fgravin commented Oct 23, 2024

Thank you @jahow for this great and detailed proposal.
Also thank you @fxprunayre and @ticheler to expose your feedback with details and transparency.

First of all, I think that we should not confuse geonetwork-ui and the datahub
You emphase a lot on the datahub, which is just one application of the proposed architecture.
The datahub is not meant te replace the default UI of geonetwork 5.

Our proposal is

  • not to make the datahub the official UI.
  • but it's about using geonetwork-ui to build further applications of GeoNetwork 5 (search, admin and so on).

geonetwork-ui has benefited from hundreds of days of development, supervised by frontend architects and experts.

  • The major effort was probably not to develop applications, but to maintain a strong, robust, modern and uptodate architecture.
  • It's heavy tested (80% unit test coverage + e2e tests for applications), showing no significant regressions. The project is very healthy and I really do think that it provides an excellent foundation for building applications.

Honestly, I wouldn't really understand why the GeoNetwork project wouldn't build on top of this solid foundations, and would rather rewrite it all from scratch.

As @jahow said, presentation is one thing, but the major value of geonetwork-ui is not the UI components, but what we called the smart components (+ all the architecture of the repository).

  • define a search state
  • routing
  • interacting with the APIs
  • implementing all the logic about metadata management (parsing, links management etc..)
  • implementing high level features (mapviewer, editing, search etc..)
  • and many more business logic about GeoNetwork

You could build any application, with any UI requirement, with any UI components on top of this logic, but it would just be a waste to rewrite all the core logic.

Now, let's try to answer some of your feedback

"Offer a continuity of functionality with the current" and "Abandon once and for all AngularJS" sounds like a good plan but in a number of presentations or blog posts, "geonetwork-ui" is presented as a "revolution". It has also been discussed a couple of times that "geonetwork-ui" would probably not replace the current UI as a whole because the "audience is too broad" and "one-size-fits-all" approach as you pointed out. Revolution and continuity is probably something counter-intuitive to put together and that we should rephrase to what is the overall goal of GeoNetwork if both should occur?

I don't see the point here. Why not bringing revolution in GeoNetwork 5 ? Why would it cut with continuity ?
Anyway, we probably used the word "revolution" in marketing purpose to talk about the Datahub or the metadata-editor, not to talk about geonetwork-ui. Revolution is probably subjective, I think that the Datahub brought a revolution within GeoNetwork in term of UX yes. But you can build a non-revolutionary frontend application based on geonetwork-ui if you wish to do so for GN5.

From existing applications built with https://github.com/geonetwork/geonetwork-ui, it seems that they've been focusing on a particular type of metadata with a custom metadata model (dataset only - with discussion about services), which seems restrictive compared to what GeoNetwork was designed initially (ie. schema plugins). What is the impact of this proposal toward managing a large variety of types of resources with fine grained models?

If we fix the model and switch from an almost "schema-less" model (Dublin core, ISO, ISO plugins, ...) to a fixed one, would it make sense to fix it server side first (and simplifying database storage and everything) and then expose this model in the API and then use it on client apps? What is the benefit of having schema plugins if the client app provides a fixed model?

There is no restriction in geonetwork-ui about using dataset only. Again, it's something about the datahub, which is about to change (services, maps and most of all resource types will be handled).
There is no restriction about schema either. We defined a typed pivot format for UI internal needs. It's exactly what is done in AngularJs and GeoNetwork 4, the pivot format is the Elasticsearch document model. You don't use XML in the GN4 UI, but ES objects. It's the same in geonetwork-ui, but the model is a business model, not an implementation detailed from ES mapping.
It means that if ISO contains expected informations which are not in the model yet, either we can extend the model, or add those properties in extra fields. It's exactly what is done in GN4 when you need to use a new ISO property, you add it in the index.

Beyond UI/UX and technologies, concepts used in "geonetwork-ui" apps are significantly different from GeoNetwork (eg. a metadata may be named "dataset", a draft is something else). Before adopting "geonetwork-ui" for the future GeoNetwork core user interface, it would be relevant to agree on the concepts and how to use them.

I agree, we called this a dataset in order to focus on the bridge between opendata catalogs and geometadata catalogs, which I think is a need from many users of GeoNetwork. But as we think of showing services now as well, maybe this name is not relevant anymore.
I fully agree that a strong work on defining the business model and its vocabulary is critical. We have worked a lot on the business domain, with constant refactoring, so any proposition to make it better is welcome.

When looking at the current GeoNetwork core user interface as a whole, a variety of components are required. "geonetwork-ui" is based on https://material.angular.io/ but a number of "classic" UI components have been created from scratch (eg. https://geonetwork.github.io/geonetwork-ui/main/storybook/demo/?path=/story/layout-carouselcomponent--primary). The scope of the actual UI is quite well known for search/map/editor/admin apps, using a more complete component library (eg. https://primeng.org/carousel, https://ng-bootstrap.github.io/#/components/carousel/examples) would probably facilitate the overall work (eg. for some advanced components https://primeng.org/picklist), providing more flexibility, lowering the cost of maintenance when updating Angular and lowering the knowledge required to have a team concentrating on the catalogue user stories and related "high-level" components.

You are right. When choosing a way to implement a UI component, we have to think about the tradeoffs :

  • the effort to build it by our own
  • the risk to rely on external libraries
  • how to adapt an existing component to our specific needs

We've built some components, we use some ng-material ones (which is the official UI library from Angular), we use external UI components from external libraries... It's not always easy to choose the correct solution. We use ng-prime in another project and I wanted to use the inplace component from Prime in the editor so the topic is fully opened about that.

Note that this is a presentation detail, and that we could use other UI libraries within geonetwork-ui repository, or within new applications. This is not a limitation in geonetwork-ui.

Adding "implement missing functionalities" in "geonetwork-ui" seems something that should be proposed to the "geonetwork-ui" project. This sounds quite important because as seen previously concepts are not all inlines, most of the initial work on the datahub was supported by the geOrchestra community and it is the geOrchestra home page app, "geonetwork-ui" also contains components related to other project server side packages (eg. datafeeder). So there is maybe also a question of representativity here. As a GeoNetwork PSC member, I don't feel legitimate for the "geonetwork-ui" project to choose who can become a committer or vote for a proposal... So this is maybe something to clarify.

As already mentioned, the datafeeder should be removed from geonetwork-ui.
geonetwork-ui is widely adopted, outside of the geOrchestra community. But you are right, the project should be driven only from GeoNetwork needs. Most of the contribution in geonetwork-ui are toward metadata management needs, about data discovery, which is aligned with GeoNetwork scope IMO.
We call for more GN core contributors to actively engage in the project and help steer the development of GeoNetwork-UI in alignment with GeoNetwork's expectations.

About repository, indeed having a dedicated frontend repository has a number of advantages but we also discussed recently the need of trying to be able to plug into the application modules (eg. harvester) composed of both server side and client side code. Take the datafeeder for example, client side code in "geonetwork-ui" repo, server side code in geOrchestra. Is a mono frontend repo for lib and apps a proper approach for building such a modular system?

Although what has been done in the "geonetwork-ui" repository is of high level, I feel that it may not be the best match for a GeoNetwork evolution in continuity, if continuity represents users, peoples, companies and organisations actually contributing to core, but it is already and definitely a good source of inspiration. So it may be important to agree first on core concepts (among others: schema plugins, all-in-one or modules, type of resources, ...) and if any revolution has to occur or not and then we may be able to "establish a strategy".

I don't know if it's really "high level", what I know is that it's very important emphase on the design of the architecture, to build clean and strong foundations so that it's easy

  • to make the system evolve
  • to maintain the system
  • to test the system
  • to attract developers

From my experience, a one man system growing and growing won't result in a code base which will be easy to maintain, develop, and onboard people.

At the same time, I am not convinced about the monorepo approach with an implicit requirement to use the the library of components you have been developing so far. We should probably have such library as an external component that a developer can use in his/her App.

So what I would like to see is a repository of Apps and a separate repository with a component library that can be used to build an App. But not intertwined in one geonetwork-ui repository.

An application in geonetwork-ui could not rely at all on the library of components of the repo. It would be a waste not to use the logic, but it would be perfectly fine not to use the UI components.

@ticheler could you please develop maybe a bit your vision about your repo (which would not be a monorepo), but which would contain several applications ? How do you see this technically, one Angular application per folder, or an Angular space with several application but no library ?

Having a monorepo ensures that all the applications are on the same code base (at least the same version of Angular), and that the reused code is shared between the applications. I don't really see the benefit of building several applications completely independent from one to the others .. like one app for the search, one for the admin and one for the editor ? It's not clear to me.
You would have to write and maintain the same code over and over in every applications...

That's all for my feedback.
Thanks for the passionate debate and let us know if our answers make things clearer in your mind, and add new elements in your thought 🙌

@fxprunayre
Copy link
Member

all the work done in https://github.com/GeoCat/geonetwork/tree/features/frontend-exp.

The prototyping (which was not that much work) done this summer in https://github.com/GeoCat/geonetwork/tree/features/frontend-exp is mainly about analyzing how to do a progressive move from AngularJS to something else in continuity with some of the actual base concepts in use by existing users and define a way for an (client and server) evolution rather than a (client facade only) revolution. This is not an easy exercise due to the complexity of the project and a strategy need to be defined to progressively move from one camp to another and another ...

eg.

  • How to address first the search app keeping the current map viewer (which will be a major task)?
  • Evaluate the benefit of using existing component library in this case done with https://primeng.org/.
  • Evaluate webcomponents use for customizable catalogue views with enough flexibility on the model (eg. a schema plugin defining a new index field can be used directly without changing client side model).
  • Evaluate existing theming architecture to allow easier customization of the layout eg. https://v18.primeng.org/theming, home made theme in replacement of actual CSS properties and WRO4J runtime build.
  • How to simplify search facades using signal based approach instead of the complex SearchController of GN4 or the not so simple reducers/effects of GN-UI?
  • How to embed a JS app in the GN5 Spring boot prototype?
  • Learn about Angular ...

GN-UI definitely set up quite some logic (with new UI configuration model, a new themes mechanism, a new metadata model, a new search model, a new editor config, "forget about metadata schema"...) but with limited consideration about the (maybe wrong, outdated, whatever...) principles of the current app. Again, having some inline concepts or minimum convergence between server and client side and with the past approaches would facilitate adoption. 

From my experience, a one man system growing and growing won't result in a code base which will be easy to maintain, develop, and onboard people.

I still see a couple of names on the commit history https://github.com/geonetwork/core-geonetwork/commits/main/ but that's definitely a challenge for an old project like GeoNetwork. Again, coding a client facade with the latest framework will not help the project as a whole. GeoNetwork 5 proposal is all about defining strategy to cut complexity, improve performances, redefine business model taking into consideration our history and nowadays needs, ... In 2022, around Bolsena's dinner table, a company explained that the level of the project was not anymore good enough for their standards and in a rather solmn manner announced to abandon maintenance of the core project. This doesn't sound the best way to collaborate on the long term and onboard people. Java may be scary and XSLT even worse, and Angular ..., but the project should be considered as a whole with its active and past contributors, users and history (thanks to all of them).

As already mentioned, the datafeeder should be removed from geonetwork-ui.

Maybe, maybe not, but I think the point raised by Jeroen is also about how to build an extension/app composed of server and client side components and how to organize it in repository(ies). The data feeder is an app and it probably makes sense to have server side and client side code base in the same repo even if it depends on this library? Datahub is client side only, an editor app, an harvester app would also be client/server side. How the various types of extensions could be properly organized and how to make them pluggable into the system?

but I just feel like having a clear and sound strategy for the UI of GeoNetwork would be beneficial for the community as a whole.

I agree

@jahow
Copy link
Contributor Author

jahow commented Oct 24, 2024

Hey 🙂 I feel like we're getting sidetracked here; the proposal lays out a potential strategy for moving forward on this topic, maybe we can get back to vote/discuss it?

The essential points of the proposal are:

  • Use GN-UI to build new applications to cover all necessary use cases for GN5 interface
  • Bundle GN-UI applications in the GeoNetwork 5 Java backend
  • Keep the GN-UI code organization like so: multiple apps in a mono repository that is separate from the GN5 code (backend)

@jodygarnett
Copy link
Contributor

jodygarnett commented Oct 31, 2024

I am finding this proposal verbose, with lots of background, but unclear to me what the structure ends up being proposed?

With GeoNetwork 5 we end up with a little constellation of spring-boot apps:

---
title: GeoNetwork 5 Deployment
---
classDiagram
    note "Forgive abuse of class diagram"
    GeoNetwork5 <|-- GeoNetwork4
    GeoNetwork5 <|-- Database
    GeoNetwork4 <|-- Database
    GeoNetwork5 <|-- Elasticsearch
    GeoNetwork4 <|-- Elasticsearch

    class GeoNetwork5 {
      Spring Boot 6
      Java 21
    }
    class GeoNetwork4 {
     Spring Framework 5.3
     Java 11
    }
    class Database {
        metadata
    }
    class Elasticsearch {
        index
    }
Loading

above: GeoNetwork 5 is operating as a gateway routing requests to GeoNetwork 4 during the transition period. Running these distinct Apps (Java 11 and Java 21) assume docker compose file, or Kubernetes environment.

So my question is what the GeoNetwork 5 user interface proposal covers? I assume it is proposing another App in the above deployment, but I am confused about how it is phrased in the proposal.

  1. Build on the existing GeoNetwork-UI project to implement missing functionalities and offer a continuity with GeoNetwork 4

Priority is REST API which is best served by having several clients: geonetwork-ui search front ends already in use would be excellent to keep API stable. I am fond of GeoCat Bridge REST API also. Direct usability of REST API would be wonderful to consider also. I really want to see a stable foundation that we can all trust to develop against.

I am personally looking forward to clean break with GeoNework 4 AngularJS user interface, so I am confused by "continuity with GeoNetwork 4" phase above.

It would be great if geonetwork-ui project could maintain an active fork (and whatever test coverage is available) against a geonetwork 5 branch as it is developed. There is not really any good way to understand what REST API functionality is actively used, and how changes to Elasticsearch index structure affects different UI components...

  1. Bundle a GeoNetwork-UI application in the GeoNetwork 5 backend that will work out-of-the-box

Because of the Java 11 / Java 21 split we are forced into doing an App approach. I expect any bundling would be via published docker compose or Kubernetes graph.

  1. Keep the UI code in a repository that is separate from the backend

I would like to see reuse. For me it would be okay if we have several apps in src/apps that depend on artifacts published by different repositories.

I guess I would like to see a comparison with other cloud native projects to understand best practice.

@jahow
Copy link
Contributor Author

jahow commented Oct 31, 2024

Hey @jodygarnett,

So my question is what the GeoNetwork 5 user interface proposal covers? I assume it is proposing another App in the above deployment, but I am confused about how it is phrased in the proposal.

No, the proposal says that a frontend application (built by GN-UI) will be served by the GN5 backend. This does not add any actual apps or deployments in the mix above.

Priority is REST API which is best served by having several clients: geonetwork-ui search front ends already in use would be excellent to keep API stable. I am fond of GeoCat Bridge REST API also. Direct usability of REST API would be wonderful to consider also. I really want to see a stable foundation that we can all trust to develop against.

100% agreed, but I don't think this is in the scope of this proposal. GN-UI can and will adapt to any API it needs to.

I am personally looking forward to clean break with GeoNework 4 AngularJS user interface, so I am confused by "continuity with GeoNetwork 4" phase above.

This means that functionalities currently available in the GN4 ui should be present in GN5 ui in a more or less similar form, unless the functionality is deemed obsolete. This has been consistently asked by the PSC regarding the GN-UI project.

It would be great if geonetwork-ui project could maintain an active fork (and whatever test coverage is available) against a geonetwork 5 branch as it is developed. There is not really any good way to understand what REST API functionality is actively used, and how changes to Elasticsearch index structure affects different UI components...

This could actually be done right away without the need for a fork. I'll see if we can find some budget to do that work. Thanks for the idea!

Because of the Java 11 / Java 21 split we are forced into doing an App approach. I expect any bundling would be via published docker compose or Kubernetes graph.

I'm sure we can find a way to "embed" a frontend app in the GN5 java app and have it serve it as well. See above, this would not require any additional deployment.

I would like to see reuse. For me it would be okay if we have several apps in src/apps that depend on artifacts published by different repositories.

Yes, that sounds good I guess. Again, I'm not 100% I understand the "reuse" term here, do you mean that other apps should reuse the same components? If so, please see the discussions above, esp. the points raised by @ticheler.

I guess I would like to see a comparison with other cloud native projects to understand best practice.

In my understanding GN5 will not be a cloud native project at heart. It will be a monolithic java web app with the ability to be extended by plugins/modules, but to me it makes sense that such an app comes with a built-in frontend app (just like Geoserver, GeoNetwork 4, etc.).

Also GS-cloud comes with a web-ui module that is optional but doesn't really have equivalents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Open for Voting
Development

No branches or pull requests

5 participants