Where to store information?

3

I have an angled, basic application 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 do I have when using AngularJS ?

Being familiar with php and MySql , I know I can pass data to $http and call the .php file that inserts into the relational database, but I also know that MongoDB exists. .. An application that uses MongoDB works on a PHP / Linux server?

One more thing, on the Angular page they refer to Firebase that left me with even more doubts. What is the best way to "play" data with AngularJS?

    
asked by anonymous 30.09.2016 / 11:54

2 answers

3

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

FireBase is a Backend as a Service service that already provides most of the functionality you would need 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

    
30.09.2016 / 14:24
3

Depends on how you want to model your application:

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

  • On a server - You'll need a backend to store your data. Models vary: From a NodeJS + object-storage ployment implementation to simple applications, passing through relational databases ( MySQL , PostgreSQL , SQLite , MariaDB , Oracle , MS SQL Server and others) or not ( MongoDB , Redis , DynamoDB , etc.).

30.09.2016 / 14:36