Let’s Build a Web App! Week 16 out of 30

Rona Chong
6 min readNov 20, 2017

--

In which I scramble to get an MVP done and integrate my forum with some hacks :)

Hey strangers and friends!

Here’s my weekly breakdown for what’s gone down most recently in my web dev journey. It’s Week 16 out of 30 and I’m working on building Moshimoji, my community-oriented platform for reading, sharing, and publishing manga and other comics.

As you know, I’ve been working on getting an MVP done but at an incremental pace. This week I tried to make up a lot of progress to finish the MVP by Friday. Read on to see how it went :-).

If you DON’T know what I’m talking about, yet are for some reason interested, here are the previous posts for this blog series:

What did I set out to do?

Mockups of a few of the modules/views I’m looking to minimally implement for my MVP

To finish my MVP done, I have to implement a lot of stuff: basically, basic functionality for all my ‘site modules’, as I’m calling them (user and site dashboard, database, groups, forum, reader, reviews, and site news). Some modules are less important than others, but I still want at least 4 available for the MVP.

Up till now, I’ve (slowly) gotten the login flow done and worked on the user dashboard (adding user statuses). My goal for this week was to get my basic forum view done in a few days, then get as much of the site news and site reader done as possible. (This would involve extending forum thread data models into site article models, writing the schema related code to allow for queries and mutation for my new models, and coding lots of view components).

What did I end up getting done?

Not directly related to the goal listed above (which might reveal my dubious prioritizing skills):

  • I never did send my first frontend PR (pull request) to my mentors, but I was determined to get some feedback on my code, so I decided to send them a summary of my codebase so far and subsequent PRs for individual components. This turned into me refactoring my frontend code for a day or two (6–7 atomic pull requests).

Finish integrating Misago (a React-Django forum) into my Django backend):

  • Ultimately, after a few hiccups, I got this done, but as I discussed with my mentor and Holberton watchful eye, Guillaume, it’s not an ideal solution and hopefully I can go back to it after working on different modules to Moshimoji to improve it. We had a concern about how complicated it would get to my hack to work with other parts of the site (since I’ve included the forum with an iframe, linking from inside my iframe to other parts of my site might get messy), but I think it will work for most of my needs till I improve it.

The other site modules, namely the site-news view and the reader module.

  • Nope.

What went well:

  • Managing to integrate Misago with my backend, considering that though the creator(s) have tried to make this pattern a possibility, Misago is designed to be a standalone Django project that can be added to, not merged with existing projects.
  • There was a mysterious issue with missing components in my Misago view, and although it took me a while to figure out, I was able to pinpoint my content security policies as being responsible (preventing my javascript from running due to inline style, which is considered insecure). I also figured out a number of other hiccups on the road to successfully integrating Misago with my backend.
  • My mentor Nic is awesome and gives me good affirmation when I could use some (for lack of giving any to myself, lol): she tells me I’m killing it! 😭🙏🙏

What was difficult:

  • Aiming to be 5x more productive than usual to make up for slower progress in previous weeks. Having a deadline helps motivate you, but yeah, expecting that much extra productivity was unrealistic and I knew that — I just felt like I had to aim for that much to meet my goal.
  • Following off of that, not meeting the goals you set down for yourself. It happens, but it’s perturbing, and emotionally difficult. On the other hand, it’s a growing experience to come to terms with this sort of disappointment and confront your ego.
  • Spending 3.5 hours debugging a mysterious issue with your login component working in one case, but not the other. It was actually a simple bug: I believed I was calling a function which called another function due to matching variable names, but in reality, I never passed the wrapped version of the function to the component scope. So I was really only calling the inner function. But because I was convinced I was calling the wrapped function, I explored many alternative explanations, ranging farrrr and wiiiide, before I realized my error. It was a good learning moment but I definitely expended a lot of mental energy there.
  • Although I’m glad I was able to more or less steadily work out all the kinks with integrating at least an iframe version of Misago into my frontend, it has to be admitted that that process of merging another project to your existing Django project is kinky and could’ve been a lot more gnarly if the configuration for my project differed greatly from Misago’s, or if I were a lot farther in the development of my backend before I decided to add the forum.
  • Guillaume also tells me that there must be a more suitable forum solution which plays nicer with my project setup, in which case, being able to find that optimal solution with my research skills is challenging me.

What I would do differently next time (next time typically meaning from now on :P):

  • Start this project with more manageable goals for the “first” MVP (say, two core views, the database and reader, instead of all four at once).
  • Have the forum integration as one of the first backend development goals, since it’s tricky to redefine your Django user auth model in the middle of development.

One cool thing I learned about:

The jwt rest framework module for Django tries to check if your user model’s username field differs from the default ‘username’ and expects your POST form to pass the username value under the key of that field.

Misc links for your browsing pleasure:

--

--