Steps to connect Angular4 to a Database (Oracle) - database

Actually I've to connect my Angular project to a database to access some data. But I don't know how.
Should I write a REST API to do it? If yes, how can I connect my REST API to my project?
Which steps should I follow?
Thanks

The angular application will be your "front" application. To store and fetch data
from a database you'll need a "back" application that will provide URLS for your angular App to call.
A simple back can be done using Laravel and OCI 8 connector in order to query ORACLE database. The backend would be in PHP which is a common solution but might not fit your needs.
Set up your laravel project : https://laravel.com/docs/5.4
Install OCI8 module to connect to your oracle database : https://github.com/yajra/laravel-oci8
Then follow laravel's guidelines to set up URLs that will be callable by your front application in Angular4.

Related

Flutter with Azure API connecting to SQL SERVER DB

I am developing a mobile app with Flutter, however my data sits in a sql sever database. Would I still be able to perform CRUD operations on that DB from a Flutter mobile app?
And are there any magical plugins for Flutter to achieve this ?
Thanks
Luke
the best way from my point of view is to do that is through http Requests, this means you need to
create a rest application on your azure API
the application will perform http requests(post-patch-delete-get)
each request of these will map to an operation on the database(get = read, post=create, patch=update, delete=delete)
You can reference this blob: How to connect Flutter App to sql server .
NTMS did that successfully with SQLServerSocket.
First: you need a SQLServerSocket: https://github.com/nippur72/SqlServerSocket is free and works!
Second: you need a client https://github.com/nippur72/SqlServerSocket (look in DartClient folder).
He tested it with his remote sql and is working on CRUD.
I think you can get more useful infromations from that blob.
Hope this helps.

Do I need other libraries than React.js to work with databases

I just started learning react. Now I want to build a small application where:
A user can Register/Log In (working with database)
The user can add items to a todo list
The todo list is stored in a database
Do I need other libraries to work with databases?
It's a small application.
Should I use Redux or rather something using MVC pattern like ASP.net?
I don't have any expierence with any of these. After lot of research I am still clueless on where to start with.
As you are a beginner. I would recommend you to use below libraries in both front-end and backend to start with your application
Front-end:
React - works as view layer
axios - to talk to backend database for all CRUD operations
Use localstorage or session storage to work between components. Because your application is very small so you can go with this approach or consider
using redux from now if you feel your application will grow bigger in
future
Back-end:
Keep your back end service as micro-services
As you are already working on react means you know something about javascript so I recommend you write your backend service in nodejs
If you want to use No SQL database then you can go with mongoDB database using mongoose in nodejs
If you prefer SQL database then I would recommend you to start with Postgres SQL database. Postgres SQL is popular these days than
any other SQL database
These are the required libraries for you to start.
I would recommend you to go for MERN stack i.e., MongoDB, Express JS, ReactJS and NodeJS

Ionic app connection to SQL Server database

Basically I have a mobile app that I am building in Ionic (3 I believe). I have a website that I built a while back in C# using Visual Studio. The site is attached to a SQL Server database. This Ionic app I am creating is to go along with said website.
My question is how do I connect my app to the same database. I'm very new to Ionic and I cannot seem to find any answers online. I have found some vague SQLite stuff but that is about it.
Not necessarily looking for specific answers in code (although I wouldn't say no). If someone could even breakdown the steps I'd need to take then I can go and research it myself.
Thanks in advance
You can connect to mysql database with your ionic app using Webservice in c#.There is no need of SQLite for connecting your app to sql database.It can be used as local storage instead.Ionic use json data to access.So the data you retrieve from Webservice must be Json.
It depends
Do you wish to directly access SQL database from your ionic app or you want to have access to the database via api.
1. Directly connect to SQL database from ionic application using Cordova plugin.
Follow this link for more info -1

connect react native app with sqlserver

I already built a CMS website using ASP.NET MVC with SQLserver 2014,
and now i want to develop it into a mobile app using React Native, that I've been learning and playing with it's components for months now, but I don't know how connect the app with SQL server database. Is there anyway or solutions for connect React Native with SQL server database?
It is possible to connect a react native app with a remote MSSQL database using the react-native-mssql plugin (Android only at the moment).
Although it is best practice for security and performance to create an API interface there is nothing stopping you from connecting directly to the database if this suites your scope better than the API
You will have to create some sort of interface/API. The REST approach might be the correct one for your use case (manipulating data in a database).
Directly connecting to a SQL database from a mobile device is not recommended as the internet/network connection of a mobile device is prone to error and latency.
I would highly recommend you to make an API. The following points should explain you why:
Security (create an API with tokens or auth)
Error handling (your API should detect errors and send the correct headers)
Reusability (what if you want to connect another app or website to the database?)
Performance & API Management (you can control accesses and make statistics)
Once your API is finished, you can use it everywhere (fetch, axios, ...).

Server based database with Onsen/Monaca

I'm looking for advice if it is possible to use server based database with the onsen/monaca framework? I know Monaca has its own backend database that can be utilized; however, I intend to not have my project's database cloud based.
Initially, I would have used mysql or mongodb if I was working with Php/javascript, but given I want to make hybrid phone app using onsen/monaca, I don't know if I can go the same route. I'm new to onsen, and I am still learning.
Onsen is simply a UI framework or in short, a very fancy collection of html, css, and JS. It is compatible with any database you use. You would need to utilize JS to connect to some server-side language like PHP or use Node.JS that would actually connect to your remote database. Hope that helps!
Local databases, on the other hand, have to do with the target device and phonegap than Onsen. The most common plugins support SQLite.

Resources