angular back-end with mysql - mysql

Good evening!
I would like to create a web application with Angular 6 but I would like to have Back-end mysql (This is the only basic form I understand a bit) only. Is it possible to have mysql as back-end and without having to use php?
I heard also about mongodb, but can we make requests with conditions for this management system (WHERE, LIKE ... as in sql).

There are two layers in your application - Angular is your front-end presentation layer and an API/Web Service is your back-end data layer which returns JSON data to the front-end. You can use any RDBMS provided your API service supports it. For example, .NET WebAPI supports MySQL through .NET Connector. You can use a variety of API platforms - PHP supports mysql through mysqli and other frameworks.

No, you can not communicate directly between Angular and MySQL. You'll need to build a back-end Web service that calls MySql using php or node. Angular can communicate with this back-end Web service via http.
Here are the steps you need:
1) Learn Angular. Start with the tutorial here: https://angular.io/tutorial
2) Learn how to build a back-end Web service to talk to your mysql backend. You could use php or node.js. See this article for more information. https://www.quora.com/How-do-I-connect-MySQL-to-an-Angular-4-application
3) Learn how to use Angular's http feature to talk to the back-end Web service. (Using the above linked tutorial for help.)
NOTE: You could use firebase instead. It does NOT require that you build a back-end Web service as it provides its own. You can find out more here: https://angularfirebase.com/ or here: https://github.com/angular/angularfire2

If you use Angular in front-end, you can use any backend with it to connect to MySQL database, for example:
Jersey web service written in Java
Php with mysqli
You can also use noSQL database with MongoDB or firebase.
The choice depends on the structure of your database (so you decide if it is better to have relational on noSQL database) and another very important thing is the hosting plan on which you want to deploy your website. If you have a shared server on which you have mySQL and you want to create a relational database, I recommend you to use the following architecture (Angular as front-end, php mysqli as back-end only to select/update from database, and mySQL to store database).

Related

How to connect Angular 2 with MySql Database using Nodejs?

I started new project for Retail Shop, I need to connect Angular 2/5 with MySQL Database using Node or any other method. I need Examples for Select, Create, Delete, Update. for now i need to create Login Page.
The only way you can do that is through http requests to the nodeJs server, since Angular runs in the web browser, while node runs on a server (javascript execution environment).
To create an Http service in Angular you can follow this link. In this way the nodejs server will be able to receive the data and be able to process them through a connection to mysql.
Well connecting Angular???
First learn that Angular, front end, does never connect to any database directly (not counting a New England db or LocalStorage as Database).
You need node or any other server side technology and then serve a REST API for providing data to your front end applications. SO actually your front end app in Angular is a complete separate application and your server side application will only connect to DB, handle logic and serve a REST API.
I use Sequelize for easy connecting and writing queries in JSON syntax.
Some more resources:
https://www.sitepoint.com/user-authentication-mean-stack/
https://medium.com/of-all-things-tech-progress/starting-with-authentication-a-tutorial-with-node-js-and-mongodb-25d524ca0359
Full Example app: http://jasonwatmore.com/post/2017/02/22/mean-with-angular-2-user-registration-and-login-example-tutorial
Angular is for your front end.
If you want Angular like syntax / Typescript for the back-end / server, have a look at: nest.
Nest (NestJS) is a framework for building scalable Node.js server-side applications.

Can I use NativeScript to read and write from a database in app?

I want to use NativeScript to build my apps. But I'm a bit confused by what backend approach I should use.
I want to create a simple CRUD app, that writes to a DB like MySQL or postgresql. Should I a build a backend api service to carry out my CRUD operations using something like express/node stack? or should the app itself perform the CRUD operations using NativeScript?
I would like to make the NativeScript app itself perform the CRUD operations it self as I feel creating a backend service for a simple CRUD app might be overkill. But I'm not sure if NativeScript is able to perform CRUD services to a DB like MySQL for user auths etc.
Well, on most mobile phones they already have built in SQLITE database engine. Since your using NativeScript; you should checkout my NativeScript-Sqlite plugin as it contains the ability to do CRUD create/read/update/delete to/from a sqlite database on both iOS and Android platforms. If you aren't familure with Sqlite, Sqlite is used in a huge number of applications on the phone and on desktop apps like FireFox.
If you really want to use MySQL, then you will have to always have a wifi/internet connection and build some sort of a bridge via the built in HTTP module; or using something like my NativeScript-WebSockets library to talk to your back end mysql server.
However, even if you are wanting to update a MySQL database on the internet; I would recommend local database storage be in sqlite; then you sync the data when you need too.

How to perform CURD on mysql using Node.js

I am new in Node.js. Well i have experience in Backbone on Client side and Server side using PHP Laravel framework.
I want know is following connection/communication workflow is correct or possible:
My application is being designed using Backbone and its stacks and i can use Backbone model/collection to make service calls. But on Server side is it possible to create web service using Node.js (Without using any Server side scripting like PHP).
Am i using Node.js in correct direction at server end.
Here Node.js will perform CURD operations on database and return the result in JSON format.
Please suggest me what we can do here.
Yes, Node.js is fantastic at building scalable CRUD JSON APIs to your backend database.
You can use MySQL, MongoDB, Redis or any other number of databases on the backend. You'll find support in NPMjs.org for all the popular databases.
In addition to enhanced performance of Node.js over PHP, you can also make multiple database calls in parallel with Node.js. That's something PHP can't do. In PHP you must make your database calls sequentially. In Node.js you can make several calls in parallel so long as the calls are not interdependent.

VB.Net Silverlight project and MySQL

I am an experienced web programmer that has sadly had little experience with Web Services and technologies like Silverlight - I've done a lot of PHP, Javascript, CSS and MySQL. I recently have been assigned to learn Silverlight and connect a new app to a MySQL database. After a full week of trying to get this working, I'm really hoping someone can answer these questions:
I have found the MySQL .NET Connector - am I correct that this is not compatible with Silverlight and I do not need it?
I understand I must use a Web Service for this. Can I use WCF or WCF RIA, or am I best using a more traditional web service method like REST or SOAP?
What's the best web service method for many quick queries (such as updating a search as the user types in the keywords)
Do I have to use technology like LINQ, Entity SQL, ADO.NET Framework, or a stored procedure? Is one of these the best way to do it or should I just skip them all and create a simple web service?
What's the best source to learn how to do specifically Silverlight VB.NET and MySQL and learn to do it the best way as explained above. Everything I've found (books and websites) seems to be in C#, not a Silverlight product, or just uses built in SQL Server support. Very frustrating!
For our web app, we need to be able to give the buyer not just access to our client side application via a browser but also the server side so they can OPTIONALLY host the entire product themselves. We're hoping to have one installer for them on their server (so they wouldn't have to set up php or mysql to host the product for example). If I use a VB.NET website and web service, will that deploy as just an exe or dll so the user won't have to install anything special? Is installing mysql on their servers unavoidable? Please advise.
Thank you!
Wow, lots of questions in a single question.
You can't use this from Silverlight.
WCF and WCF RIA are both technologies while SOAP and REST are protocols that are both supported by WCF. So yes.
Quick queries require good code and a well tuned database, the protocol won't be an issue.
LINQ, Entity SQL, and ADO.Net are all database access technologies and have nothing to do with web services. You'll need to build a web service and then connect it to a database using some database access technology. Which one you use depends on what backend you have.
C# is much more common. Most of the MSDN content has VB.Net as well. MySQL isn't an MS technology. You can use MySQL with Entity Framework and then expose that using WCF RIA Services.
If you use VB.Net as the server side technology they will need to be running Windows with IIS and have .NET installed. They will also have to install MySQL if they want to host it.

Changing data service from BlazeDS to PHP

Recently started to learn Flex technology to create RIAs. And now I want to create web based application of my created program in C++ builder. (flight info sys)
I liked the Flex because of it's cross platform and animation rich possibilities. One of the best web applications that i faced with in the inet is http://examples.adobe.com/flex3/devnet/networkmonitor/main.html
it has wonderful animating grid possibilities. Its server technology is in Java.
How about converting this data service to PHP? That should read data from mysql in PHP..
I prefer working with PHP (as data service) and MySql (as rdbms) in Flex...
seeing animated grid is so cool :)) Switch to Grid mode!
Is it possible to convert it's Data service to php?
Flex is a client side technology that is server-side agnostic. There are a number of ways you can use PHP to get what you want. The preferred approach for maintenance and performance would be using AMFPHP which allows you to define a PHP based destination that behaves like Blaze DS with respect to AMF.
Is there any reason why you would want to combine to system that do exactly the same thing? blazeds uses AMF and flex data service will ask you to download Zend which contain amf for php if you are using php server.
If you are using php as the flex server, connecting to mysql server is very easy, you would probably need blazeds if you are using other database server such as mssql server and so on.
php server is the best way to go in flex using flash builder 4 and above with mysql server.