5 ms·
Kudos to the author for making this framework. I am using this for my personal project: https://www.biblemaze.com https://www.biblemaze.com which is a Bible tr
by jbandela1 5y ago
Kudos to the author for making this framework.
I am using this for my personal project: https://www.biblemaze.com https://www.biblemaze.com which is a Bible trivia game.
Here are some things I like about Seed:
1. The Elm architecture seems to flow nicely in Rust.
2. The way of defining the elements on the page is more Rust like rather than html like. I initially tried Yew which is another similar framework, but since I am a more backend developer, I found writing in a more Rust style more comfortable than writing in a more html-like dsl. Other with different experiences may be more comfortable with more html-like syntax.
3. Very easy to perform REST API calls. I am using Actix for the backend, and I have a shared library that declares the types which both the backend and frontend use. This is one big advantage for using Rust for both backend and frontend, in that you never have to worry about your types getting out of sync.
4. In general as to why Rust for the front end, apart for being able to share types, for more complex algorithms, for me, having a compiled language with an emphasis on safety and that tries to ensure correctness as much as compile time (and especially pattern matching) makes writing complex code more enjoyable for me.
5. Excellent documentation on the Seed website. There are lots of examples and walkthroughs of basics as well as examples of how to do stuff like integrate with Javascript libraries.
Anyway, thanks again to the authors for making and supporting such an awesome library.
- rictic 5y ago- This is one big advantage for using Rust for both backend and frontend, in that you never have to worry about your types getting out of sync. One thing to be aware of here, you may have users with stale clients after deploying an update to the server. e.g. picture someone who leaves a tab open for a week and then comes back to it and interacts with your app some more without refreshing. Text based serializations will tend to be more forgiving of changes in the RPC schema (in the sense of erroring out when required fields are missing), while more compact serializations are more likely to incorrectly decode a message when they should fail.
- mdtusz 5y agoThe quick and dirty solution to this is to have a client response handler that checks for a header set on responses to ensure its a compatible version, then prompt a page refresh if not.
- dgb23 5y agoAt this point, I feel like this is the most consistent way. There are notable web apps that do this. There are plenty of good reasons for this, including caching and service workers. It feels dirty because you’re not handling these issues silently. But it’s explicit, clear and it enables a consistent and performant experience.
- bonestormii_ 5y agoI wish more people thought this way about computing.
- cwp 5y agoAn equally-quick but not-at-all-dirty version of this is to use the Accept header and do content negotiation. There is a solution to this exact problem in the HTTP spec.
- jbandela1 5y agoOne thing you can do in the shared library is to have a version number constant that is always passed in the rpc. That way if the client is stale, it can easily be detected, and you only have to change 1 place when you update the shared structs.
- metadaemon 5y agoVery fun! Is it possible to remove the '-' symbols once a new path has begun? They were blocking previous paths, which also may be the point.
- jbandela1 5y agoThank you. It seems this is in reference to my game. If so, please contact me on my email (in my profile) so we can discuss further in detail.
- metadaemon 5y agoIt's not a big deal, thanks.
- loveJesus 5y agoPraise the Lord, agreed a neat game. Is it open source? It would be interesting to try and add on to it or use the questions (Did you get them from somewhere)? There is a Christian Gamer of TikTok @simplyivee who sometimes uses these kinds of word games with the audience and i was hoping or praying for some kind of Bible related suggestion to give as well. So my hope is to add some graphical items for the format and suggest it to her account, my coding style is a bit particular though with _aleluya appended to variables to try and remain in God's presence (Very thankful for what He did for me and my family, healed me of a schizoaffective bipolar disorder diagnosis, been psych med free since 2014. My dad here healed before heart surgery, knee surgery, even a dog healed from cataracts the day after praying for her, my dad here spoke praising God in Arabic once, not knowing the language someone else told him). I also have been thinking about making an app to register these miracles and do data analysis, they are not uncommon. I know some people have lied about things in the past, but there are so many true ones. I am happy to have seen a few Bible related posts reach the top of HN the past few days. My thoughts are that many people here are not happy to hear that God is real yet. I suppose not ready to surrender to Him and His ways or design of things. Always wondering how i can share my testimony here better https://soundcloud.com/brianlovejesus/hallelujah-pinduca-radio-show-mix-175 https://soundcloud.com/brianlovejesus/hallelujah-pinduca-rad... God's guidance and blessing to you all in Jesus name
- da39a3ee 5y ago> This is one big advantage for using Rust for both backend and frontend, in that you never have to worry about your types getting out of sync. Of course this is a hack compared to Rust BE and FE, but I’ve been finding that auto-generating Typescript type definitions from a Pydantic (Python) API works pretty nicely. Of course, what’s going on under the hood there is all a lot uglier than a beautiful modern compiler with an expressive modern type system, but it’s cool that it works.
- the__alchemist 5y agoWhen I learned of Pydantic, my first thought was "This is a lot like Serde in Rust".