Where to store the information?

Asked

Viewed 228 times

3

I have an application in angular, basic with forms that stores the data in arrays and receives the dado in dados in div's. Now how can I store this data? What options have I been using Angularjs?

Being familiar with php and Mysql, I know I can pass the data by $http and call the file .php But I also know there’s Mongodb... An application that uses Mongodb works on a server PHP/Linux?

One more thing, on the Angular page they refer to Firebase that left me with more doubts yet. What is the best way to "play" with dice in Angularjs?

2 answers

3


There is no "best" way to save data with AngularJs, everything will depend on your needs/projects. The MongoDB works yes on Linux servers and to use it with php you need to install a driver

Already the FireBase is a service BaaS(Backend as a Service) that already provides most of the features that you would have to implement in a Backend. This way you will make the direct connection to the service.

References:

Using Mongodb and PHP

Baas - Backend as a Service

  • 1

    Thank you for the reply!

3

It depends on how you want to model your application:

  • In your browser - You can write a completely client-side solution, keeping user data in the instance of browser. To do so, use the Web Storage API or a library that deals with it, like the angular-webstorage. The downside is that your data will persist only for that browser.

  • On a server - You will need a back-end to store your data. Templates vary: From an implementation NodeJS + object-storage for simple applications, via relational databases (Mysql, Postgresql, Sqlite, Mariadb, Oracle, MS SQL Server and others) or not (Mongodb, Redis, Dynamodb, etc.).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.