openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
660 stars 389 forks source link

Split Display.pm into API.pm and Frontend.pm, make frontend use the API #5205

Open stephanegigandet opened 3 years ago

stephanegigandet commented 3 years ago

What

Related to the discussion about rearchitecturing Product Opener: #5170

I've been trying to find ways to better separate things in Product Opener: what's relative to the web frontend, to the API, to MongoDB queries, to processing products when we write them etc.

I'm thinking we could try to split Display.pm which is probably the worse module in terms of how everything is mixed together.

We could do it gradually:

What do you think?

Part of

M123-dev commented 3 years ago

@stephanegigandet, as I mentioned in #5170 I think this is a good idea. But how do you imagine the transition time, this process will take a relatively long and possibly lead to many errors and broken things. Should this repo be continued, should API.pm and Frontend.pm be new repositories or what were you thinking of?

stephanegigandet commented 3 years ago

I think we can do it gradually without breaking anything, we can create new empty modules API.pm and Frontend.pm, and move functions one by one.

M123-dev commented 3 years ago

sounds good

CharlesNepote commented 3 years ago

A great idea IMHO. I think there are many benefits:

M123-dev commented 3 years ago

Is there already any progress here

teolemon commented 2 years ago

@stephanegigandet @M123-dev I believe there will be progress tomorrow when this is deployed to .net

teolemon commented 1 year ago

For the record, @VaiTon has started an alternative web frontend: https://openfoodfacts-explorer.vercel.app/

github-actions[bot] commented 10 months ago

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts