₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,324,996 members, 8,419,858 topics. Date: Thursday, 04 June 2026 at 03:32 AM

Toggle theme

Javascript Or PHP, Which One Should I Go For? - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingJavascript Or PHP, Which One Should I Go For? (2318 Views)

1 Reply (Go Down)

Javascript Or PHP, Which One Should I Go For? by Abdulnur(op): 4:45pm On Sep 12, 2018
Hi everyone,

I learnt JavaScript is (mainly) for front end development.
Can't it be used as a server side language thereby replacing PHP?

and

PHP, I learnt is for back end development.
Cant it be used for front end ? There replacing JavaScript?
[hr/]

You may wonder why I'm looking forward to learning one only.

I have a very little time with me(3 months) and I need to, at least, be a full stack developer to understand (not to create) how web apps work.


If any of my pre mentioned ways through won't work, what is the best way possible?

Thank you, Abdulnur.
Re: Javascript Or PHP, Which One Should I Go For? by eph12(m): 5:08pm On Sep 12, 2018
Abdulnur:
Hi everyone,

I learnt JavaScript is (mainly) for front end development.
Can't it be used as a server side language thereby replacing PHP?

and

PHP, I learnt is for back end development.
Cant it be used for front end ? There replacing JavaScript?
[hr/]

You may wonder why I'm looking forward to learning one only.

I have a very little time with me(3 months) and I need to, at least, be a full stack developer to understand (not to create) how web apps work.


If any of my pre mentioned ways through won't work, what is the best way possible?

Thank you, Abdulnur.
Please where did you hear the highlighted?
A simple Google Search will clear most of your doubts and educate you better about web development and javascript
Re: Javascript Or PHP, Which One Should I Go For? by Abdulnur(op): 5:26pm On Sep 12, 2018
eph12:
Please where did you hear the highlighted?
A simple Google Search will clear most of your doubts and educate you better about web development and javascript
Thanks for stopping by.
I understand JS is a general purpose PL.
What I meant was, when it comes to web development, its mainly for frontend.
A google search may work yeah. But on Google search, I may not be able to interact with the author of the said post I could read.



"nitially only implemented client-side in web browsers" Wikipedia
https://https-en-wikipedia-org.0.freebasics.com/wiki/JavaScript?iorg_service_id_internal=803478443041409%3BAfpC1uEPhl7nB7y0
Re: Javascript Or PHP, Which One Should I Go For? by eazycash: 5:29pm On Sep 12, 2018
js can be used for both front end ad back end. eg. nodejs is a js framework. php is a backend scripting language and which is also good for website templating. in website design both are necessary depending on the app you are designing
Re: Javascript Or PHP, Which One Should I Go For? by eph12(m): 5:39pm On Sep 12, 2018
Abdulnur:
Thanks for stopping by.
I understand JS is a general purpose PL.
What I meant was, when it comes to web development, its mainly for frontend.
A google search may work yeah. But on Google search, I may not be able to interact with the author of the said post I could read.



"nitially only implemented client-side in web browsers" Wikipedia
https://https-en-wikipedia-org.0.freebasics.com/wiki/JavaScript?iorg_service_id_internal=803478443041409%3BAfpC1uEPhl7nB7y0
Frontend javascript frameworks include vue react angular
Backend javascript framework include node.js

These are the ones I know or most popular. JavaScript can be used to develop your web app from scratch to finish
Re: Javascript Or PHP, Which One Should I Go For? by eph12(m): 5:41pm On Sep 12, 2018
eazycash:
js can be used for both front end ad back end. eg. nodejs is a js framework. php is a backend scripting language and which is also good for website templating. in website design both are necessary depending on the app you are designing
With JavaScript, you don't need php to develop a web application
Re: Javascript Or PHP, Which One Should I Go For? by codemarshal08(m): 5:42pm On Sep 12, 2018
Abdulnur:
Hi everyone,

I learnt JavaScript is (mainly) for front end development.
Can't it be used as a server side language thereby replacing PHP?

and

PHP, I learnt is for back end development.
Cant it be used for front end ? There replacing JavaScript?
[hr/]

You may wonder why I'm looking forward to learning one only.

I have a very little time with me(3 months) and I need to, at least, be a full stack developer to understand (not to create) how web apps work.


If any of my pre mentioned ways through won't work, what is the best way possible?

Thank you, Abdulnur.
I will suggest you go with the PHP route. it is easy enough to grab the basis within that time frame.
Re: Javascript Or PHP, Which One Should I Go For? by sparkle6(m): 7:33am On Sep 13, 2018
Javascript is more demanding than php. But php is easier and well defined you might be overwhelmed by d number of frameworks js has. If u dont knw what u want u end up jumping from Vue.js to react to coffe to json to node.js and in the end u discover that u still have no app to boast of.
Re: Javascript Or PHP, Which One Should I Go For? by LiveWireForum: 2:58am On Sep 14, 2018
I will suggest you learn JavaScript before PHP a little bit of scripting know will help and there are many JavaScript library which could go a long way
Re: Javascript Or PHP, Which One Should I Go For? by philo4realz: 8:48am On Sep 14, 2018
Ohkay, yes javascript can be used on both the front end and the backend, it can be used as a backend with d help of a javascript runtime environment, nodejs
So within, ur time frame, I had suggest u go for php, u should be able to really get d hang of it, unlike javascript(nodejs) , which has numerous frameworks to learn.
Re: Javascript Or PHP, Which One Should I Go For? by youngds: 7:16pm On Sep 19, 2018
Abdulnur:
Hi everyone,

I learnt JavaScript is (mainly) for front end development.
Can't it be used as a server side language thereby replacing PHP?

and

PHP, I learnt is for back end development.
Cant it be used for front end ? There replacing JavaScript?
[hr/]

You may wonder why I'm looking forward to learning one only.

I have a very little time with me(3 months) and I need to, at least, be a full stack developer to understand (not to create) how web apps work.


If any of my pre mentioned ways through won't work, what is the best way possible?

Thank you, Abdulnur.
You can't compare both, depending on what you want to do with the knowledge I think php would serve you better or Node js but javascript functionality can be over looked in web. Adios
Re: Javascript Or PHP, Which One Should I Go For? by Abdulnur(op): 1:55am On Sep 20, 2018
youngds:
You can't compare both, depending on what you want to do with the knowledge I think php would serve you better or Node js but javascript functionality can be over looked in web. Adios
Tnk you smiley
Re: Javascript Or PHP, Which One Should I Go For? by philo4realz: 10:31am On Sep 20, 2018
youngds:
You can't compare both, depending on what you want to do with the knowledge I think php would serve you better or Node js but javascript functionality can be over looked in web. Adios
U meant javascript functionality can't* be overlooked right!
Re: Javascript Or PHP, Which One Should I Go For? by Abdulnur(op): 3:44pm On Sep 27, 2018
Thanks everyone, after reading all the advises, i think it'll be better to go with JS, considering the fact that the node.js can be used on client side/back end.
Re: Javascript Or PHP, Which One Should I Go For? by Nobody: 5:40pm On Sep 27, 2018
Abdulnur:
Thanks everyone, after reading all the advises, i think it'll be better to go with JS, considering the fact that the node.js can be used on client side/back end.
Well let me give you a detailed introspect as to why most people here suggested php before JavaScript.


1. JavaScript is Hard( ( not trying to discourage you ).

When I mean JavaScript is hard I mean it's not so easy.because it's a loose language without types. Now the issue of types is not a problem cause php , python are also templating language without types. However what makes JavaScript hard is that there are multiple ways to do one thing... And you can hardly know which of the ways is recent or old.

For every year JavaScript releases a new version of the language and they do not declare incompatibility with older versions. It gets to a state where by things became so verbose untamed and everybody programmed anyhow and still achieve results, but these codes or orograms were/are half baked. A lot of changes were /are happening yet the community do not follow up with the pace at which it happens. Example it will interest you to know that as we speak there is JavaScript Es2018 but the major public still use Eat ( I am been lenient).

Oh no let me not even be fair, let me go harder 90% of scripts in January are coded with old patterns Es5. Many disparity lead to many useless tools like webpack and likes.. This is also my we have various JavaScript derivatives. I.e Typescript, dart, flow etc.
Note most big companies use Typescript cause it's type safe and nicknamed the future js. It is full javasript but this time stricter in compliance and type safe also you get to learn core programming concepts like Traits, classes not (the aldutereated just prototype call), geneics, type static etc. This will make your migration to other languages so easy. Most language are moving to strict typing. Php7 added this, JavaScript also have this with a declaration at header


2. Php to JavaScript or JavaScript to Phone
Nothing is impossible you might be able to go Just to PHp... However I am 95% sure that it won't be easy path unlike if you take the opposite direction (i.e php to js). In January you won't get much concept then you dive into frameworks and debugging might then be an issue and your headache starts to roll in.... A variable can be called from any freaking place. In php you will understand from ground up your flow , see modern tutorials and how you progress will be well structured. Also you did get recent up to date assistance when you need help as it's easy to get a phone programmer on the net. Same applies to Just it's easy getting one. But the quality of programmer begs the question.


3. Marketability

Hmmmm truth be told... If you learn Just and you can code well you did be able to kill 2 beds with a single stone. I.e be able to program front end a d also back end well. However this will not be the case with PHP.... With php you will code only server side. Not bad though...


4. Nigeria Market
I can't say about this, maybe other developers can put a word or 2.


5. Server Understanding.
Learning JavaScript/node will give you a good understanding of the computer + server + port forwarding hosting and setting up a server. This is where php falls behind. It's not bad though and it's bad. Every php newbee just upload to cpanel script and know nothing about server management , load balancing. Oh let me not go far, they know few things about command line. Thanks to composer but php is not still there yet in my opinion.

Server management and understanding though can be learnt on the side. Just how determined you are.... Also get a tutor ( not necessarily physical but like watch YouTube videos) reading J's alone and practicing wont be easy especially if this is your first programming language.

Always ask questions. You can check quora, stack overflow, Reddit. Lots of smart peeps are ready to give you a helping hand.


If you are at this paragraph you might be confused as I didn't give you a path to follow..... I only gave you pro and cons.... I am biased also towards php cause it was my second language from python for over 6years before I dived into JavaScript/typescript and then out to go...

Ehmmmmmmmm take javascripts... You kill 2 bed with one stone.. front end and backend + command line usage and likes...

Thanks.
Re: Javascript Or PHP, Which One Should I Go For? by Abdulnur(op): 12:59am On Sep 28, 2018
Zsatan:
Well let me give you a detailed introspect as to why most people here suggested php before JavaScript.


1. JavaScript is Hard( ( not trying to discourage you ).

When I mean JavaScript is hard I mean it's not so easy.because it's a loose language without types. Now the issue of types is not a problem cause php , python are also templating language without types. However what makes JavaScript hard is that there are multiple ways to do one thing... And you can hardly know which of the ways is recent or old.

For every year JavaScript releases a new version of the language and they do not declare incompatibility with older versions. It gets to a state where by things became so verbose untamed and everybody programmed anyhow and still achieve results, but these codes or orograms were/are half baked. A lot of changes were /are happening yet the community do not follow up with the pace at which it happens. Example it will interest you to know that as we speak there is JavaScript Es2018 but the major public still use Eat ( I am been lenient).

Oh no let me not even be fair, let me go harder 90% of scripts in January are coded with old patterns Es5. Many disparity lead to many useless tools like webpack and likes.. This is also my we have various JavaScript derivatives. I.e Typescript, dart, flow etc.
Note most big companies use Typescript cause it's type safe and nicknamed the future js. It is full javasript but this time stricter in compliance and type safe also you get to learn core programming concepts like Traits, classes not (the aldutereated just prototype call), geneics, type static etc. This will make your migration to other languages so easy. Most language are moving to strict typing. Php7 added this, JavaScript also have this with a declaration at header


2. Php to JavaScript or JavaScript to Phone
Nothing is impossible you might be able to go Just to PHp... However I am 95% sure that it won't be easy path unlike if you take the opposite direction (i.e php to js). In January you won't get much concept then you dive into frameworks and debugging might then be an issue and your headache starts to roll in.... A variable can be called from any freaking place. In php you will understand from ground up your flow , see modern tutorials and how you progress will be well structured. Also you did get recent up to date assistance when you need help as it's easy to get a phone programmer on the net. Same applies to Just it's easy getting one. But the quality of programmer begs the question.


3. Marketability

Hmmmm truth be told... If you learn Just and you can code well you did be able to kill 2 beds with a single stone. I.e be able to program front end a d also back end well. However this will not be the case with PHP.... With php you will code only server side. Not bad though...


4. Nigeria Market
I can't say about this, maybe other developers can put a word or 2.


5. Server Understanding.
Learning JavaScript/node will give you a good understanding of the computer + server + port forwarding hosting and setting up a server. This is where php falls behind. It's not bad though and it's bad. Every php newbee just upload to cpanel script and know nothing about server management , load balancing. Oh let me not go far, they know few things about command line. Thanks to composer but php is not still there yet in my opinion.

Server management and understanding though can be learnt on the side. Just how determined you are.... Also get a tutor ( not necessarily physical but like watch YouTube videos) reading J's alone and practicing wont be easy especially if this is your first programming language.

Always ask questions. You can check quora, stack overflow, Reddit. Lots of smart peeps are ready to give you a helping hand.


If you are at this paragraph you might be confused as I didn't give you a path to follow..... I only gave you pro and cons.... I am biased also towards php cause it was my second language from python for over 6years before I dived into JavaScript/typescript and then out to go...

Ehmmmmmmmm take javascripts... You kill 2 bed with one stone.. front end and backend + command line usage and likes...

Thanks.
Thank you sooooo much.
I read every bit of it and guess what, I started JS today.
Sleeves rolled, PDFs/Videos ready and I feel in 3mnths I'll be able to know what happens within a typical web app that uses node.js and JS.
After that, php will be my next catch.

Thanks one again.
Re: Javascript Or PHP, Which One Should I Go For? by Nobody: 1:08am On Sep 28, 2018
No need for PDFs..

Just use online materials. If you need help ask many will r willing to assist you. Learn es6 don't learn old school js.


Sorry my phone + nairaland changed some words. And I didn't proof read my comment before posting. Just saw it now.
Re: Javascript Or PHP, Which One Should I Go For? by Abdulnur(op): 1:51pm On Sep 28, 2018
Zsatan:
No need for PDFs..

Just use online materials. If you need help ask many will r willing to assist you. Learn es6 don't learn old school js.


Sorry my phone + nairaland changed some words. And I didn't proof read my comment before posting. Just saw it now.
Online materials are good I must say, but I learn things more by reading them than by watching.
Maybe you know where I can get some podcasts.
Re: Javascript Or PHP, Which One Should I Go For? by adeoyeyemi(m): 3:01pm On Sep 28, 2018
Abdulnur:
Online materials are good I must say, but I learn things more by reading them than by watching.
Maybe you know where I can get some podcasts.
Where do u reside? I am in Lag, i have the offline W3school website on my system to share with you. It is a large folder though.
Re: Javascript Or PHP, Which One Should I Go For? by adeoyeyemi(m): 3:12pm On Sep 28, 2018
Start with JavaScript.
I would advice you not to just learn how to code with it but know what is happening behind the scene.
Look for this course: JavaScript: Understanding the Weird Parts
Re: Javascript Or PHP, Which One Should I Go For? by Abdulnur(op): 9:55pm On Sep 28, 2018
adeoyeyemi:
Where do u reside? I am in Lag, i have the offline W3school website on my system to share with you. It is a large folder though.
Wow, thanks for your gesture.
I reside in Kano, unfortunately, not preparing to travel anytime soon.
In any way, Thank you. smiley
Re: Javascript Or PHP, Which One Should I Go For? by Abdulnur(op): 9:58pm On Sep 28, 2018
adeoyeyemi:
Start with JavaScript.
I would advice you not to just learn how to code with it but know what is happening behind the scene.
Look for this course: JavaScript: Understanding the Weird Parts
thanks, I've finalise to start with it.
I'll definitely check it out.
1 Reply

Python Or Php Which One Should I Learn FirstI Need Help In Integrating Biometric System On Website(javascript Or PHP)Jave Script Or PHP234

Download Lots Udemy Premium Courses FreeJust Launched My First Android App Called ReflapComputer Professionals (registration Council Of Nigeria) CPN