Share data without database - javascript

I have this web application that gets and displays data from SAP, but i need a way (maybe a JSON file?) to share some data between different users, with the possibility to modify these same data for each user (even at the same time), without a database. There will be really small data and few users, and what i would write is simple data that tells me who is online in that moment. How can i do? I'd like to know if exist an easy solution to share these really small and simple data. I'm using React with no back, because i'm taking all the data i need from SAP. Clearly, i'm a beginner. All advice is welcome.

If you talking about some prototype like MVPs, I think JSON files would be best.
However, consider to work also that you can work with Local Storage.

You could use LocalStorage, SessionStorage or IndexedDB, but the last option is an in-browser database. Maybe LocalStorage is your solution.

Related

Data transfer from one HTML page to another

When creating a technical site, I faced the need to transfer data and save it in a file. I am making a website in Django. In models I create input data. I receive these data in HTML and, if necessary, the user changes them and JS performs the necessary calculations, the results of which are sent to the same page. It is possible to do a lot of analytical work on outgoing data (build graphs, calculate a loan, calculate various project risks). I prefer to create several pages so as not to fill one. All pages have already been built. There was a problem of this nature: On the main page, JS did his job but I do not know how to access this data on other pages. Is there a solution to write a JSON string to a file or send them to Django model (update static data). I read a lot and looked for solutions, but I could not figure it out until the end. Maybe someone knows the solution.
Thank you in advance.
If need more information, please let me know.
This is my first request for help, so please don’t be strict if I cannot ask correctly.
Writing to a temporary or holding table in a database might be a solution. You would be able to fetch the data as needed when a new page loads.
There is probably a better solution though.

Store data on server without Database

I’m webGL engine developer (ThreeJS) in small company. We have some events in few weeks and my boss just told me that i have to make registration form as soon as possible, also one page should show names, lastnames and company of all registered members. Problem is that i’m very bad in databases and i have really small amount of time to re-learn it. How can i store registration data on Server without Database? I looked up on web and most instructions are unclear(because i’ve not worked on database before) and others are using localstorage (as far as i know its used for cacheing data)
What you're looking for is a flat file database system, try taffyDB it basically use Json to store its data or Papa parse that uses CSV files, you can easily edit with excel for example.
If you're really good with javascript you can consider using a real database after all,mongodb is a bit advance but still not as complicated as mysql or even sqlite.

Save user input data

I'm trying to find a solution to my problem for quite some time. This is the web app that does some calculations.
https://nicolasbg87.github.io/upwork-style-number/index.html
I'd like to know if it's possible to save user input to an online database so it can be opened and edited. It'd have to autofill all the input fields once called. I was also thinking about the option to save whole page already filled and just store it as it is.
I have to mention that it won't always have the same amount of <tr>s inside each table, and that complicates the whole process for me.
I'm running out of ideas and would be very thankful if anyone could assist me in this matter.
You have 2 options, store the data in the client, this means to store in the localStorage of the browser (this only will let availability of information for the client that store it and not share the data with other users or from the other computer). The other option is as you say store in a database but this will require to you use a backend Technology like PHP, Java, Ruby, Python, etc. And a database engine as MySQL, Postgress, and so on. And the others NoSQL like MongoDB, Redis, etc.
According to I see in the webpage the information is well structured and wouldn't be complicated to store it.
In Html, it is not possible. To store data in a database would require another language. If you used Javascript it would be possible, but it would be really insecure and very difficult. I suggest using PHP and Mysql to do it, for the best outcome. So basically Html is not a database language and requires a backend language.

Jsfiddle, codepen,Jsbin like front end - Javascript

I've created HTML/CSS/JS playground some well known playground like Jsfiddle, codepen,Jsbin etc.
i would like to know about, "how to save and load the workaround when the user logging in again?" i want user to save their workaround and let them resume from where they stopped.
what approach/idea/possible ways available for this?
do i need to know session/local storage very well?, if not, kindly share your experience. if possible pls share tutorial/example snippets or any other work around.
Note: before asking questions here, i have searched solution as much as i can. but not able to uderstand.
many thanks for any help.
Here are the options that you have:
If you want the data to be persistent for users then you need to implement user login and store their data in your database on the backend. That way they will still have it if they log in on a different browser or device.
If you use local storage then it will be saved only for that browser and and every time the user changes the browser the data will be lost.
If you don't want to implement your own backend then you can use something like Firebase or other solutions: see noBackend for more options and more info.
Another option is to use a solution described on StaticApps or unhosted which are very interesting ways to avoid using any backend logic in your apps but still keep some persistent state.

Storing user data for free

I will make a website where users log in to see the site's info organized in a way which is specific to each user, depending on the settings which they can set/save while logged in. But they won't be adding content or uploading anything. So I guess, it won't be a lot of data - just a couple lines of text for each user.
So, to start out, I'd like to use something free to store that user data. Dropbox or Google docs, my own compter.... I dont know.
And then later, when I get enough users to make the investment worthwhile, pay for a more legitimate solution.
My question is, in the meantime, what is the best way to store that user data? Should I use javascript and Google docs API to read/write to a spreadsheet?
What is going to be most convenient when my user base has grown enough and it comes time to move all that over to a larger system?
And are there any other concerns I should be thinking about?
Look into using a lightweight DBMS like MySQL. If you want, you can serve it locally using your computer, but don't expect it to handle a lot of traffic. It'd be better to find an old computer and use that as a server.
What is your hosting solution? Many include free mySQL databases which should be enough.
I would suggest using sqlite3 or something for a database setup. They can be very small files and easily manageable. In the long-run sqlite3 isn't a great choice. You would want to move to a heftier database assuming you rake in a lot of users.

Categories

Resources