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.

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

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

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

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

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

query filtering by User id

MusicChat class methods to handle database columns





Alogithmic code request
Get, post, put, delete methods in MusicChat class




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

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

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

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

Data handled into a list like structure

Error condition Response –> invalid data
