I tried to make an app that allows you to post and chat by genre ~ Where I had a hard time ~

I posted an overview of the app in the previous article. From here, I would like to write an article about the difficulties I had when creating the app.

: star: Mostly starts from the genre page

  1. First, this app selects a genre or creates it yourself
  2. Select a genre to open the genre page
  3. You can post on the right side of the genre page, and you can search for chat groups within the genre on the left side.
    ** In other words, genru_id is required for most page migration and data transmission **
    ** This means that most things are linked (within the genre) to the genre **
    個人アプリQiita用.png

This got in the way
I searched for various methods, but there were times when something that was easy to do with that page alone did not work if it had a genre page in between.
At first I wondered why it didn't work, but most of the time, genru_id was missing (laughs).

: star: There were many intermediate tables

Please check the ER diagram below.

: sunny: Database (ER diagram)

Untitled Diagram (1)

――How many intermediate tables are there?
A => 3 (UserGenrus table / UsersGroups table / Likes table)

Actually, I tried to create another intermediate table (hope table), but since the shape was the same as the UsersGroup table, the hope table uses integer to save records. So, there are actually four.
Especially it was difficult to save the id of the group member in the UsersGroups table (laugh) Also, the reason why it was difficult to create the intermediate table was a little wrong. I plan to write another article about this area.

: star: Like function did not become JS

Speaking from the result, it became JS (laugh) But at first, I couldn't make it JS, and I ended up saying "Why!"

――Why was it made into JS?
=> JS conversion I put it on hold for the time being and proceeded with another function, and there was a hint there!

: star: Image preview of posting function (by JS)

Before posting, I previewed it so that I could check if the image matches, but this is the songwriter ... When I thought I was able to preview it, I had a hard time because the upper limit of the number of sheets did not go well (laugh)

: star2: Impressions

So far, is this the place you had a hard time coming up with? Actually, I thought I'd do the details of what I struggled with, but I'd like to change it and write an article about each function.

Recommended Posts

I tried to make an app that allows you to post and chat by genre ~ Where I had a hard time ~
I tried to make an app that allows you to post and chat by genre ~ App overview ~
A story when I tried to make a video by linking Processing and Resolume
A story that I had a hard time trying to build PHP 7.4 on GCE's CentOS 8
[Java] I tried to make a maze by the digging method ♪
Creating an ArrayList that allows you to throw in and retrieve the coordinates of a two-dimensional plane
I tried to make a Web API that connects to DB with Quarkus
I made a virtual currency arbitrage bot and tried to make money
How to make an app with a plugin mechanism [C # and Java]
I want to make an ios.android app
I will expose the fucking app that I made hard to get a job as an engineer from inexperienced.
The story that docker had a hard time
I tried to create a LINE clone app
left4dead2 I made a Docker image for the server and tried running it on GCE # 3 (I had a hard time building the server)
How to make a Vagrant Plugin that you learned when you forked and published vagrant-mutagen
I tried using Wercker to create and publish a Docker image that launches GlassFish 5.
[Solution] A memo that I had a hard time because the format of sinatra-validation changed
We have released an app "Public Diary" that allows you to easily publish your diary.
I tried to make a login function in Java
I tried to make FizzBuzz that is uselessly flexible
App development beginners tried to make an Android calculator app
[Java] I tried to make a rock-paper-scissors game that beginners can run on the console.
A story that I realized that I had to study as an engineer in the first place
I tried to make an application in 3 months from inexperienced
I tried to make an introduction to PHP + MySQL with Docker
[Rails] I tried to create a mini app with FullCalendar
I tried to make Venn diagram an easy-to-understand GIF animation
I tried to verify this and that of Spring @ Transactional
I tried using Hotwire to make Rails 6.1 scaffold a SPA
I tried to make Java Optional and guard clause coexist
I tried to make a client of RESAS-API in Java