Lesson 1 Chat
Shall we start then?
Today we're going to start Node.js.
It's a big topic...I mean really big.
Every programming language has some limit (for header files / libraries etc)... there's no limit in Node.
This is because it keeps adding new features EVERY SINGLE DAY...
So, let's begin with exploring what it is, where it is used and why we are learning it?
I've created a blog at address:
learningnode.blogspot.com
Here, I'll post all the topics that we covered today. Soon I'll make this blog private which will accept only your Email IDs and can see the blog...
Are you able to follow me?
Renu????
I think connection issue...
Nope, BootStrap isn't over. We'll continue that while using Node.js....in combined form. I'll explain the remaining doubts in different session...
And...where is renu now? :/
don't know
make a call to her
Okay.. let me...
Actually anything is good for future purpose if you're good at it..... :D
Although most of the technological trend is in AI and MAchine Learning these days. They require lots of Maths and Statistical skills...
Umm....hard to say how much you can earn, it depends on your stack....
Let's see what the Actual Web Development Stack is...
Basics:
HTML, CSS, JavaScript, JQuery, AJAX
Advanced:
Node.js / PHP / ASP.NET / Django,
BootStrap,
Angular.js / React.js / React Native
MongoDB / PostgreSQL / MySQL
Deployment:
Apache / ISS / Joomla
You'll actually need to learn at least all the basics topics to be able to build an actual functional website...like news websites / articles websites, etc.
For advanced websites, you'll need a framework, like a javascript framework like Node.js or Django (for those who use Python) and ASP.NET for those who use C#.
Can't say on timing... but mastering all of the basics can be done in 1 year if spent much time. It really depends on the time you spend on lappy doing these... :)
One more thing I wanted to show before we start Node...
These are the actual developer survey results based on developer feedbacks from around the world...
Can you see the type of developers there are, and there amount?
Around the bottom is Machine Learning specialists....
They earn the most money in IT world. They earn in one month what most of the other developers earn in entire world...
But they are really rare...
Full-Stack Web Developers are the most wanted web developers these days... it means, you should know both front-end (HTML/CSS/BootStrap/Angular/React) as well as back-end languages (Node/Express/PHP/ASP.NET etc)....
This one is important....
Are you both here?
shivani
wRhenuere is renu?
She got disconnected
reconnecting now...
Renu?
U there?
??????
Should I restart? Meeting?
no need
it 10 now
its*
yeah...
can you see this graph?
this one?
Among all the programming languages, Node.js has got the highest adobtibility rate in last 5 years....
In fact, it is largely used in MNCs, like Microsoft, Amazon, Paypal etc....
Okay, now...
WHAT IS NODE.JS?
Node.js is basically a back-end runtime technology which uses JavaScript for code and an engine built in C++ for executing those code at the machine level. This engine is called V8 engine, which Google Chrome uses for executing files.
Node.js is much faster than PHP, ASP.NET, Perl, Python etc.
In fact, it can be used for building both web as well as desktop applications...We'll build web applications using Node.
Are you both clear with it?
yeeee
renu is not connected to the meeting
yup.. just saw. I think she getting disconnected again and again
Lets start with downloading Node.js..
To download it, go to nodejs.org and click this....
Then run the setup and keep on clicking "Next"...
It'll ask for permissions, click yes
I cannot reinstall because it is already installed.
It is simple, you just need to keep on clicking "NExt" a few times...
After that, when you search in start menu, for "Node", you should see this...
"Node.js command promt"
This is where you can type Node.js commands and programs as well as in Visual Studio Code.
VS Code is better overall..
Lets write the first "Hello World" program in Node.js
Are you both present?
yess sir....shivani
Okay, I saw Renu's cursor too... maybe wasnt allowed control
try now...yup
thank god
:D
Ok, lets continue.... first we create a project folder...
I'm calling it "Lesson1"
lets open that in VS Code
Im creating a file "app.js"
All Node.js files end with ".js" which means JavaScript.
We'll use "Terminal" at the bottom to give some specific commands...I'll mention them soon...
The first one is
"npm init" : Node Package Manager : Initialize
It basically creates a ".json" file which contains all the information entered by you, about your project.
.json: JavaScript Object Notation
YOu can see this file in the folder you made...
Is this much clear?
all r written by you in Terminaylaa?
No, I just wrote these....
I just kept pressing "Enter" key as it asked me for more values...
okok
Well then... let's write hello world...
That's it! Done.
Let's run it...
To run the app, you'll give command:
"node app"
Here, app is your app name. It can be anything you want...
That's the output!
Is it clear?
hnn
why node app to run
How do you run a java app?
first you compile...javac filename
java filename
SAme here....
node filename
:)
Here filename is app.js... is it clear?ohkkkk
Let's do a small topic:
---------------- VARIABLE DECLARATIONS ------------------
I created a file variables.js.
You can name it whatever you want.
Im gonna declare and use some variables here...
We use "var" keyword for integers, floats, doubles, strings, arrays, and all the other data types. Even boolean...
Is it clear?
yayess
Now... let's try to print them...
We use "console.log" in Node.js same as "printf" or "System.out.pritnln"...
Is is simple so far?yess very simple
Great!
LEts try few more data types then move to arrays...
Okay, lets move on to arrays...
One more thing, commenting is same as other programming langauges... you can use // for single line and
/* ............ */ for multiline..
ohkkk
This is how you declare an array...
This array can be int, String, boolean values or whatever you want. It is always "var". One universal keyword.... One for all and all for one... ooops....
.push is used to add an element to the array...
Now, the array myArray contains one element, which is,1.
Did I do something wrong....
yes
Thanks!
Always remember, arrays are added at the top of the stack in Node and then also removed from the top...
So basically, it is FILO...
I'll upload this file here:
learningnode.blogspot.in
Comments
Post a Comment