Replace JS with rust? #13463
Replies: 4 comments
-
It might be good, interesting idea. And innovations, they are of course important and useful, but this must be done in a separate branch, perhaps even in a separate repository. |
Beta Was this translation helpful? Give feedback.
-
If on a separate tree, then it is to know how many trees is it going to take to remain on-track. |
Beta Was this translation helpful? Give feedback.
-
The success of a platform is directly linked to its entire ecosystem, such as extensions, modules and themes. A change like this would have to be well planned and for a major version, such as OpenCart 5. |
Beta Was this translation helpful? Give feedback.
-
I find the use of Rust interesting, but I believe that those who use JS in modules and themes would continue using it or with Vue.js, jQuery or another Framework/library, as Rust would require learning a new language and redoing existing modules. Rust is basically a back end language, it would be good to check if the main Opencart maintainers know how to use it or if they are willing to learn a new language and I believe that the Rust code would be compiled in the end to JS. One idea would perhaps be to remove jQuery and use pure JS and in the Ajax part use the native fetch feature or make use of Vue.js which is relatively simple to use and easier to learn than Rust for those who know JS. It would be interesting to perhaps validate the change in Rust by changing some part and test to see if it is worth the use and if it is easy to maintain, perhaps for the shopping cart. I agree with another colleague that it might be better to focus on the stability of Opencart 4 and then new features like this, perhaps after the next version of Opencart 4 that should stabilize for better use in production and the long-awaited return of OCMOD. I have been using Vue.js for a few years in more complex modules like our Checkout, something that I don't like about JS is the use of npm and how it is bloated in packages and is also easy to break, which is why for years I prefer to use compiled JS runtime of public CDNs, an idea in the future would be this and perhaps in the configuration select whether you want public CDN or local JS. |
Beta Was this translation helpful? Give feedback.
-
If we replace JS with rust it should mean we don't need jQuery. Also not sure about ckeditor. Rust is supposed to be faster and looks a lot easier syntax.
Beta Was this translation helpful? Give feedback.
All reactions