Saturday, July 16, 2022

Retirement Calculator

Back in 1999 when the stock market was doing well, I wrote a browser-based retirement calculator application using the Java Servlet framework.  Since a Java Servlet renders the Hypertext Markup Language (HTML) server-side, the application stopped working when I stopped using the Java application server.  Since the application does not fetch or store data using a back-end server, I could have re-written the calculator as a JavaScript-based application and simply hosted it on a website fronted by a Content Delivery Network (CDN).

Now in 2022 when the stock market is not doing so well, I converted the application to my new favorite programming language Rust using the front-end framework Yew.  Yew compiles the Rust code to WebAssembly (Wasm) which then runs in the browser just like JavaScript.  You can view the converted source code and play with an online demonstration hosted on one of my websites deployed using Amazon Web Services (AWS) Amplify Hosting.


No comments: