Monolithic or API for my solo dev app?

Hello,
I know a little bit of django having made a couple of web apps for myself, and I know enough python for some basic scripts. I’ve also worked through a course on Javascript and have used js in conjunction with one of my django apps (takes a list of names, scrambles them, can pick random groups of different sizes, etc). Lots of web dev concepts are still a bit confusing to me.

I want to build a gradebook app.I think the models and endpoints are pretty straight forward. With the app I need to upload lists of students, create classrooms, create assessments, and enter grades into the assessments. I will need to display a gradebook per student and per class. I’ve identified one manytomany relationship which I think might confuse me for a bit…

I’m pretty sure for gradebook entry I need reactive rendering on the client (I don’t want to use forms for data entry). So I thought this should maybe be done with React. A couple of years ago I got about 2/3 through a React course on Udemy (which helped my understanding of js) but never got to build a React project.

I just finished listening to some podcasts on Django Chat and a couple of things popped out at me. 1) learning something like React or Vue will be a very big job (bigger than what I had thought) 2) developing what I described above with an SPA + API would probably require a team and not just me.

So now that I’ve described my situation, I’m wondering if people have some advice for me. Would I be able to incorporate basic user interaction (eg entering grades) by just adding js to my django templates? Or is this a job for an SPA? I have no idea on where to look next for learning how to get js to do this kind of thing. Everything I’ve read about js covers the same programming principles found in all languages: data types, iterating, comparing, functions.

Secondly, does my project description sound like it would be very complicated? I guess what I really mean is if it sounds realistic for an average intermediate coder to accomplish what I’ve described?

Some scattered thoughts here -

  • You never “need” an SPA / API type app, especially when you’re working as a solo developer on a personal “passion” project. It will likely be of more value to you to start with a form-based app to get something up and running, and then switch to an SPA structure later.

    • This helps keep the chunks of what you need to learn to a reasonable size as you’re grasping with all the unknowns.

    • When you decide to convert, you should have a functional and stable product to build on at that point, reducing the number of different areas you’ll need to check for bugs when errors appear.

  • You don’t need a full framework for an SPA. If you just have one or two forms that need a more “interactive” experience, you can do a lot with just JavaScript, jQuery, and jQueryUI. The benefits of frameworks such as React or Vue really come with more GUI-style apps in the browser.

  • It’ll do a lot for your confidence if you break this down into as small, incremental steps as possible. You’ll want to plan for a functional project at each stage - recognizing that your intermediate steps aren’t your end product. But seeing one or two working forms, models, and views will do a lot more for you psychologically than having dozens of each in a semi-functional state.

    • Keep the steps small and well defined. Do not try to do too much at once.

    • Example, you talk about uploading students and creating classrooms along with a couple other functions. You might identify a step where you focus only on uploading students. Don’t worry about anything else. Create your upload form, build your view to accept the file and create your Student model instances from that data. Consider that a complete step! Once that’s done, celebrate your win and plan your next step.

You can do this!

2 Likes

I agree with Ken. There are a lot of applications that can still work very well without a full Single Page App.

I’ve done solo projects where I manage an API and a SPA in the past. I’m not sure that I’ll ever use that style again. In my experience, it was a ton of extra work. I found that I had to have a model representation on the server side (that’s normal), but then I also had to replicate a lot of modeling on the client side to handle the API calls. This was a huge burden on me as a single person.

Most of the time I advocate for server side rendering because of how much it simplifies the problem. You can still make amazing applications with server side rendering.

When you want or need more dynamic behavior, there are other tools to reach for that can be an alternative to full SPA. Here are some things you might want to explore:

2 Likes

Thank you, that sounds like good advice. The reactive thing has really been pulling my attention away from the sub tasks I need to accomplish. 80% of the app probably has nothing to do with data entry. I can also use the admin page to get data in if needed.

Thanks for the tip on htmx. I’ll check it out at some point.