Why I choose PHP as my web development language.

matthew-

Active Member
Joined
Mar 9, 2011
Messages
56
Reaction score
0
Location
Johannesburg, South Africa
Well this is more of an opinion, I will be starting a blog in the near future.

Well first of PHP is so quick to install with servers as the Apache HTTP server, there are a few configuration changes to apcahe HTTP httpd.config and the PHP.ini file but once that's solved it's done and ready to deploy an application you can think of.
Also you can use quick set up solutions as in wampserver or lampserver depending on what operating system you are running on.
I am still yet to test the scalability of PHP applications but will do so as soon as I can drive enough traffic to a web application.

By the way this is not spam.

I also like PHP as it is still a language in it's infancy, maybe it's loosely typed and it's not a true oop language but it does get things done quickly and with great productivity, with all the beautiful frameworks for PHP as in cakePHP, YII, codeIgniter and the Zend framework It just makes it such a great tool for conceptualization and prototyping of applications for the web and mobile.

Of course we could argue with languages as in asp.net or jsp well those are great languages for web development with the strict type and true oop of Java and C# but I do think they should be used for much large applications then your basic sites and apps like I would use jsp for a banking app or payment system and if it was a microsoft project then of course asp.net but I am not a microsoft advocate right now but I will see what windows 8 brings to the table.

Well getting back onto topic, PHP can be used to create anything from social networks as in facebook, myspace to search engines as in google but I would much rather use java and it's nio api to scrape sites to build an index but it really is such an amazing language of course there are those who would criticize it but it great for what it is.

e.g

<?php
$url = 'yousite.com';
echo $url
?>

what a simple language.
 
Any tips for a complete n00b with fear of coding to learn PHP?
 
Any tips for a complete n00b with fear of coding to learn PHP?


Well the best way to learn is from the php developers manual, and a PHP mvc framework.
As in cakePHP or YII it's pretty fun as well as for a hobby language.

I would recommend Java if you plan on having a career in programming takes a few years to understand it fully and to be fluid with your programming but it's one of the truer languages derived from C++ which is derived from C which is extremely low level programming Java is a great high level language where you can learn true OOP principles, so if you want to learn programming from the start begin with Java, forget about rails or python they are what I call hipster languages, Java is what powers android and Google and many of the telecommunications systems, satellites, robots, governmental systems, trading systems, banking systems etc it's the language of choice.

It's also very strongly type as in you will need to implicitly declare what data type every object or primitive type you use, which make it very strict and standards based, and there are so many libraries out there for Java proprietary and closed source.

The syntax and the theory are a lot more complicated then PHP but once you understand it programming becomes more simple then an everyday conversation.

example of java over php

import java.util.Scanner

class Main {
public static void main(String[] args) {
String name;
Boolean access = false;

Scanner scan = new Scanner(System.in);
name = scan.nextLine();

if(name.equals('Admin')) {
System.out.println('Access Granted");
access = true;
}
else {
access = false;
}

if(access == true) {
Mainview mv = new Mainview(true) ;
mv.open(); //Invoking the open method of the mv object which is a type of Mainview class / data type / template/
}
else {
System.exit();
}
}


}

This is just a very basic example but for server applications and messaging applications over TCP/IP protocols I would recommend Java also with JAX-RS, RMI, Sockets, and Servlets it's a very very powerful language enabling you to have extremely secure applications, with maintainable code and there are so many frameworks and features being developed for it that I would recommend that anyone begging programming to learn Java, once you have a good knowledge in it C# which most windows developers program in using Visual Studio and WPF become so easy to pick up that you can learn any other language in a week or two.

Go Java if you want to be considered seriously amongst the IT World. Then you can boss python, perl, ruby, php developers around. Also learn GOF patterns and MVC techniques.

Java > PHP
 
Yes I agree, but not everyone wants to be a rocket scientist they just want what can get the job done.
Thanks for the link.

You certainly don't have to be a rocket scientist to learn either python or Ruby.

Personally I prefer ASP.NET (a good IDE is crucial, and you can't argue that Visual Studio is sheer genius) with Ruby on rails on the side.
 
While Python can easily (and has been) used for rocket science, it's certainly not only for rocket scientists and there's certainly nothing preventing you from 'getting the job done'. PHP has it's advantages (it's more popular admittedly and thus has a large install base, is apparently 'easier' to deploy and...err, I think that's it).

Python certainly isn't hard to learn and there are tons of tutorials including some on how to teach it to children, I've been involved in mentoring total newbies to IT and they've taken to it easily. I'm loathe to admit it but Ruby shares many of those qualities.

Let's not kid ourselves & say that all PHP code is rubbish & all Python/Ruby code is gold, you can write junk in any language. I just think that PHP's entire model makes it far too easy to write junk than almost any other language.
 
Also, just to be a bit trollish, I'd consider teaching PHP to children as a form of child abuse.
 
Learn something else. Python and Ruby are excellent choices.

PHP is a truly terrible language.

Edit: for the interested: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
^ That. All of that.

The linked blog post is very good. The author gets his point across with facts and examples in stead of emotional ranting. Those warnings and examples should let any wary programming think twice about using the language.

Yes, PHP is an "easy" language to get up and running with, but that is not necessarily a good thing. PHP makes it very easy to do the "wrong thing" (especially so for novice coders) and, looking at the language inconsistencies, gotcha's et al mentioned in the blog post, rather difficult to do the "right thing".
 
As a web designer and developer, I am a fan of PHP as it ties in closely with web development.
Of all the alternative languages listed, PHP is best suited for web work IMHO.
 
teraside:8251083 said:
Any tips for a complete n00b with fear of coding to learn PHP?

Google PHP101. It's a complete online intro to PHP. Nothing hectic but it'll get you started.

PHP.net can be very handy but a lot of new people can find it a bit daunting.
 
Php is awesome and will always for me personally be remembered as where I started

I am currently only doing C# though here and there some projects in php
 
As a web designer and developer, I am a fan of PHP as it ties in closely with web development.
Of all the alternative languages listed, PHP is best suited for web work IMHO.

I can't agree at all. I have yet to see one advantage PHP has in web development that languages like Python and Ruby don't.
 
Personally I find Ruby's syntax an abomination... Tried Ruby on Rails and the generation scripts are cool but it takes longer to figure out what has been generated than to code it from scratch. Haven't worked with Python. PHP is just extremely straightforward and is better integrated with existing frameworks.
 
All languages have there advantage and everyone has their own experience though so you cannot really compare

What I can say is how many large sites are running php my sql ? Quite a few if you think about it the same with other languages as well
 
Recently got into Ruby on Rails, and can only say: oh wow.

I would really, really recommend it for developers getting into web development. Lots of fun resources (Especially liked the idea of the Zombies http://railsforzombies.org/, Rails Casts, etc, etc.

At this stage, I feel RoR is definitely a contender for web framework of the year, and in my view, beats PHP hands down any day. The ability to generate scaffolding on the fly, incorporate new libraries (gems) as needed, automatically having your views, models, helpers created for you, integrated tests, etc, etc, just makes it a killer framework.
 
Personally I find Ruby's syntax an abomination... Tried Ruby on Rails and the generation scripts are cool but it takes longer to figure out what has been generated than to code it from scratch. Haven't worked with Python. PHP is just extremely straightforward and is better integrated with existing frameworks.

It takes a bit of time to get used to the generators, I agree: But, after you are used to them ... Views can only be at A, B or C. Models can only be at D, E or F. Assets will always be in J, etc, etc.

And I feel this is one of the great advantages of RoR: The web is so free form that it takes a huge amount of experience and discipline to build a web system with enough legs to carry for a while. Using a framework like RoR, at least you know that your implementation is following best practices as far as possible
 
icryrus's link (again): PHP: a fractal of bad design

Since I have not actively used PHP since the early 4.x days, I would really appreciate some responses on the blog post above by some of the more (and recently) experienced PHP guys. Are there counter arguments to the issues raised?
 
@walter_l: A language is as good as the user: The problem with PHP is that it allows a bad coder to do bad things, very, very easily - It also allows a good coder to do amazing things.
 
@walter_l: A language is as good as the user: The problem with PHP is that it allows a bad coder to do bad things, very, very easily - It also allows a good coder to do amazing things.

That's quite an accurate statement.
 
Top
Sign up to the MyBroadband newsletter
X