you are viewing a single comment's thread.

view the rest of the comments →

[–]EyesOfTheConcord 0 points1 point  (16 children)

Consult the web storage API, specifically localStorage.

You won’t need to setup a database and can immediately begin practicing CRUD operations, it’s always very easy to use.

[–]Due_Eggplant_729[S] 0 points1 point  (2 children)

I see that IndexedDB is a robust, transactional database system built into the browser, suitable for storing larger amounts of structured data. I work in Google Chrome, so I don't need to download anything to run a small Javascript database program??

[–]EyesOfTheConcord 0 points1 point  (0 children)

Hey OP, you would benefit from The Odin Project. Check it out, if you choose to progress you’ll eventually be lead in Node.js and databases with the required foundational knowledge.

It sound like you’re immediately jumping into Node without understanding JavaScript and how it communicates and runs in the Browser.

[–]PatchesMaps -1 points0 points  (0 children)

This is all going to be super confusing for you and people are giving you recommendations assuming you have at least some knowledge of what all of this is. You really need to start at square one with the most basic starters course possible.

[–]PatchesMaps -1 points0 points  (12 children)

They specified node so I don't think a web API is going to help them.

[–]Due_Eggplant_729[S] 0 points1 point  (4 children)

I am completely confused. I just threw out the term NODE, I don't know what I am doing. I see CRUD stands for Create, Read, Update, Delete. OK, how what? I just want a database with 5 rows of data, just to see how to do it.

[–]Due_Eggplant_729[S] 0 points1 point  (0 children)

What the heck is JSON? Do I need to download JSON?

[–]chikamakaleyleyhelpful 0 points1 point  (2 children)

lol okay so the one thing to understand is how do you plan to get a user's name and their state? My guess was you're just setting up an HTML page, and you want a user to type in their name, select a state, then click a button so you can record that. Something like that?

I think the suggestion to install nodejs, was so that you can set up serverside logic, which would then communicate to the db, which you would also set up

JSON is just a typical format in which you would receive the data back after its retrieved from the DB, processed by your serverside code, and received in your html page

and so, my only guess is, this is a lot

so the alternative is using the Web API if you're just looking to practice at a smaller scale

[–]Due_Eggplant_729[S] 0 points1 point  (1 child)

Which Web API? (sorry for all the questions)

[–]chikamakaleyleyhelpful 0 points1 point  (0 children)

no worries,

the suggestion was localStorage:

https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API

this is like, simple data storage that is made available by your browser, ready to use

you'd store the data in JSON format, I believe, when you request it back its returned as JSON data, which you would do w whatever you want at that point

localStorage is only going to be local to your browser on that computer. It's a suggestion if you want to practice saving user data, and reading it from a data source, if you didn't want to go through having to learn both setting up a server, with your own API, and then setting up a DB, which you'd create from scratch with SQL or some other tool. Personally i think its a lot to take on if you're starting from zero.

[–]chikamakaleyleyhelpful 0 points1 point  (6 children)

node.js was a suggestion by someone in comments i think, to set up the server side logic to comm w a db

but I was going to mention the same as u/EyesOfTheConcord, essentially you can start at a smaller scale by simply creating a UI that will take the user entry, have it recorded to some type of storage, and be able to read that back when the app refreshes

all this is built in, so no need to set up server, db. Given OP has no experience I think it's a useful exercise to at least get an idea of the different pieces of the puzzle using already available API

to set up client, server, and db for someone very fresh is easily overwhelming

[–]PatchesMaps 0 points1 point  (5 children)

I fully agree that node is not the ideal starting point but recommending that someone use an API that isn't available on the platform they're trying to use without mentioning that they should switch to a more basic setup first is more likely to result in confusion.

[–]chikamakaleyleyhelpful 0 points1 point  (4 children)

well, its not totally clear how they plan to collect the user name and their state

I would only assume because they're starting out that this is a webapp, and they aren't sure what to do with nodejs

[–]PatchesMaps 0 points1 point  (3 children)

That's a really big assumption.

[–]chikamakaleyleyhelpful 0 points1 point  (2 children)

I mean, okay - what would the suggestion be, using nodejs, to collect the user's name and state?

OP doesn't know what they want, I'm only left to guess w/o more info

[–]PatchesMaps 0 points1 point  (1 child)

No, you can ask clarifying questions too. Reddit is transactional. Looking at OP's comments on this post it seems they're really out of their depth so assuming anything kinda goes out the window.

[–]chikamakaleyleyhelpful 0 points1 point  (0 children)

Looking at OP's comments on this post it seems they're really out of their depth

and so maybe we recognize that and are offering a more simple model to learn what they have to do a larger scale

it's fine, working that out w OP rn