Week 7: Making a Web App
April 24, 2024
Hello everyone, and welcome back to my blog. Today, I’ll be starting the next step of the project, which is to implement the algorithm into a web app that will allow users to experiment with simulations.
Before I start talking about the web app, I’d like to reiterate the purpose of the project (which we may have forgotten with all the theoretical junk I’ve been throwing at readers for the past 6 weeks). The purpose of my project is to create an open source program that will allow users to simulate EM fields. Right now, I’ve finished researching and coding the core algorithm that will actually perform the simulation. What remains is to create a web app with an interface that will allow the user to interact with the simulation’s backend. I’ll talk today about my design process and a few problems that I’ve anticipated.
Hosting
This is probably the easiest “problem” to solve. As usual, I’m going for the simplest option and I’m probably gonna host my app through a service like Heroku or Vercel.
Choosing Frameworks/Libraries
Choosing is always hard, especially when there’s an overwhelming amount of options. In order to narrow down the tools that are right for me, I’ve decided to use my web development experience as a main factor. The main languages that most web development frameworks use are Javascript and Python, but development in Javascript is frustrating because of how poorly made the language is. Moreover, in this situation where I’m quickly developing a simplistic app, I have to prioritize usability over more complete features and customizability in my tools. This is why I’ve decided to go with an easy-to-use and well documented Python framework called Django for my app backend. As for the frontend, I’m going to avoid using any fancy tools altogether and instead have a simple HTML/JS page (It’s going to look janky but the real beauty of my app lies in my algorithm anyways).
Designing the Backend
When designing the backend, I have to keep in mind where and how users should access the algorithm. Moreover, because the algorithm is quite computationally heavy, I must estimate how much load the server can handle and design my backend around that (so that my server doesn’t keep crashing).
As a good first step, I’ve coded a simple app backend that allows users minimal customizability (almost none), upon which I will build up layers of usability depending on how I anticipate users will want to use the simulation.
Conclusion
If you’ve made it this far, we’re almost at the end! We’ve already slogged through all of the theoretical physics-y parts of the project. All that remains is to make a well-designed app to showcase the algorithm’s usefulness. Stay tuned!
Sources:
https://eecs.wsu.edu/~schneidj/ufdtd/
https://github.com/flaport/fdtd?tab=readme-ov-file
https://engineering.purdue.edu/wcchew/ece604s20/Lecture%20Notes/Lect37.pdf
(Next: Building the Web App)
Leave a Reply
You must be logged in to post a comment.