-
Notifications
You must be signed in to change notification settings - Fork 90
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
✨Migrate frontend to SPA or SSR framework #325
Comments
To reduce notifications, issues are locked until they are 🏁 status: ready for dev and to be assigned. You can learn more in our contributing guide https://github.com/neon-mmd/websurfx/blob/rolling/CONTRIBUTING.md |
The issue has been unlocked and is now ready for dev. If you would like to work on this issue, you can comment to have it assigned to you. You can learn more in our contributing guide https://github.com/neon-mmd/websurfx/blob/rolling/CONTRIBUTING.md |
Thanks ❤️ for taking the time to open this issue. We really appreciate it 👍 as it helps us improve the project. I totally agree with you and we have even tried migrating to it and we chose to do so with Also, there is another way to achieve customization but that will require the need of Also here is a link to the |
The simple approach for the stylesheet customization is to send a request back to the backend and set the theme using the response. But the best way might be prefetching the configuration and sending it back to the front end along with the third-party resources. |
Oh cool 🚀 !! I didn't knew about it but would you like to work on rewriting the frontend with Also my plan with this approach is to provide different levels privacy by leveraging the rust conditionally compiling feature something like this:
So are you interested to work on this ? 🙂 |
@neon-mmd What are the main reasons we want to have SPA instead of SSR (as it is now)? |
The main reason to migrate the frontend to SPA is to provide different privacy levels. Also, to eliminate JS, which is as you know known notoriously bad for privacy. So that's why we are planning to migrate to The different privacy levels which we want to provide with the project (with help of conditional compiling feature of rust) will look something like this:
|
If I understand correctly currently you have implemented Harderned privacy level and this is issue is all about having separate Why users would want to switch to Default privacy level? For SPA experience (client side routing, dynamic page state etc)? |
Sorry for the late reply.
Thanks ❤️ for asking this question. Actually, the main reason to implement Default privacy level is that we want to provide another choice to the user following two goals, first for customizability and second for speed. You see, when we will implement the Default level this will be a tradeoff between privacy and speed, but there are some people in the world who would prefer to have that tradeoff. Now you might be like, why is this not bad? No actually, in the default level we are not going to add too much JS and Wasm as you might think, but it would be there still to improve the speed of the website. While the second privacy level is more privacy-oriented than the first it does not mean the first one is not, but it is a bit less than this option. Moreover, this option is a balance between both speed and privacy. The last option is the most privacy-oriented level like it is the most extreme privacy level, and it is again a tradeoff between speed and privacy. So by doing this, we provide the user with the choice on which path privacy level they want to be in based on their threat level (model) . I hope you got my point 🙂 .
|
Which performance problems will be solved by introducing framework with hydration? Currently |
Yes, you are right 🙂 . Right now the website uses very little JS code per page and I do agree that it will slightly worsen the performance of the website. But the main purpose of introducing this framework is to provide more choice to the user, like with the different privacy levels. Also, there is another reason which I would like to add, which is what is making us orient towards this option. The reason is that as of now templating engines have become a little disfavored in the web community like I don't mean to say that templating engines are not beneficial anymore. They still have their benefits, but currently more and more developers are preferring SPA frameworks for use in websites. So in the long run it would be more beneficial to introduce it as this will bring more interested developers into the project. Also, by introducing an SPA framework, we might also improve developer experience as well. Like by providing better tooling, easier and familiar way to write frontend code. Moreover, currently the Also, I disagree with the second part of your answer that the overhead of serializing data reduces the website speed. Because there has been recent The link to the video and the benchmarks:
So keeping all of this in mind, I think moving to leptos would slightly degrade performance, but we think it could still prove to be beneficial. What are your thoughts on this ? 🙂 |
Sorry, but it seems after trying to rewrite the app in
So keeping all these points in mind, we think right now migrating or rewriting the app with an SPA or SPA with SSR only would not be a great idea. As it is not a great option so far in rust. Also, we think rewriting the app in an HTML framework like Maud would be a better idea. But still if you do have solutions to the above listed issue then feel free to propose, we would be very glad to hear. 🙂 (Also, we would suggest you to reopen this issue if you do have solutions to the above issues) Finally, because of all the above listed issues we will not be working on this feature request and as such we will close this issue as not planned. But once the SPA/SSR area in rust matures and becomes a great option, then I would suggest you to reopening this issue in the future, and we would be glad to reconsider this issue in the future. Also, thanks ❤️ again for opening this feature request. 🙂 |
Description
I recommend migrating the frontend into a modern framework like React or NextJS. Could you Tauri so we can send a request from a WASM level instead of writing the server code. This reduces the latency and makes the deployment simpler.
Screenshots
No response
Do you want to work on this issue?
None
Additional information
No response
The text was updated successfully, but these errors were encountered: