[Angular 2 Tutorial] Should You Learn PHP? – Pros and Cons [w/ subs]



00:00:02 – [Music]
00:00:11 – about the language and look at some of
00:00:14 – the pros and cons to help you decide if
00:00:16 – you should actually spend the time to
00:00:18 – learn it or not so I do have a video
00:00:20 – called web development in 2017 a
00:00:23 – practical guide and it's my most
00:00:25 – commented on video it has the most likes
00:00:28 – on my channel but it also has the most
00:00:29 – dislikes and that's because many web
00:00:32 – developers are strongly opinionated when
00:00:34 – it comes to this stuff so some web
00:00:37 – developers really despise PHP and that's
00:00:40 – fine everyone's different everyone is
00:00:42 – entitled to their opinion I happen to
00:00:44 – really like PHP for for small and
00:00:46 – medium-sized applications and websites
00:00:49 – as long as the code is written correctly
00:00:51 – now with that said what I want to do in
00:00:54 – this video is not try and sway those
00:00:55 – people into liking or using PHP but just
00:00:59 – to take a look at the facts of what PHP
00:01:01 – is and what it isn't and then you can
00:01:04 – make that decision on your own and I'm
00:01:06 – not here to say PHP is the best server
00:01:08 – sign language out there because I don't
00:01:10 – think that in fact I think it's stupid
00:01:12 – and closed-minded to say anything is the
00:01:14 – best or the worst everyone's different
00:01:16 – and everyone has their own abilities and
00:01:18 – their own opinions and they adapt a
00:01:20 – certain syntax in a different way that's
00:01:23 – why I can't stand when someone says this
00:01:24 – is the best and that's the worst because
00:01:26 – I said so that s*** p***** me off it
00:01:29 – just makes you look arrogant ignorant
00:01:30 – but anyways I'm not going to go off into
00:01:33 – a negative rant so uh huh most likely
00:01:37 – you're here because you're probably
00:01:39 – wondering what server-side language you
00:01:42 – should learn first or second or third
00:01:44 – now if you were to ask my opinion I
00:01:47 – would narrow it down to either PHP no
00:01:50 – Jas or Python all right i'm actually
00:01:52 – very new to python i've been working
00:01:54 – with django recently and I do really
00:01:56 – like it if you asked me a few months ago
00:01:58 – I would have said rails instead of
00:02:01 – Python but rails has really seemed to
00:02:03 – level off recently and i absolutely love
00:02:06 – nodejs so node may be an attractive
00:02:08 – choice because chances are you already
00:02:10 – know some JavaScript so the logical
00:02:13 – choice would be to go with node but I
00:02:15 – would actually look at it from a
00:02:17 – different angle and look at it as
00:02:19 – choosing something that's not JavaScript
00:02:21 – gives
00:02:22 – a little bit of experience with a
00:02:24 – secondary language so you can kind of
00:02:26 – look at that look at what's similar and
00:02:28 – what's different between the two and
00:02:30 – then you can start to look at other
00:02:31 – languages and compare those and just
00:02:33 – start to get a better idea of how
00:02:35 – programming works in general so I don't
00:02:38 – really have a clear recommendation aside
00:02:40 – from looking at those three node PHP and
00:02:43 – Python I don't know enough about most of
00:02:46 – these other languages aside from just
00:02:47 – the basics I wouldn't recommend Java or
00:02:50 – C++ or anything like that for your first
00:02:52 – language not because they're not good
00:02:54 – they're extremely powerful but because
00:02:57 – they're just too difficult and too
00:02:58 – strict for a beginner all right now what
00:03:01 – I actually did was just what I said I
00:03:03 – learned HTML and CSS and basic
00:03:05 – JavaScript and then went to PHP i worked
00:03:08 – with that for a long time i learned a
00:03:10 – bunch of frameworks and then i went back
00:03:12 – to javascript and learned nodejs express
00:03:15 – and a bunch of client-side frameworks
00:03:17 – like angular and react then rails and
00:03:20 – now python so that's what I did and I
00:03:23 – don't regret any of those decisions I've
00:03:25 – done pretty well with those and I can
00:03:27 – pick up languages very quickly now all
00:03:30 – right so that those are pretty much our
00:03:32 – choices so let's take a look at some of
00:03:35 – the advantages of PHP so I think one of
00:03:38 – the biggest reasons to learn PHP is
00:03:39 – because it's absolutely everywhere love
00:03:42 – it or hate it around thirty five percent
00:03:43 – or so of the websites on the internet
00:03:46 – use PHP in one form or another it may
00:03:48 – even be higher than that i'm not really
00:03:50 – sure wordpress is actually a big chunk
00:03:53 – of that which is the most popular
00:03:54 – content management system or blog
00:03:57 – platform by far now with that said PHP
00:04:00 – is a great language to learn if you're
00:04:02 – looking for a job I'm not saying it's
00:04:04 – the best but it is up there there's a
00:04:06 – ton of web design and development firms
00:04:08 – out there that use WordPress or even
00:04:10 – Joomla or Drupal and these are the most
00:04:13 – popular content management systems and
00:04:15 – web design companies love these because
00:04:18 – it enables their clients to update their
00:04:20 – own content instead of bugging them to
00:04:22 – do it now of course you could create
00:04:24 – your own content management system in
00:04:26 – any language but you can roll out a
00:04:28 – wordpress site in a week especially if
00:04:30 – you're using pre-made plugins and
00:04:32 – templates so PHP is also in credit
00:04:36 – easy to learn when you compare it to
00:04:37 – language like Java or C++ this is a big
00:04:41 – advantage but it can also be a
00:04:43 – disadvantage and I'll tell you why in a
00:04:45 – little bit so support is another big
00:04:48 – advantage PHP has a huge community and
00:04:51 – if you get stuck there's a really good
00:04:52 – chance you can find a fix for your exact
00:04:55 – problem most developers know PHP even if
00:04:58 – they don't use it or even if they hate
00:05:00 – it a lot of them still know it so
00:05:03 – support is a big plus PHP also gives you
00:05:06 – a ton of freedom and this is another
00:05:09 – example of something that's both good
00:05:10 – and bad it's not a typed language you
00:05:13 – don't have to define your data types or
00:05:15 – anything like that there's a million
00:05:17 – different ways to create the same
00:05:18 – functionality so integration is another
00:05:22 – good one you can use PHP with just about
00:05:25 – any database mysql postgrads no SQL
00:05:28 – databases like MongoDB there's an
00:05:31 – adapter for pretty much excuse me any
00:05:33 – type of database or data store that you
00:05:35 – want to use there's also a ton of
00:05:38 – frameworks available for PHP and this
00:05:41 – allows people that understand PHP but
00:05:44 – aren't masters create pretty significant
00:05:46 – applications frameworks do a lot of the
00:05:49 – hard stuff for us laravel is very
00:05:51 – popular you also have Symphony
00:05:53 – codeigniter there's a huge list of
00:05:55 – frameworks for PHP you can also use
00:05:58 – multiple paradigms this ties into the
00:06:01 – freedom aspect you can use procedural or
00:06:03 – functional programming with PHP as well
00:06:06 – as hardcore object-oriented code using
00:06:09 – classes most people start with
00:06:11 – procedural because it's much easier and
00:06:14 – then you can gradually start to learn
00:06:15 – the object oriented stuff
00:06:18 – alright and PHP can also be directly
00:06:21 – embedded into HTML and that's also a
00:06:24 – huge plus and then it's also
00:06:27 – pre-configured on most hosting
00:06:29 – environments especially shared hosting
00:06:31 – if you go to Hostgator or dreamhost or
00:06:33 – any of those companies they usually have
00:06:36 – PHP pre-installed on their servers and
00:06:39 – there's even one click installations for
00:06:41 – things like WordPress and even ecommerce
00:06:45 – platforms like Magento and so on and
00:06:48 – there's there's a lot of good free PHP
00:06:50 – scripts out there alright so those are
00:06:54 – the reasons why you should learn PHP now
00:06:57 – let's take a look at some disadvantages
00:06:59 – so I said earlier that PHP was really
00:07:02 – easy to learn and it offers you a lot of
00:07:04 – freedom that can be a good advantage as
00:07:07 – far as you being able to learn a
00:07:08 – language but it can also be a huge
00:07:10 – disadvantage too much freedom can mean a
00:07:13 – poor language design PHP adapts its
00:07:16 – syntax from many different other
00:07:19 – languages you have pearl C C++ Java and
00:07:23 – so on so it can be extremely
00:07:26 – inconsistent and flaky it doesn't really
00:07:28 – have in some sense it doesn't really
00:07:30 – have its own identity okay so that leads
00:07:33 – us to the next one which is that it's
00:07:35 – too easy to write bad code there's a lot
00:07:38 – of bad scripts out there written in PHP
00:07:40 – like I said there's a million ways to
00:07:43 – write the same functionality and this
00:07:46 – can make things very difficult and just
00:07:48 – annoying when you're working with
00:07:49 – someone else's code I've had times where
00:07:52 – I just can't figure out what the h***
00:07:54 – they were thinking when they wrote it
00:07:56 – but PHP is so flexible that it still
00:07:59 – works you know if you visit the front
00:08:01 – end of the website of the app it still
00:08:03 – works it's just a very poor and
00:08:05 – difficult design and PHP is also weakly
00:08:09 – typed while that makes things easier
00:08:11 – this can also lead to bugs and issues
00:08:14 – okay so the next one is scalability PHP
00:08:18 – isn't completely suitable for really big
00:08:22 – applications that use big data you can
00:08:26 – have problems with scaling it's fine for
00:08:28 – small to medium sized applications and
00:08:31 – websites but when we start getting into
00:08:33 – apps with millions of users and
00:08:36 – thousands of pages it starts to get a
00:08:38 – little difficult to manage because it's
00:08:41 – not highly modular I think a big part of
00:08:43 – that is because it was designed to
00:08:46 – basically create dynamic websites not so
00:08:48 – much high-tech applications if you're
00:08:51 – building a really large application with
00:08:54 – big data you're probably better off
00:08:56 – going with something like the mean stack
00:08:58 – all right now as far as security every
00:09:02 – language has its flaws PHP is completely
00:09:04 – open source and it's not compiled and
00:09:06 – this gives you gives it some
00:09:08 – vulnerabilities although a lot of the
00:09:11 – the insecure PHP programs are due to bad
00:09:14 – code not really the language itself all
00:09:18 – right so these are pretty much the main
00:09:20 – disadvantages I think the biggest that
00:09:22 – that the reason why devet some
00:09:24 – developers really hate PHP is that's
00:09:26 – poor design and the code can really just
00:09:30 – be an ugly mess and it very inconsistent
00:09:34 – so I think that's the main reason all
00:09:37 – right so the conclusion is up to you to
00:09:41 – decide again I'm not going to suggest
00:09:43 – PHP for your first language I'm not
00:09:46 – going to do that at all I will suggest
00:09:47 – PHP node or Python but I won't go any
00:09:51 – further than that without knowing what
00:09:54 – works for you and how you code because
00:09:55 – everyone is different and it's just
00:09:58 – stupid for me to say that this is the
00:10:00 – language you should learn because I
00:10:01 – don't know you
00:10:03 – but the bottom line is all languages
00:10:05 – have good and bad qualities web link web
00:10:09 – technologies desktop programming
00:10:13 – languages anything has it has good and
00:10:15 – bad PHP is popular and widely used
00:10:18 – that's a good enough reason for me to
00:10:20 – want to learn it or to have wanted to
00:10:23 – learn it what I would suggest that you
00:10:26 – learn other languages as well don't
00:10:28 – don't just stick with PHP for the rest
00:10:31 – of your career all right and then most
00:10:33 – of all most important to write good code
00:10:35 – learn good coding practices stay
00:10:40 – consistent make things very clean and
00:10:42 – PHP will work out just fine for you all
00:10:45 – right so hopefully you guys enjoyed this
00:10:47 – and learned a little
00:10:48 – [Music]


Video Url:
http://youtu.be/bB-UdplrmiQ

Comments

comments