CS Data Blog

groups program: To Bring together users with similar musical preferences to foster a community and encourage meaningful connections through shared musical interests.

image1

Individual feature: My chatroom allows users to send and view messages dynamically, with each message displaying the user’s ID and message content

image2

List Requests

Dictionary converted into JSON

get_all_chats() extracts all chat rows from the database, processes them into a list of dictionaries using chat.read(), and returns the result as JSON

image3

read method in the MusicChat class converts database columns into a dictionary format for individual rows

image4

Fetched JSON into DOM and JS to display in a structured format –> taking data from a server,processing it, and organizing it in a table/list

image5

Query (request to get info from database) from database which retrieves all rows from MusicChat table and converts them into a Python list of objects

image6

query filtering by User id

image7

MusicChat class methods to handle database columns

image8

image22

image23

image9

image10

Alogithmic code request

Get, post, put, delete methods in MusicChat class

image24

image25

image26

image27

Sequencing (step by step), selection (if else statement), and iteration (loops)

image11

Parameters sent in JSON (message, user uid), return response in JSON with requested info or error message

image12

Call to Algorithm Request

Fetch to endpoint –> using the fetch() function to send a request (GET/POST) on a server to get or send data

image13

Response to fetch & Normal Condition Response –> server’s reply when you make a fetch request + data I asked for

image14

Data handled into a list like structure

image15

Error condition Response –> invalid data

image21