Hi,
With Angular it is not worth trying to use the server database.
I err ?
Hey Riccardo,
please elaborate a little bit more.
What do you mean by “trying to use the server database”?
I think Brad gave a great overview about the differences between Angular and a server database.
Hey miku86,
I know and I really appreciate that Brad has provided a great overview of the differences between Angular and a server database.
But I am a junior and, unfortunately, I cannot understand.
I don’t understand if Angular can manage a hosted database without adopting too complex solutions.
Can Angular read and write records from / to a database table?
Forgive my incompetence.
I really envy you seniors.
Unless you’re talking about different technology with a similar name, Angular is a front end framework for websites/web applications. It does not connect directly to a database at all.
“Front end” code runs in the browser. Your computer is running the front end code for this forum. Your browser does not include a database. There is a server for this forum that connects to a database. That server is a computer in a warehouse somewhere. You are able to see data that is in that database because your browser sends a message to the server. The server gets data from the database and then sends it in a message to your browser. Angular is only used for the code that runs on your computer. It is not a framework used on the server to access a database. This also true of any other frontend framework/library, like React. Websites/web applications involve cooperation and communication between multiple computers: the server and the browser(s) that are seeing the application.
Ok ArielLeslie,
“angular” can’t do the work of “php” but can’t interact with it either?
I wonder: What good is a front end without a back end?
If with “Angular” I can not create a site that modifies customer data, what do I need?
Angular is a framework, built on JavaScript. PHP is a programming language. PHP an JavaScript are both languages that send commands to a server (“back end”) and handle responses. Whether you are using PHP or JavaScript, if you are building a web application you need BOTH a “front end” (client code) and a “back end” (server code).
You can have a static website that doesn’t need to interact with data, in which case you don’t need to write a server application. If you’ve done any of the freeCodeCamp curriculum, the projects in Responsive Web Design and Front End Development Libraries are all examples of this.
You need to write two applications. You need to write an application that runs on the server. It will read and write to your database. You need an application that is served to the client. It controls the web pages themselves. The two applications will communicate via HTTP. The client application can use Angular or not. It will not change the functionality at all. It’s just a tool for building the front end code. The server side application can be written in any language that has an HTTP library.
It really depends on what the goals of your app are.
For example, a calculator can be done 100% on the front-end. So Angular could be used to create the code to handle all the complex logic that it takes to render and manage a calculator. However there isn’t any need to send/save any data beyond it.
You could use Angular, or use just HTML/CSS/JS or some other framework like React but the constraints are the same. Its only once you need to save data between sessions, and or share it between user’s machines do you start needing some kind of database, and server-side code.
Think of this server-side code as the mediator between these multiple machines trying to talk to each other, along with getting data saved in the database. The server-side code also can’t directly “do stuff” on the client-side (what the user sees) beyond sending/receiving data, making it limited.
Ultimately to create a site to modify customer data requires a few key moving parts that all need to work together to make a whole.
ArielLeslie,
IF
“You are able to see data that is in that database because your browser sends a message to the server. The server gets data from the database and then sends it in a message to your browser.” = PHP job
AND
“front-end” = Angular job
THAN
(Angular + PHP) = (front-end + back-end) ?
No.
PHP is a language.
JavaScript is a language.
They are alternatives to each other. Mostly, JavaScript is replacing PHP.
Angular is not a language. It is a tool that makes writing front end code a a bit more organized and streamlined.
I don’t know what your background or experience is, but it sounds like you are very new to web programming. I strongly recommend you make the time investment in learning full stack web development from one of the many great resources like freeCodeCamp.
bradtaniguchi,
perfect, you said very right things.
Thank you.
One last piece is missing.
Let’s stop on your last sentence:
“Ultimately, building a site to change customer data requires some key moving parts that all have to work together to make a whole.”
“… they must all work together …”.
Can these things work together?
Angular and PHP?
Why this focus on two very specific tools? Just try making things and you will find out which tools you need as you learn and progress.
JeremyLT,
Thank you. Good advice.
Friends,
I want to thank you all.
You have all been very helpful to me.
In particular, you are a great push to move forward.
You are giving me the strength to move mountains.
Thank you.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.