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

Modernize the frontend tooling #441

Closed
pemocarlo opened this issue Jun 15, 2022 · 1 comment
Closed

Modernize the frontend tooling #441

pemocarlo opened this issue Jun 15, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@pemocarlo
Copy link

Is your feature request related to a problem? Please describe.
I was checking this project and see it as a refreshed version of Nextcloud. Unfortunately, one of the parts that I still see as obsolete is the knockoutjs library, which looks almost unmaintained. This also reduces the possibility of integration with more modern technologies, such as SSR.

Describe the solution you'd like
Use a more modern framework, such as React, Vue or Svelte.
There is also a next-gen version of Knockout, called tko which seems to almost be a drop-in replacement but with a more modern implementation. It is nevertheless not officially released yet.

Describe alternatives you've considered
None

Additional context
I know this is a big change, but just wanted to mention it in case you have considered. I would like to know your thoughts about what the feasibility of this.

@the-djmaze
Copy link
Owner

the-djmaze commented Jun 19, 2022

SSR (server side rendering) means more resource use on the server.
SnappyMail is fast because it tries to render the most on the client.
Something most developers forget is the strain on a server when they develop something.
It works "fast enough" when they develop it, but never benchmark and test with 1000 simultanious connections.

Although Knockout is old, the slimmed/modified version SnappyMail uses is fine for current browsers.

I've tested TKO, Vue, React and many others, but none of them does the job better/faster (solidjs is a good alternative).

The reason is three very important complex tasks:

  1. Handling of "property listeners"
  2. Handling of Array changes
  3. Modify templates by extensions/plugins

All frameworks have magic methods to find and listen to dynamic properties.
This is a lot of overhead and nowadays we have the native Proxy in JavaScript for that (i even tested this approach).
All of them have good and bad points, but none have enough benefits to rewrite the whole source.

SnappyMail does use a kind of "Proxy" on Array for better handling of changes with push, pop, splice, etc. etc.

My conclusion was that currently it is still not worth the time to rewrite all code just because some other framework is "hot" at this moment and people preaching that this "is the best" framework.
As we all know, in 5 years there's a new "best" framework.

@the-djmaze the-djmaze added the documentation Improvements or additions to documentation label Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants